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... | |
| bool | IsViewShown () |
| Returns displaying data set status. 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... | |
Detailed Description
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:
Member Function Documentation
| int DataSet::GetCols | ( | ) |
Returns the number of columns in the data set as an integer.
- Returns
- Number of columns in the data set
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.
- Parameters
-
i Column number
- Returns
- Values in the specified column
| String DataSet::GetColumnName | ( | int | i | ) |
Returns the name of the column as a string.
- Parameters
-
i Column number
- Returns
- Name of the column in the data set
| 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.
- Parameters
-
constantComponent Axis specified as a reference line X or Yref Reference line value col Column number (line number)
- Returns
- Value of all intersections
| 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.
- Parameters
-
constantComponent Axis specified as a reference line X or Yref Reference line col Column number (line number) i Intersection ID. The column number is counted from zero. The intersection ID is counted from 1.
- Returns
- Value of intersections
| String DataSet::GetGroupName | ( | ) |
Returns the group name of the data set as a string.
- Returns
- Group name of the data set
| String DataSet::GetName | ( | ) |
Returns the name of the data set as a string.
- Returns
- Name of the data set
| 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.
- Parameters
-
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
- Returns
- List of values in the specified range
| int DataSet::GetRows | ( | ) |
Returns the number of rows in the data set as an integer.
- Returns
- Number of rows in the data set
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.
- Parameters
-
i Row number j Column number
- Returns
- Value in the specified cell
| int DataSet::GetViewOrder | ( | ) |
Returns the order for displaying data sets.
- Returns
- Order for displaying data sets
| String DataSet::GetXAxisTitle | ( | ) |
Returns the title of the X-axis.
- Returns
- X-axis title
| String DataSet::GetXAxisUnit | ( | ) |
Returns the unit for the X-axis.
- Returns
- X-axis unit
| String DataSet::GetYAxisTitle | ( | ) |
Returns the title of the Y-axis.
- Returns
- Y-axis title
| String DataSet::GetYAxisUnit | ( | ) |
Returns the unit for the Y-axis.
- Returns
- Y-axis unit
|
virtual |
Returns True if an object is valid.
- Returns
- Whether or not the DataSet objects in the list are valid
| int DataSet::IsViewShown | ( | ) |
Returns displaying data set status.
- Returns
- Whether or not the data set is displayed
| int DataSet::NumCrossPoints | ( | String & | constantComponent, |
| double | ref, | ||
| int | col | ||
| ) |
Returns the number of intersections between the specified line and the reference line.
- Parameters
-
constantComponent Axis specified as a reference line X or Yref Reference line value col Column number (line number)
- Returns
- Number of intersections
The column number in the graph is counted from zero.
| void DataSet::ReadFromFile | ( | String & | filename | ) |
Imports a point sequence file (*.csv, *.txt, *.pa).
- Parameters
-
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.
- Parameters
-
filename File path (jpeg, png, bmp, svg) width Width of the image (pixel) height Height of the image (height)
- Returns
- Whether or not the graph image is saved
| void DataSet::SetColumn | ( | int | col, |
| String array & | list | ||
| ) |
Specifies the vector for the specified column.
- Parameters
-
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.
- Parameters
-
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.
- Parameters
-
name Data set name
| void DataSet::SetTable | ( | String array & | mat | ) |
Specifies the point sequence of multidimensional array for the data set.
- Parameters
-
mat Multidimensional array
| void DataSet::SetValue | ( | int | i, |
| int | j, | ||
| double | value | ||
| ) |
Specifies a value for the specified cell (i, j).
- Parameters
-
i Row number j Column number value Cell value
| void DataSet::SetViewOrder | ( | int | order | ) |
Specifies the order for displaying data sets.
Specifies the status of displaying data set.
- Parameters
-
Order for displaying data sets Status of displaying data set.
| void DataSet::WriteColumn | ( | String & | filename, |
| Variant & | val | ||
| ) |
Exports the data of the X-axis and a specified line to a file.
- Parameters
-
filename File path val Name or index of the line
The exported file format is determined by the specified extension.
- ***.txt >>> Text file (tab-delimited)
- ***.csvj >>> CSV file (comma-delimited)
- ***.htm or ***.html >>> HTML file
- Extension not specified >>> Text file (tab-delimited)
| void DataSet::WriteTable | ( | String & | filename | ) |
Exports data to a file.
- Parameters
-
filename File path
The file format is determined by the specified extension.
- ***.txt >>> Text file (tab-delimited)
- ***.csvj >>> CSV file (comma-delimited)
- ***.htm or ***.html >>> HTML file
- Extension not specified >>> Text file (tab-delimited)