29#ifndef KIDS_RuleEvaluator_H
30#define KIDS_RuleEvaluator_H
52 const std::string&
mode,
const std::string&
save,
70 void writeTo(std::ofstream& ofs,
void* data,
int sampleIndex);
78 std::shared_ptr<VariableDescriptor>
result;
79 std::shared_ptr<VariableDescriptor>
collect;
80 std::shared_ptr<VariableDescriptor>
reduced;
Declaration of the DataSet class and related classes.
this file provides einsum operation
provide VariableDescriptor class
< http://warp.povusers.org/FunctionParser/fparser.html
Represents a rule for evaluating an expression.
std::shared_ptr< VariableDescriptor > result
Result of the expression.
void writeTo(std::ofstream &ofs, void *data, int sampleIndex)
Writes the results to a file stream.
std::string rule
The expression rule.
std::vector< kids_dtype > inputDataTypes
Data types of input data.
std::string mode
The mode of evaluation.
std::shared_ptr< EinsumHelper > einsumHelper
Shared pointer to EinsumHelper.
std::vector< void * > inputData
Input data.
std::string expressionString
String representation of the expression.
std::vector< std::vector< std::size_t > > inputShapes
Shapes of input data.
void calculateResult(int sampleIndex=0)
Calculates the expression at a particular time slice.
std::size_t totalTermNumber
Number of terms.
std::shared_ptr< VariableDescriptor > reduced
collect of Result
std::shared_ptr< VariableDescriptor > collect
collect of Result
std::string save
File name to save results.
std::size_t numCollects
Number of Collects.
std::vector< VariableDescriptor > variables
Variables in the expression.
kids_dtype expressionType
Type of the expression.
RuleEvaluator(const std::string &rule, std::shared_ptr< DataSet > &DS, const std::string &mode, const std::string &save, std::size_t totalFrameNumber)
Constructs an RuleEvaluator object.
size_t expressionId
ID of the expression.
std::string einsumString
String representation of expression type.
int expressionCheck
ID of the expression.
std::size_t totalFrameNumber
Number of samples.