DataSet class is used to specify or handle the settings of a data set (point sequence).
The class can be called from DataManager class, and also from CalculationDefinition , ProbeDefinition , SectionGraph , Study class as a graph data
.
More...
Public Member Functions | |
| int | GetCols () |
| Returns the number of columns in the data set as an integer. More... | |
| Variant | GetColumn (int i) |
| Returns the list of values for the specified column as a point sequence. More... | |
| String | GetColumnName (int i) |
| Returns the name of the column as a string. More... | |
| Variant | GetCrossPoints (String &constantComponent, double ref, int col) |
| Returns values of all intersections between the specified graph line and reference line as a point sequence. More... | |
| double | GetCrossPointValue (String &constantComponent, double ref, int col, int i) |
| Returns a value of the intersection between the specified graph line and reference line as a real number. More... | |
| String | GetGroupName () |
| Returns the group name of the data set as a string. More... | |
| String | GetName () |
| Returns the name of the data set as a string. More... | |
| Variant | GetRange (int x1, int y1, int x2, int y2) |
| Returns the list of values in the specified range in a data set as a point sequence. More... | |
| int | GetRows () |
| Returns the number of rows in the data set as an integer. More... | |
| double | GetValue (int i, int j) |
| Returns the value of the cell (i, j) as a real number. More... | |
| int | GetViewOrder () |
| Returns the order for displaying data sets. More... | |
| String | GetXAxisTitle () |
| Returns the title of the X-axis. More... | |
| String | GetXAxisUnit () |
| Returns the unit for the X-axis. More... | |
| String | GetYAxisTitle () |
| Returns the title of the Y-axis. More... | |
| String | GetYAxisUnit () |
| Returns the unit for the Y-axis. More... | |
| virtual bool | IsValid () |
| Returns True if an object is valid. More... | |
| int | NumCrossPoints (String &constantComponent, double ref, int col) |
| Returns the number of intersections between the specified line and the reference line. More... | |
| void | ReadFromFile (String &filename) |
| Imports a point sequence file (*.csv, *.txt, *.pa). More... | |
| bool | SaveGraphImage (String &filename, int width, int height) |
| Specifies the size and saves the graph image. More... | |
| void | SetColumn (int col, String array &list) |
| Specifies the vector for the specified column. More... | |
| void | SetColumnUnit (int col, String &unitname) |
| Applies any units for each value in a specified row of a point sequence. More... | |
| void | SetName (String &name) |
| Specifies a name for the data set. More... | |
| void | SetTable (String array &mat) |
| Specifies the point sequence of multidimensional array for the data set. More... | |
| void | SetValue (int i, int j, double value) |
| Specifies a value for the specified cell (i, j). More... | |
| void | SetViewOrder (int order) |
| Specifies the order for displaying data sets. More... | |
| void | WriteColumn (String &filename, Variant &val) |
| Exports the data of the X-axis and a specified line to a file. More... | |
| void | WriteTable (String &filename) |
| Exports data to a file. More... | |
DataSet class is used to specify or handle the settings of a data set (point sequence).
The class can be called from DataManager class, and also from CalculationDefinition , ProbeDefinition , SectionGraph , Study class as a graph data
.
Example of calling the class object:
| int DataSet::GetCols | ( | ) |
Returns the number of columns in the data set as an integer.
The column number in the graph is counted from zero.
| Variant DataSet::GetColumn | ( | int | i | ) |
Returns the list of values for the specified column as a point sequence.
| i | Column number |
| String DataSet::GetColumnName | ( | int | i | ) |
Returns the name of the column as a string.
| i | Column number |
| Variant DataSet::GetCrossPoints | ( | String & | constantComponent, |
| double | ref, | ||
| int | col | ||
| ) |
Returns values of all intersections between the specified graph line and reference line as a point sequence.
For example, the value of all intersections at the Y coordinate is returned when the axis for the reference line is X.
| constantComponent | Axis specified as a reference line X or Y
|
| ref | Reference line value |
| col | Column number (line number) |
| double DataSet::GetCrossPointValue | ( | String & | constantComponent, |
| double | ref, | ||
| int | col, | ||
| int | i | ||
| ) |
Returns a value of the intersection between the specified graph line and reference line as a real number.
For example, the value intersecting on the Y coordinate is returned when axis for the reference line is X.
| constantComponent | Axis specified as a reference line X or Y
|
| ref | Reference line |
| col | Column number (line number) |
| i | Intersection ID. The column number is counted from zero. The intersection ID is counted from 1. |
| String DataSet::GetGroupName | ( | ) |
Returns the group name of the data set as a string.
| String DataSet::GetName | ( | ) |
Returns the name of the data set as a string.
| Variant DataSet::GetRange | ( | int | x1, |
| int | y1, | ||
| int | x2, | ||
| int | y2 | ||
| ) |
Returns the list of values in the specified range in a data set as a point sequence.
| x1 | Start point in the horizontal position |
| y1 | Start point in the vertical position |
| x2 | End point in the horizontal position |
| y2 | End point in the vertical position |
| int DataSet::GetRows | ( | ) |
Returns the number of rows in the data set as an integer.
The line number is counted from 0.
| double DataSet::GetValue | ( | int | i, |
| int | j | ||
| ) |
Returns the value of the cell (i, j) as a real number.
| i | Row number |
| j | Column number |
| int DataSet::GetViewOrder | ( | ) |
Returns the order for displaying data sets.
| String DataSet::GetXAxisTitle | ( | ) |
Returns the title of the X-axis.
| String DataSet::GetXAxisUnit | ( | ) |
Returns the unit for the X-axis.
| String DataSet::GetYAxisTitle | ( | ) |
Returns the title of the Y-axis.
| String DataSet::GetYAxisUnit | ( | ) |
Returns the unit for the Y-axis.
|
virtual |
Returns True if an object is valid.
| int DataSet::NumCrossPoints | ( | String & | constantComponent, |
| double | ref, | ||
| int | col | ||
| ) |
Returns the number of intersections between the specified line and the reference line.
| constantComponent | Axis specified as a reference line X or Y
|
| ref | Reference line value |
| col | Column number (line number) |
The column number in the graph is counted from zero.
| void DataSet::ReadFromFile | ( | String & | filename | ) |
Imports a point sequence file (*.csv, *.txt, *.pa).
| filename | Point sequence file path (*.csv, *.txt, *.pa) |
| bool DataSet::SaveGraphImage | ( | String & | filename, |
| int | width, | ||
| int | height | ||
| ) |
Specifies the size and saves the graph image.
| filename | File path (jpeg, png, bmp, svg) |
| width | Width of the image (pixel) |
| height | Height of the image (height) |
| void DataSet::SetColumn | ( | int | col, |
| String array & | list | ||
| ) |
Specifies the vector for the specified column.
| col | Column ID |
| list | List of values |
| void DataSet::SetColumnUnit | ( | int | col, |
| String & | unitname | ||
| ) |
Applies any units for each value in a specified row of a point sequence.
| col | Column ID |
| unitname | Unit name |
This command is used for point sequence data.
The following are examples. The unit mm is applied as displacement for the displacement dependent point sequence (Intensityvsposition) of a switch component.
| void DataSet::SetName | ( | String & | name | ) |
Specifies a name for the data set.
| name | Data set name |
| void DataSet::SetTable | ( | String array & | mat | ) |
Specifies the point sequence of multidimensional array for the data set.
| mat | Multidimensional array |
| void DataSet::SetValue | ( | int | i, |
| int | j, | ||
| double | value | ||
| ) |
Specifies a value for the specified cell (i, j).
| i | Row number |
| j | Column number |
| value | Cell value |
| void DataSet::SetViewOrder | ( | int | order | ) |
Specifies the order for displaying data sets.
| Order | for displaying data sets |
| void DataSet::WriteColumn | ( | String & | filename, |
| Variant & | val | ||
| ) |
Exports the data of the X-axis and a specified line to a file.
| filename | File path |
| val | Name or index of the line |
The exported file format is determined by the specified extension.
| void DataSet::WriteTable | ( | String & | filename | ) |
Exports data to a file.
| filename | File path |
The file format is determined by the specified extension.