#ifndef EXPRESSION_H
#define EXPRESSION_H

#include <vector>
#include <string>
#include <map>
#include "tensor.h"

class evaluation;

class expression
{
    friend class evaluation;
public:
    expression(
        int expr_id,
        const char *op_name,
        const char *op_type,
        int *inputs,
        int num_inputs);

    // Getter methods for expression attributes
    int get_expr_id() const;
    const std::string& get_op_name() const;
    const std::string& get_op_type() const;
    const std::vector<int>& get_inputs() const;
    tensor get_op_param_tensor(const std::string& key) const;
    double get_op_param_double(const std::string& key) const;
    int get_op_param_int(const std::string& key) const;

    void add_op_param_double(
        const char *key,
        double value);

    void add_op_param_ndarray(
        const char *key,
        int dim,
        size_t shape[],
        double data[]);

private:
    int expr_id_;
    std::string op_name_;
    std::string op_type_;
    std::vector<int> inputs_;
    std::map<std::string, tensor> op_params_tensor_;
    std::map<std::string,double> op_params_double_;
    std::map<std::string,int> op_params_int_;
}; // class expression

#endif // EXPRESSION_H
