class Relation extends Table with Error with Serializable
The Relation
class stores and operates on vectors. The vectors form the
columns of the columnar relational datastore. Columns may have any of the
following types:
C - Complex
- VectorC
- 128 bit complex number a + bi
D - Double
- VectorD
- 64 bit double precision floating point number
I - Int
- VectorI
- 32 bit integer
L - Long
- VectorL
- 64 bit long integer
Q - Rational
- VectorQ
- 128 bit ratio of two long integers
R - Real
- VectorR
- 128 bit quad precision floating point number
S - StrNum
- VectorS
- variable length numeric string
T - TimeNum
- VectorT
- 96 bit time Instant = (Long, Int)
FIX - (1) don't allow (public) var (2) avoid unchecked or incomplete .asInstanceOf [T] ------------------------------------------------------------------------------
- Alphabetic
- By Inheritance
- Relation
- Serializable
- Error
- Table
- Tabular
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Relation(name: String, colName: ArrayBuffer[String], col: Vector[Vec] = null, key: Int = 0, domain: String = null, fKeys: ArrayBuffer[(String, String, Int)] = null, enter: Boolean = true)
- name
the name of the relation
- colName
the names of columns
- col
the Scala Vector of columns making up the columnar relation
- key
the column number for the primary key (< 0 => no primary key)
- domain
an optional string indicating domains for columns (e.g., 'SD' = 'StrNum', 'Double')
- fKeys
an optional sequence of foreign keys - ArrayBuffer (column name, ref table name, ref column position)
- enter
whether to enter the newly created relation into the
Catalog
Value Members
- def !=[T](cv: (String, T))(implicit arg0: ClassTag[T]): Relation
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def -(r2: Table): Table
Take the difference of 'this' table and 'r2' ('this - r2').
Take the difference of 'this' table and 'r2' ('this - r2'). Check that the two tables are compatible.
- r2
the other table
- Definition Classes
- Table
- def <[T <: Ordered[T]](cv: (String, T))(implicit arg0: ClassTag[T]): Relation
- def <=[T <: Ordered[T]](cv: (String, T))(implicit arg0: ClassTag[T]): Relation
- def ==[T](cv: (String, T))(implicit arg0: ClassTag[T]): Relation
Return the relation whose rows are equal to 'value' in the column with the given name.
Return the relation whose rows are equal to 'value' in the column with the given name.
- cv
the (column-name, value) pair, e.g., ("time", 5.00)
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def >[T <: Ordered[T]](cv: (String, T))(implicit arg0: ClassTag[T]): Relation
- def >=[T <: Ordered[T]](cv: (String, T))(implicit arg0: ClassTag[T]): Relation
- def add(tuple: Row): Unit
Add 'tuple' to 'this' relation as a new row.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def avg(cName: String): Any
Return the mean of the values in column 'cName'.
Return the mean of the values in column 'cName'.
- cName
the column name
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- var col: Vector[Vec]
- def colEmpty: Boolean
Determine whether all of the columns in the relation are empty.
- val colName: ArrayBuffer[String]
- def colNames: ArrayBuffer[String]
Return the names of columns in the relation.
- def cols: Int
Return the size in terms of number of columns in the relation.
- def colsMap: Map[String, Int]
Return the mapping from column names to column positions.
- def column(cName: String): Vec
Return the column in the relation with column name 'cName'.
- def columns: Vector[Vec]
Return all of the columns in the relation.
- def compress(cName: String*): Unit
Compress the selected columns 'cName' in 'this' table.
- def contains(tuple: Row): Boolean
Determine whether 'this' relation contains a row matching the given 'tuple'.
- def count(cName: String): Int
Return the number of values in column 'cName'.
Return the number of values in column 'cName'.
- cName
the column name
- def delete[T](p: Predicate[T]*): Relation
Delete the rows from 'this' relation that satisfy the predicates.
- def disambiguate(cn1: ArrayBuffer[String], cn2: ArrayBuffer[String]): ArrayBuffer[String]
Combine two sequences of column names and disambiguate any repeated names by appending "2".
Combine two sequences of column names and disambiguate any repeated names by appending "2".
- cn1
the first sequence of column names
- cn2
the second sequence of column names
- Attributes
- protected
- Definition Classes
- Table
- val domain: String
- def domains: String
Return the domains for the columns in the relation.
- def epi(aggCol: AggColumn*)(cName: String*): Table
Aggregate/project on the given columns (an extended projection operator that applies aggregate operators to aggregation columns and regular projection to projection columns).
Aggregate/project on the given columns (an extended projection operator that applies aggregate operators to aggregation columns and regular projection to projection columns).
- aggCol
the columns to aggregate on: (aggregate function, new column name, old column name)*
- cName
the other columns to project on
- Definition Classes
- Table
- See also
en.wikipedia.org/wiki/Relational_algebra
- def epiAny(aggF: ArrayBuffer[AggFunction], funName: ArrayBuffer[String], aggFAttr: ArrayBuffer[String], cName: String*): Relation
Method 'epiAny' is a special case of epi.
Method 'epiAny' is a special case of epi. When the projected columns can not be decided by the group by columns, only one representative will be shown for each group. FIX - change name
- aggF
the aggregate functions you want to use
- funName
the newly created aggregate columns'names
- aggFAttr
the columns you want to use of correspondent aggregate functions
- cName
the columns you want to project on
- def eproject(aggCol: AggColumn*)(cName: String*): Relation
Aggregate/project on the given columns (an extended projection operator that applies aggregate operators to aggregation columns and regular projection to projection columns).
Aggregate/project on the given columns (an extended projection operator that applies aggregate operators to aggregation columns and regular projection to projection columns).
- aggCol
the columns to aggregate on: (aggregate function, new column name, old column name)*
- cName
the other columns to project on
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def exists: Boolean
Determine whether any rows/tuples exist in 'this' relation.
- var fKeys: ArrayBuffer[(String, String, Int)]
- final def flaw(method: String, message: String): Unit
- Definition Classes
- Error
- def generateIndex(reset: Boolean = false): Unit
The 'generateIndex' method helps, e.g., the 'popTable', methods to generate an index for the table.
The 'generateIndex' method helps, e.g., the 'popTable', methods to generate an index for the table.
- reset
if reset is true, use old index to build new index; otherwise, create new index
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def groupBy(cName: String*): Relation
Group 'this' relation by the specified column names, returning 'this' relation.
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def incompatible(r2: Table): Boolean
Determine whether 'this' relation and 'r2' are incompatible by having differing numbers of columns or differing domain strings.
- val index: Map[KeyType, Row]
- Attributes
- protected
- val indextoKey: HashMap[Int, KeyType]
- Attributes
- protected
- def indices: Range
Return the range of index values for the table.
Return the range of index values for the table.
- Definition Classes
- Table
- def intersect(_r2: Table): Relation
Intersect 'this' relation and 'r2'.
- def intersect2(r2: Table): Relation
Intersect 'this' relation and 'r2'.
Intersect 'this' relation and 'r2'. Check that the two relations are compatible. Slower and only to be used if there is no index.
- r2
the other relation
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def join[T](_r2: Table, p0: Predicate2[T], p: Predicate2[T]*): Relation
The theta join, handle the predicates in where are connect by "and" (where a....and b....).
The theta join, handle the predicates in where are connect by "and" (where a....and b....).
- _r2
the second relation
- p0
the first theta join predicate (r1 cName, r2 cName, predicate to compare these two column)
- p
the rest of theta join predicates (r1 cName, r2 cName, predicates to compare these two column)
- def join(cName: ArrayBuffer[String], _r2: Table): Relation
Join 'this' relation and 'r2' by performing a "natural-join".
- def join(cName1: ArrayBuffer[String], cName2: ArrayBuffer[String], r2: Table): Relation
Join 'this' relation and 'r2' by performing an "equi-join".
Join 'this' relation and 'r2' by performing an "equi-join". Rows from both relations are compared requiring 'cName1' values to equal 'cName2' values. Disambiguate column names by appending "2" to the end of any duplicate column name.
- cName1
the join column names of this relation (e.g., the Foreign Key)
- cName2
the join column names of relation r2 (e.g., the Primary Key)
- r2
the rhs relation in the join operation
- def join(cName1: String, cName2: String, r2: Table): Table
Join 'this' table and 'r2' by performing an "equi-join".
Join 'this' table and 'r2' by performing an "equi-join". Rows from both tables are compared requiring 'cName1' values to equal 'cName2' values. Disambiguate column names by appending "2" to the end of any duplicate column name.
- cName1
the join column name of this table (e.g., the Foreign Key)
- cName2
the join column name of table r2 (e.g., the Primary Key)
- r2
the rhs table in the join operation
- Definition Classes
- Table
- def join(cName: String, r2: Table): Table
Join 'this' table and 'r2' by performing a "natural-join".
Join 'this' table and 'r2' by performing a "natural-join". Rows from both tables are compared requiring 'cName' values to be equal.
- cName
the common join column name for both table
- r2
the rhs table in the join operation
- Definition Classes
- Table
- def join(r2: Table): Table
Join 'this' table and 'r2' by performing a "natural-join".
Join 'this' table and 'r2' by performing a "natural-join". Rows from both tables are compared requiring agreement on common attributes (column names).
- r2
the rhs table in the join operation
- Definition Classes
- Table
- def joinindex(cName1: ArrayBuffer[String], cName2: ArrayBuffer[String], _r2: Table): Relation
Join 'this' relation and 'r2' by performing an "equi-join", use index to join
Join 'this' relation and 'r2' by performing an "equi-join", use index to join
- cName1
the join column names of this relation (e.g., the Foreign Key)
- cName2
the join column names of relation r2 (e.g., the Primary Key)
- _r2
the rhs relation in the join operation
- val key: Int
- def leftJoin(thres: Double = 0.001)(cName1: String, cName2: String, r2: Table): Relation
Join 'this' relation and 'r2' by performing an "apprimate left-join".
Join 'this' relation and 'r2' by performing an "apprimate left-join". Rows from both relations are compared requiring 'cName1' values to apprximately equal 'cName2' values. Disambiguate column names by appending "2" to the end of any duplicate column name. All rows from the left table are maintained with missing values indicators used where needed.
- thres
the approximate equality threshold
- cName1
the join column names of this relation (e.g., the Foreign Key)
- cName2
the join column names of relation r2 (e.g., the Primary Key)
- r2
the rhs relation in the join operation
- def leftJoin(cp1: Int, cp2: Int, r2: Relation): Relation
Join 'this' relation and 'r2' by performing a "left join".
Join 'this' relation and 'r2' by performing a "left join". Rows from both relations are compared requiring 'cp1' values to equal 'cp2' values. This method returns all the rows from 'this' relation, and the matched rows from relation 'r2'. It adds a 'null' tuples for the unmatched rows of relation 'r2' FIX: It requires relations 'this' and 'r2' to be sorted on column 'cp1' and 'cp2' resp., as it uses Sort-Merge join
- cp1
the position of the join column of this relation
- cp2
the position of the join column of 'r2' relation
- r2
the rhs relation in the join operation
- def leftJoin(cName1: String, cName2: String, r2: Table): Relation
Join 'this' relation and 'r2' by performing an "left-join".
Join 'this' relation and 'r2' by performing an "left-join". Rows from both relations are compared requiring 'cName1' values to equal 'cName2' values. Disambiguate column names by appending "2" to the end of any duplicate column name. All rows from the left table are maintained with missing values indicators used where needed.
- cName1
the join column names of this relation (e.g., the Foreign Key)
- cName2
the join column names of relation r2 (e.g., the Primary Key)
- r2
the rhs relation in the join operation
- def leftJoinApx(cp1: Int, cp2: Int, r2: Relation): Relation
Join 'this' relation and 'r2' by performing a "left join".
Join 'this' relation and 'r2' by performing a "left join". Rows from both relations are compared requiring 'cp1' values to approximately equal 'cp2' values. This method returns all the rows from 'this' relation, and the matched rows from relation 'r2'. It adds a 'null' tuples for the unmatched rows of relation 'r2' FIX: It requires relations 'this' and 'r2' to be sorted on column 'cp1' and 'cp2' resp., as it uses Sort-Merge join
- cp1
the position of the join column of this relation
- cp2
the position of the join column of 'r2' relation
- r2
the rhs relation in the join operation
- def materialize(): Relation
Materialize the relation by copying the temporary 'col2' into 'col'.
Materialize the relation by copying the temporary 'col2' into 'col'. It needs to be called by the end of the relation construction.
- def max(cName: String): Any
Return the maximum value in column 'cName'.
Return the maximum value in column 'cName'.
- cName
the column name
- def mean(cName: String): Any
- def min(cName: String): Any
Return the minimum value in column 'cName'.
Return the minimum value in column 'cName'.
- cName
the column name
- def minus(r2: Table): Relation
Take the difference of 'this' relation and 'r2' ('this - r2').
- def minus2(_r2: Table): Relation
Take the difference of 'this' relation and 'r2' ('this - r2').
Take the difference of 'this' relation and 'r2' ('this - r2'). Check that the two relations are compatible. Indexed based minus.
- _r2
the other relation
- val name: String
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def orderBy(_cName: String*): Relation
Order (ascending) the rows in the relation by the selected columns '_cName'.
- var orderedIndex: Vector[KeyType]
- Attributes
- protected
- def pi(cPos: IndexedSeq[Int], cName: ArrayBuffer[String] = null): Table
Project onto the columns with the given column positions.
Project onto the columns with the given column positions.
- cPos
the column positions to project onto
- cName
the optional new names for the columns to project onto
- Definition Classes
- Table
- def pi(cName: String*): Table
Project onto the columns with the given column names.
Project onto the columns with the given column names.
- cName
the names of the columns to project onto
- Definition Classes
- Table
- def pisigmaC(cName: String, p: (Complex) => Boolean): Relation
Select elements from column 'cName' in 'this' relation that satisfy the predicate 'p' and project onto that column.
- def pisigmaD(cName: String, p: (Double) => Boolean): Relation
- def pisigmaI(cName: String, p: (Int) => Boolean): Relation
- def pisigmaL(cName: String, p: (Long) => Boolean): Relation
- def pisigmaQ(cName: String, p: (Rational) => Boolean): Relation
- def pisigmaR(cName: String, p: (Real) => Boolean): Relation
- def pisigmaS(cName: String, p: (StrNum) => Boolean): Relation
- def product(r2: Table): Relation
Compute the Cartesian product of this' relation and 'r2' ('this × r2').
- def project(cPos: IndexedSeq[Int], cName: ArrayBuffer[String] = null): Relation
Project onto the columns with the given column positions using the given column names.
- def project(cName: String*): Relation
Project onto the columns with the given column names.
- def rename(newName: String): Relation
Rename 'this' table, returning a shallow copy of 'this' table.
- def reverseOrderBy(_cName: String*): Relation
Order (descending) the rows in the relation by the selected columns '_cName'.
- def rightJoin(cp1: Int, cp2: Int, r2: Relation): Relation
Join 'this' relation and 'r2' by performing a "right join".
Join 'this' relation and 'r2' by performing a "right join". Rows from both relations are compared requiring 'cp1' values to equal 'cp2' values. This method returns all the rows from 'this' relation, and the matched rows from relation 'r2'. It adds a 'null' tuples for the unmatched rows of relation 'r2'
- cp1
the position of the join column of this relation
- cp2
the position of the join column of 'r2' relation
- r2
the rhs relation in the join operation
- def rightJoin(cName1: String, cName2: String, r2: Table): Table
Join 'this' table and 'r2' by performing an "right-join".
Join 'this' table and 'r2' by performing an "right-join". Rows from both tables are compared requiring 'cName1' values to equal 'cName2' values. Disambiguate column names by appending "2" to the end of any duplicate column name. All rows from the right table are maintained with missing values indicators used where needed.
- cName1
the join column names of this table (e.g., the Foreign Key)
- cName2
the join column names of table r2 (e.g., the Primary Key)
- r2
the rhs table in the join operation
- Definition Classes
- Table
- def rightJoinApx(cp1: Int, cp2: Int, r2: Relation): Relation
Join 'this' relation and 'r2' by performing a "right join".
Join 'this' relation and 'r2' by performing a "right join". Rows from both relations are compared requiring 'cp1' values to approximately equal 'cp2' values. This method returns all the rows from 'this' relation, and the matched rows from relation 'r2'. It adds a 'null' tuples for the unmatched rows of relation 'r2'
- cp1
the position of the join column of this relation
- cp2
the position of the join column of 'r2' relation
- r2
the rhs relation in the join operation
- def row(i: Int): Row
Create a row by pulling values from all columns at position 'i'.
- def row(sos: ArrayBuffer[String], _typ: String): Row
Create a row by pulling values from an array of strings and converting elements to their appropriate types.
Create a row by pulling values from an array of strings and converting elements to their appropriate types.
- sos
the sequence of strings holding the values
- _typ
the string of corresponding types, e.g., 'SDI'
- Definition Classes
- Table
- Annotations
- @throws(classOf [Exception])
- def rows: Int
Return the size in terms of number of rows in the relation.
- def save(): Unit
Save 'this' relation in a file using serialization.
- def select[T](cName: String, p: (T) => Boolean)(implicit arg0: ClassTag[T]): Relation
Select elements from columns in 'cName' in 'this' relation that satisfy the predicate 'p'.
- def selectAt(pos: IndexedSeq[Int]): Relation
Select across all columns at the specified column positions.
- def selectC(cName: String, p: (Complex) => Boolean): IndexedSeq[Int]
Select the positions of elements from columns in 'cName' in 'this' relation that satisfy the predicate 'p'.
- def selectD(cName: String, p: (Double) => Boolean): IndexedSeq[Int]
- def selectI(cName: String, p: (Int) => Boolean): IndexedSeq[Int]
- def selectL(cName: String, p: (Long) => Boolean): IndexedSeq[Int]
- def selectQ(cName: String, p: (Rational) => Boolean): IndexedSeq[Int]
- def selectR(cName: String, p: (Real) => Boolean): IndexedSeq[Int]
- def selectS(cName: String, p: (StrNum) => Boolean): IndexedSeq[Int]
- def selectT(cName: String, p: (TimeNum) => Boolean): IndexedSeq[Int]
- def show(limit: Int = Int.MaxValue): Unit
Show 'this' relation row by row.
- def showFk(): Unit
Show 'this' relation's foreign keys.
- def sigma[T](cName: String, p: (T) => Boolean)(implicit arg0: ClassTag[T]): Table
Select elements from columns in 'cName' in 'this' table that satisfy the predicate 'p'.
Select elements from columns in 'cName' in 'this' table that satisfy the predicate 'p'.
- cName
the name of the column used for selection
- p
the predicate (
Boolean
function) to be satisfied
- Definition Classes
- Table
- def sigmaC(cName: String, p: (Complex) => Boolean): Relation
Select elements from columns in 'cName' in 'this' relation that satisfy the predicate 'p'.
- def sigmaD(cName: String, p: (Double) => Boolean): Relation
- def sigmaI(cName: String, p: (Int) => Boolean): Relation
The parellel version of 'selectD'.
The parellel version of 'selectD'. FIX - move to .par package
- cName
column to select on
- p
predicate to select def sigmaDpar (cName: String, p: Double => Boolean): Relation = { val filtercol = new scalation.linalgebra.par.VectorD (col (colMap (cName)).asInstanceOf [VectorD].toArray) selectAt (filtercol.filterPos (p)) } // sigmaDpar
- def sigmaL(cName: String, p: (Long) => Boolean): Relation
- def sigmaQ(cName: String, p: (Rational) => Boolean): Relation
- def sigmaR(cName: String, p: (Real) => Boolean): Relation
- def sigmaS(cName: String, p: (StrNum) => Boolean): Relation
- def sum(cName: String): Any
Return the sum of the values in column 'cName'.
Return the sum of the values in column 'cName'.
- cName
the column name
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toMap(keyColName: ArrayBuffer[String], valColName: String): Map[ArrayBuffer[Any], Any]
Convert the given columns within 'this' relation to a map: 'keyColName' -> 'valColName'.
Convert the given columns within 'this' relation to a map: 'keyColName' -> 'valColName'.
- keyColName
the key column names
- def toMap(keyColPos: ArrayBuffer[Int], valColPos: Int): Map[ArrayBuffer[Any], Any]
Convert the given columns within 'this' relation to a map: 'keyColPos' -> 'valColPos'.
Convert the given columns within 'this' relation to a map: 'keyColPos' -> 'valColPos'.
- keyColPos
the key column positions
- valColPos
the value column positions
- def toMatriD(colPos: ArrayBuffer[Int], kind: MatrixKind = DENSE): MatriD
Convert 'this' relation into a matrix of doubles, e.g.,
- def toMatriD2(colPos: ArrayBuffer[Int] = null, kind: MatrixKind = DENSE): MatriD
Convert 'this' relation into a matrix of double.
Convert 'this' relation into a matrix of double. It will convert strings to double.
in the regression equation: 'xb = y' create matrix 'xy'
- colPos
the column positions to use for the matrix
- kind
the kind of matrix to create
- def toMatriDD(colPos: ArrayBuffer[Int], colPosV: Int, kind: MatrixKind = DENSE): (MatriD, VectorD)
Convert 'this' relation into a matrix of doubles and a vector of doubles.
Convert 'this' relation into a matrix of doubles and a vector of doubles.
in the regression equation: 'xb = y' create matrix 'x' and vector 'y'
- colPos
the column positions to use for the matrix
- colPosV
the column position to use for the vector
- kind
the kind of matrix to create
- def toMatriDI(colPos: ArrayBuffer[Int], colPosV: Int, kind: MatrixKind = DENSE): (MatriD, VectorI)
Convert 'this' relation into a matrix of doubles and a vector of integers.
Convert 'this' relation into a matrix of doubles and a vector of integers.
in the regression equation: 'xb = y' create matrix 'x' and vector 'y'
- colPos
the column positions to use for the matrix
- colPosV
the column position to use for the vector
- kind
the kind of matrix to create
- def toMatriI(colPos: ArrayBuffer[Int], kind: MatrixKind = DENSE): MatriI
Convert 'this' relation into a matrix of integers.
- def toMatriI2(colPos: ArrayBuffer[Int] = null, kind: MatrixKind = DENSE): MatriI
Convert 'this' relation into a matrix of integers.
Convert 'this' relation into a matrix of integers. It will convert doubles and strings to integers.
in the regression equation: 'xb = y' create matrix 'xy'
- colPos
the column positions to use for the matrix
- kind
the kind of matrix to create
- def toMatriII(colPos: ArrayBuffer[Int], colPosV: Int, kind: MatrixKind = DENSE): (MatriI, VectorI)
Convert 'this' relation into a matrix of integers and a vector of integers.
Convert 'this' relation into a matrix of integers and a vector of integers.
in the regression equation: 'xb = y' create matrix 'x' and vector 'y'
- colPos
the column positions to use for the matrix
- colPosV
the column position to use for the vector
- kind
the kind of matrix to create
- def toRleVectorD(colName: String): RleVectorD
Convert the 'colName' column of 'this' relation into a vector of doubles.
Convert the 'colName' column of 'this' relation into a vector of doubles.
- colName
the column name to use for the vector
- def toRleVectorD(colPos: Int = 0): RleVectorD
Convert the 'colPos' column of 'this' relation into a vector of doubles.
Convert the 'colPos' column of 'this' relation into a vector of doubles.
- colPos
the column position to use for the vector
- def toRleVectorI(colName: String): RleVectorI
Convert the 'colName' column of 'this' relation into a vector of integers.
Convert the 'colName' column of 'this' relation into a vector of integers.
- colName
the column name to use for the vector
- def toRleVectorI(colPos: Int = 0): RleVectorI
Convert the 'colPos' column of 'this' relation into a vector of integers.
Convert the 'colPos' column of 'this' relation into a vector of integers.
- colPos
the column position to use for the vector
- def toRleVectorS(colName: String): RleVectorS
Convert the 'colName' column of 'this' relation into a vector of integers.
Convert the 'colName' column of 'this' relation into a vector of integers.
- colName
the column name to use for the vector
- def toRleVectorS(colPos: Int = 0): RleVectorS
Convert the 'colPos' column of 'this' relation into a vector of integers.
Convert the 'colPos' column of 'this' relation into a vector of integers.
- colPos
the column position to use for the vector
- def toString(): String
Convert 'this' relation into a string column by column.
Convert 'this' relation into a string column by column.
- Definition Classes
- Relation → AnyRef → Any
- def toVectorC(colName: String): VectorC
Convert the 'colName' column of 'this' relation into a vector of complex numbers.
- def toVectorC(colPos: Int = 0): VectorC
Convert the 'colPos' column of 'this' relation into a vector of complex numbers.
- def toVectorD(colName: String): VectorD
Convert the 'colName' column of 'this' relation into a vector of doubles.
- def toVectorD(colPos: Int = 0): VectorD
Convert the 'colPos' column of 'this' relation into a vector of doubles.
- def toVectorI(colName: String): VectorI
Convert the 'colName' column of 'this' relation into a vector of integers.
- def toVectorI(colPos: Int = 0): VectorI
Convert the 'colPos' column of 'this' relation into a vector of integers.
- def toVectorL(colName: String): VectorL
Convert the 'colName' column of 'this' relation into a vector of long integers.
- def toVectorL(colPos: Int = 0): VectorL
Convert the 'colPos' column of 'this' relation into a vector of long integers.
- def toVectorQ(colName: String): VectorQ
Convert the 'colName' column of 'this' relation into a vector of rational numbers.
- def toVectorQ(colPos: Int = 0): VectorQ
Convert the 'colPos' column of 'this' relation into a vector of rational numbers.
- def toVectorR(colName: String): VectorR
Convert the 'colName' column of 'this' relation into a vector of real number.
- def toVectorR(colPos: Int = 0): VectorR
Convert the 'colPos' column of 'this' relation into a vector of real number.
- def toVectorS(colName: String): VectorS
Convert the 'colName' column of 'this' relation into a vector of string-num.
- def toVectorS(colPos: Int = 0): VectorS
Convert the 'colPos' column of 'this' relation into a vector of string-num.
- def toVectorT(colName: String): VectorT
Convert the 'colName' column of 'this' relation into a vector of time-num.
- def toVectorT(colPos: Int = 0): VectorT
Convert the 'colPos' column of 'this' relation into a vector of time-num.
- def uncompress(cName: String*): Unit
Uncompress the selected columns 'cName' in 'this' table.
- def union(r2: Table): Relation
Union 'this' relation and 'r2'.
- def uniq_union(cn1: ArrayBuffer[String], cn2: ArrayBuffer[String]): ArrayBuffer[String]
Combine two sequences of column names, keeping all names from 'cn1' and only those in 'cn2' that are not repeats (i.e., not already in 'cn1').
Combine two sequences of column names, keeping all names from 'cn1' and only those in 'cn2' that are not repeats (i.e., not already in 'cn1').
- cn1
the first sequence of column names
- cn2
the second sequence of column names
- Attributes
- protected
- Definition Classes
- Table
- def update[T](cName: String, func: (T) => T, pred: (T) => Boolean): Unit
Update the column named 'cName' using function 'func' for elements where the predicate 'pred' evaluates to true.
Update the column named 'cName' using function 'func' for elements where the predicate 'pred' evaluates to true.
- T
type of the column
- cName
the name of the column to be updated
- func
the function used to assign updated values
- pred
the predicated used to select elements for update
- def update[T](cName: String, func: (T) => T, matchVal: T): Unit
Update the column named 'cName' using function 'func' for elements with value 'matchStr'.
- def update[T](cName: String, newVal: T, matchVal: T): Unit
Update the column named 'cName' using function 'func' for elements with value 'matchStr'.
- def variance(cName: String): Any
Return the variance of the values in column 'cName'.
Return the variance of the values in column 'cName'.
- cName
the column name
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- def writeCSV(fileName: String): Unit
Write 'this' relation into a CSV file with each row written to a line.
- def writeJSON(fileName: String): Unit
Write 'this' relation into a JSON file.
- def ×(r2: Table): Table
Compute the Cartesian product of 'this' table and 'r2' ('this × r2').
Compute the Cartesian product of 'this' table and 'r2' ('this × r2').
- r2
the second table
- Definition Classes
- Table
- def Π(aggCol: AggColumn*)(cName: String*): Table
Aggregate/project on the given columns (an extended projection operator that applies aggregate operators to aggregation columns and regular projection to projection columns).
Aggregate/project on the given columns (an extended projection operator that applies aggregate operators to aggregation columns and regular projection to projection columns).
- aggCol
the columns to aggregate on: (aggregate function, new column name, old column name)*
- cName
the other columns to project on
- Definition Classes
- Table
- See also
en.wikipedia.org/wiki/Relational_algebra
- def γ(cName: String*): Table
Group 'this' table by specified column names, returning 'this' table.
Group 'this' table by specified column names, returning 'this' table.
- cName
group columns
- Definition Classes
- Table
- def ζ(cName: String*): Unit
Compress the selected columns 'cName' in 'this' table.
Compress the selected columns 'cName' in 'this' table.
- cName
the names of the columns to be compressed
- Definition Classes
- Table
- def ζζ(cName: String*): Unit
Uncompress the selected columns 'cName' in 'this' table.
Uncompress the selected columns 'cName' in 'this' table.
- cName
the names of the columns to be uncompressed
- Definition Classes
- Table
- def π(cPos: IndexedSeq[Int], cName: ArrayBuffer[String] = null): Table
Project onto the columns with the given column positions.
Project onto the columns with the given column positions.
- cPos
the column positions to project onto
- cName
the optional new names for the columns to project onto
- Definition Classes
- Table
- def π(cName: String*): Table
Project onto the columns with the given column names.
Project onto the columns with the given column names.
- cName
the names of the columns to project onto
- Definition Classes
- Table
- def σ[T](cName: String, p: (T) => Boolean)(implicit arg0: ClassTag[T]): Table
Select elements from columns in 'cName' in 'this' table that satisfy the predicate 'p'.
Select elements from columns in 'cName' in 'this' table that satisfy the predicate 'p'.
- cName
the name of the column used for selection
- p
the predicate (
Boolean
function) to be satisfied
- Definition Classes
- Table
- def ω(cName: String*): Table
Order (ascending) the rows in the table by the selected columns 'cName'.
Order (ascending) the rows in the table by the selected columns 'cName'. A stable sorting is used to allow sorting on multiple columns.
- cName
the column names that are to be sorted
- Definition Classes
- Table
- def ωω(cName: String*): Table
Order (descending) the rows in the table by the selected columns 'cName'.
Order (descending) the rows in the table by the selected columns 'cName'. A stable sorting is used to allow sorting on multiple columns.
- cName
the column names that are to be sorted
- Definition Classes
- Table
- def ⋂(r2: Table): Table
Intersect 'this' table and 'r2'.
Intersect 'this' table and 'r2'. Check that the two tables are compatible.
- r2
the other table
- Definition Classes
- Table
- def ⋃(r2: Table): Table
Union 'this' table and 'r2'.
Union 'this' table and 'r2'. Check that the two tables are compatible.
- r2
the other table
- Definition Classes
- Table
- def ⋈[T](r2: Table, p0: Predicate2[T], p: Predicate2[T]*): Table
The theta join, handle the predicates in where are connect by "and" (where a....and b....).
The theta join, handle the predicates in where are connect by "and" (where a....and b....).
- r2
the second table
- p0
the first theta join predicate (r1 cName, r2 cName, predicate to compare these two column)
- p
the rest of theta join predicates (r1 cName, r2 cName, predicates to compare these two column)
- Definition Classes
- Table
- def ⋈(cNames1: ArrayBuffer[String], cNames2: ArrayBuffer[String], r2: Table): Table
Join 'this' table and 'r2' by performing an "equi-join".
Join 'this' table and 'r2' by performing an "equi-join". Rows from both tables are compared requiring 'cName1' values to equal 'cName2' values. Disambiguate column names by appending "2" to the end of any duplicate column name.
- cNames1
the join column names of this table (e.g., the Foreign Key)
- cNames2
the join column names of table r2 (e.g., the Primary Key)
- r2
the rhs table in the join operation
- Definition Classes
- Table
- def ⋈(cName1: String, cName2: String, r2: Table): Table
Join 'this' table and 'r2' by performing an "equi-join".
Join 'this' table and 'r2' by performing an "equi-join". Rows from both tables are compared requiring 'cName1' values to equal 'cName2' values. Disambiguate column names by appending "2" to the end of any duplicate column name.
- cName1
the join column name of this table (e.g., the Foreign Key)
- cName2
the join column name of table r2 (e.g., the Primary Key)
- r2
the rhs table in the join operation
- Definition Classes
- Table
- def ⋈(cNames: ArrayBuffer[String], r2: Table): Table
Join 'this' table and 'r2' by performing a "natural-join".
Join 'this' table and 'r2' by performing a "natural-join". Rows from both tables are compared requiring 'cName' values to be equal.
- cNames
the common join column names for both table
- r2
the rhs table in the join operation
- Definition Classes
- Table
- def ⋈(cName: String, r2: Table): Table
Join 'this' table and 'r2' by performing a "natural-join".
Join 'this' table and 'r2' by performing a "natural-join". Rows from both tables are compared requiring 'cName' values to be equal.
- cName
the common join column name for both table
- r2
the rhs table in the join operation
- Definition Classes
- Table
- def ⋈(r2: Table): Table
Join 'this' table and 'r2' by performing a "natural-join".
Join 'this' table and 'r2' by performing a "natural-join". Rows from both tables are compared requiring agreement on common attributes (column names).
- r2
the rhs table in the join operation
- Definition Classes
- Table
- def ⋉(thres: Double = 0.01)(cName1: String, cName2: String, r2: Table): Table
Join 'this' table and 'r2' by performing an "apprimate left-join".
Join 'this' table and 'r2' by performing an "apprimate left-join". Rows from both tables are compared requiring 'cName1' values to apprximately equal 'cName2' values. Disambiguate column names by appending "2" to the end of any duplicate column name. All rows from the left table are maintained with missing values indicators used where needed.
- cName1
the join column names of this table (e.g., the Foreign Key)
- cName2
the join column names of table r2 (e.g., the Primary Key)
- r2
the rhs table in the join operation
- Definition Classes
- Table
- def ⋉(cName1: String, cName2: String, r2: Table): Table
Join 'this' table and 'r2' by performing an "left-join".
Join 'this' table and 'r2' by performing an "left-join". Rows from both tables are compared requiring 'cName1' values to equal 'cName2' values. Disambiguate column names by appending "2" to the end of any duplicate column name. All rows from the left table are maintained with missing values indicators used where needed. Note: although this is the semi-join symbol, due to Unicode limitations, it is used for left-join.
- cName1
the join column names of this table (e.g., the Foreign Key)
- cName2
the join column names of table r2 (e.g., the Primary Key)
- r2
the rhs table in the join operation
- Definition Classes
- Table
- def ⋊(cName1: String, cName2: String, r2: Table): Table
Join 'this' table and 'r2' by performing an "right-join".
Join 'this' table and 'r2' by performing an "right-join". Rows from both tables are compared requiring 'cName1' values to equal 'cName2' values. Disambiguate column names by appending "2" to the end of any duplicate column name. All rows from the right table are maintained with missing values indicators used where needed.
- cName1
the join column names of this table (e.g., the Foreign Key)
- cName2
the join column names of table r2 (e.g., the Primary Key)
- r2
the rhs table in the join operation
- Definition Classes
- Table
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated