ML functions
 
Loading...
Searching...
No Matches
ConvertToIntArray Class Reference

Implements a function to convert an integer vector to an integer array. More...

#include <UtilFunction.h>

Inheritance diagram for ConvertToIntArray:
MLFunction

Public Member Functions

 ConvertToIntArray ()
 Default constructor for ConvertToIntArray.
 
void apply (const SelectivityVector &rows, std::vector< VectorPtr > &args, const TypePtr &type, exec::EvalCtx &context, VectorPtr &output) const override
 Applies the function to convert an integer vector to an integer array.
 
float * getTensor () const override
 Returns the tensor associated with the function.
 
void setWeight ()
 Sets the weight for the function.
 
- Public Member Functions inherited from MLFunction
virtual ~MLFunction ()=default
 Virtual destructor.
 
virtual std::vector< int > getDims ()
 Returns the dimensions of the function.
 
virtual std::string getFuncName ()
 Returns the name of the function.
 
virtual int getNumDims ()
 Returns the number of dimensions of the function.
 
virtual CostEstimate getCost (std::vector< int > inputDims)
 Estimates the computational cost of applying the function.
 

Static Public Member Functions

static std::vector< std::shared_ptr< exec::FunctionSignature > > signatures ()
 Returns the function signatures.
 
static std::string getName ()
 Returns the name of the function.
 

Additional Inherited Members

- Protected Member Functions inherited from MLFunction
double getWeightedCost (std::string name, float cost)
 Calculates the weighted cost of the function.
 
std::vector< double > getCoefficientVector (std::string name)
 Retrieves the cost coefficients for the function.
 
- Protected Attributes inherited from MLFunction
std::vector< int > dims
 Dimensions of the function.
 

Detailed Description

Implements a function to convert an integer vector to an integer array.

Member Function Documentation

◆ apply()

void ConvertToIntArray::apply ( const SelectivityVector & rows,
std::vector< VectorPtr > & args,
const TypePtr & type,
exec::EvalCtx & context,
VectorPtr & output ) const
inlineoverride

Applies the function to convert an integer vector to an integer array.

Parameters
rowsSelectivity vector indicating which rows to process.
argsVector of input arguments.
typeType of the output vector.
contextEvaluation context.
outputOutput vector to store the results.

◆ getName()

static std::string ConvertToIntArray::getName ( )
inlinestatic

Returns the name of the function.

Returns
Function name.

◆ getTensor()

float * ConvertToIntArray::getTensor ( ) const
inlineoverridevirtual

Returns the tensor associated with the function.

Returns
Pointer to the tensor.

Implements MLFunction.

◆ signatures()

static std::vector< std::shared_ptr< exec::FunctionSignature > > ConvertToIntArray::signatures ( )
inlinestatic

Returns the function signatures.

Returns
Vector of function signatures.

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