#pragma once
#include "mexCellItem.h"

class PartwiseLinFunc
{
	typedef struct linear_func {
		double a0;
		double a1;
	} LinFunc;

	typedef struct partwise_linear_func {
		bool isSet = false;
		int parts;
		double * breaks;
		linear_func * funcs;
	} PartLinFunc;

	PartLinFunc funcProps;

public:
	PartwiseLinFunc(mexCellItem * cell);

	double Evaluate(double X, int isLogged = 0);
	
	~PartwiseLinFunc();
};

