The Relation
companion object provides additional functions for the Relation
class. FIX - apply methods - make compatible with RelationSQL
Attributes
Members list
Value members
Concrete methods
Create an unpopulated relation.
Create an unpopulated relation.
Value parameters
- domain
-
the string indicating domains for columns, e.g., Array ('S', 'D')
- key
-
the column number for the primary key
- name
-
the name of the relation
- schema
-
the names of columns
Attributes
Create a relation from a sequence of row/tuples. These rows must be converted to columns.
Create a relation from a sequence of row/tuples. These rows must be converted to columns.
Value parameters
- domain
-
the string indicating domains for columns (e.g., 'SD' = 'String', 'Double')
- key
-
the column number for the primary key (< 0 => no primary key)
- name
-
the name of the relation
- row
-
the sequence of rows to be converted to columns for the columnar relation
- schema
-
the names of columns
Attributes
Read the relation with the given name into memory using serialization.
Read the relation with the given name into memory using serialization.
Value parameters
- name
-
the name of the relation to load
Attributes
Return the count (number of elements) of each of the columns of columnar relation r.
Return the count (number of elements) of each of the columns of columnar relation r.
Value parameters
- r
-
the given relation
Attributes
Get a Vectr of count of the cName column for the r relation.
Get a Vectr of count of the cName column for the r relation.
Value parameters
- cName
-
the column name for the column to be counted
- r
-
the relation you want to operate on
Attributes
From function return cartesian product of all the relations.
From function return cartesian product of all the relations.
Value parameters
- relations
-
the relations making up the from clause
Attributes
Create a relation from the xy matrix of doubles.
Create a relation from the xy matrix of doubles.
Value parameters
- domain
-
the string indicating domains for columns, e.g., Array ('S', 'D')
- key
-
the column number for the primary key (< 0 => no primary key)
- name
-
the name of the relation
- schema
-
the names of columns
- xy
-
the matrix containing the data
Attributes
Create a relation from the x matrix of doubles and y vector of doubles or integers.
Create a relation from the x matrix of doubles and y vector of doubles or integers.
Value parameters
- domain
-
the string indicating domains for columns, e.g., Array ('S', 'D')
- key
-
the column number for the primary key (< 0 => no primary key)
- name
-
the name of the relation
- schema
-
the names of columns
- x
-
the matrix containing the data
- y
-
the vector containing the data
Attributes
Read the relation with the given name into memory loading its columns with data from the CSV file named fileName. Note: "ln.split (eSep, -1)" will keep all values even if empty "one,,three" -> "one","",three"
Read the relation with the given name into memory loading its columns with data from the CSV file named fileName. Note: "ln.split (eSep, -1)" will keep all values even if empty "one,,three" -> "one","",three"
Value parameters
- domain
-
an optional string indicating domains for columns (e.g., 'SD' = 'String', 'Double')
- eSep
-
the element separation string/regex (e.g., "," ";" " +")
- fileName
-
the file name of the data file
- key
-
the column number for the primary key (< 0 => no primary key)
- name
-
the name of the relation
- schema
-
the names of columns
- skip
-
the number of lines in the CSV file to skip (e.g., header line(s))
Attributes
Read the relation with the given name into memory loading its columns with data from the CSV file named fileName. In this version, the column names are read from the first line of the file.
Read the relation with the given name into memory loading its columns with data from the CSV file named fileName. In this version, the column names are read from the first line of the file.
Value parameters
- cPos
-
the sequence of column positions in the input file to be used (null => select all)
- domain
-
an optional string indicating domains for columns (e.g., 'SD' = 'String', 'Double')
- eSep
-
the element separation string/regex (e.g., "," ";" " +")
- fileName
-
the file name of the data file
- key
-
the column number for the primary key (< 0 => no primary key)
- name
-
the name of the relation
Attributes
Read the relation with the given name into memory loading its columns with data from the CSV file named fileName. In this version, the column names are read from the first line of the file. It uses col2 which is a temporary VEC, and maintains indices.
Read the relation with the given name into memory loading its columns with data from the CSV file named fileName. In this version, the column names are read from the first line of the file. It uses col2 which is a temporary VEC, and maintains indices.
Value parameters
- domain
-
the string indicating domains for columns (e.g., 'SD' = 'String', 'Double')
- eSep
-
the element separation string/regex (e.g., "," ";" " +")
- fileName
-
the file name of the data file
- key
-
the column number for the primary key (< 0 => no primary key)
- name
-
the name of the relation
Attributes
Read the relation with the given name into memory loading its columns with data from the CSV file named fileName. This version assumes defaults for eSep and skip of ("," and 0).
Read the relation with the given name into memory loading its columns with data from the CSV file named fileName. This version assumes defaults for eSep and skip of ("," and 0).
Value parameters
- domain
-
the string indicating domains for columns, e.g., Array ('S', 'D')
- fileName
-
the file name of the data file
- key
-
the column number for the primary key (< 0 => no primary key)
- name
-
the name of the relation
- schema
-
the names of columns
Attributes
Read the relation with the given name into memory loading its columns with data from the .arff file named fileName.
Read the relation with the given name into memory loading its columns with data from the .arff file named fileName.
Value parameters
- domain
-
the string indicating domains for columns, e.g., Array ('S', 'D')
- fileName
-
the file name of the data file
- key
-
the column number for the primary key (< 0 => no primary key)
Attributes
Return the maximum of each of the columns of columnar relation r.
Return the maximum of each of the columns of columnar relation r.
Value parameters
- r
-
the given relation
Attributes
Compute the mean of each of the columns of columnar relation r.
Compute the mean of each of the columns of columnar relation r.
Value parameters
- r
-
the given relation
Attributes
Return the minimum of each of the columns of columnar relation r.
Return the minimum of each of the columns of columnar relation r.
Value parameters
- r
-
the given relation
Attributes
Compute the mean of each of the columns of columnar relation r.
Compute the mean of each of the columns of columnar relation r.
Value parameters
- r
-
the given relation
Attributes
Test/execute the given query.
Test/execute the given query.
Value parameters
- query
-
the query to execute
- result
-
the table resulting from the query