CPARK 1.0
A light-weighted, distributed computing framework for C++ that offers a fast and general-purpose large data processing solution.
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
cpark::FilterRdd< R, Func > Class Template Reference

#include <filter_rdd.h>

Inheritance diagram for cpark::FilterRdd< R, Func >:
cpark::BaseRdd< FilterRdd< R, Func > >

Public Types

using Base = BaseRdd< FilterRdd< R, Func > >
 

Public Member Functions

constexpr FilterRdd (const R &prev, Func func)
 
constexpr FilterRdd (const FilterRdd &)=default
 
FilterRddoperator= (const FilterRdd &)=default
 
- Public Member Functions inherited from cpark::BaseRdd< FilterRdd< R, Func > >
 BaseRdd (const BaseRdd< R > &prev, bool copy_id)
 
 BaseRdd (const BaseRdd< R > &prev)
 
 BaseRdd (ExecutionContext *context)
 
BaseRddoperator= (const BaseRdd< R > &prev)
 
auto begin () const
 
auto end () const
 
ExecutionContext::RddId id () const noexcept
 

Public Attributes

friend Base
 

Additional Inherited Members

- Protected Attributes inherited from cpark::BaseRdd< FilterRdd< R, Func > >
ExecutionContextcontext_
 
ExecutionContext::RddId rdd_id_
 
size_t splits_num_
 

Detailed Description

template<concepts::Rdd R, typename Func>
requires std::invocable<Func, utils::RddElementType<R>>&& std::is_convertible_v< std::invoke_result_t<Func, utils::RddElementType<R>>, bool>
class cpark::FilterRdd< R, Func >

An Rdd holding the data filtered from an old rdd by some function.

Template Parameters
RType of the old Rdd.
FuncType of the filter function. The type of the old Rdd R's elements should be able to invoke function Func, the invoke result must be in boolean, and the element type shouldn't change after filter.
Examples
filter_even.cpp.

Constructor & Destructor Documentation

◆ FilterRdd()

template<concepts::Rdd R, typename Func >
constexpr cpark::FilterRdd< R, Func >::FilterRdd ( const R &  prev,
Func  func 
)
inlineconstexpr

Main constructor of FilterRdd.

Parameters
prevReference to previous Rdd of type R
funcThe filter function which takes an element from prev and returns a boolean value

The documentation for this class was generated from the following file: