// call only when parsing internal MultiValueFunction ReconstructFunction(long _id, string _name, bool _can_interpolate, MultiValPointer _disp_vect, string _unit_x, string _unit_y, string _unit_z, Point4D _bounds, List <double> _Zs, List <List <Point3D> > _Functions, List <string> _Fct_Names) { if (_id < 0) { return(null); } if (_Zs == null || _Zs.Count < 1) { return(null); } if (_Functions == null || _Functions.Count < 1) { return(null); } if (_Fct_Names == null || _Fct_Names.Count != _Functions.Count) { return(null); } MultiValueFunction created = new MultiValueFunctionND(_id, _name, _can_interpolate, _disp_vect, _unit_x, _unit_y, _unit_z, _bounds, _Zs, _Functions, _Fct_Names); // check if a valid function table was created if (created == null) { return(null); } if (created.NrZ == 0) { return(null); } // create this.value_record.Add(created); // adjust type counter MultiValue.NR_MULTI_VALUES = Math.Max(MultiValue.NR_MULTI_VALUES, created.MVID); // done return(created); }
public MultiValueFunction CreateFunction(string _unit_x, string _unit_y, string _unit_z, Point4D _bounds, List <double> _Zs, List <List <Point3D> > _functions, List <string> _fct_names, string _name) { if (_Zs == null || _Zs.Count < 1 || _functions == null || _functions.Count < 1 || _fct_names == null || _fct_names.Count != _functions.Count) { return(null); } MultiValueFunction created = new MultiValueFunctionND(_unit_x, _unit_y, _unit_z, _bounds, _Zs, _functions, _fct_names, _name); if (created == null) { return(null); } if (created.NrZ == 0) { return(null); } this.value_record.Add(created); return(created); }