trait Table extends AnyRef
The Table
trait 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
- Alphabetic
- By Inheritance
- Table
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
-(r2: Table): Table
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.
- r2
the other relation
-
abstract
def
><(r2: Table): Table
Join 'this' relation and 'r2 by performing a "natural-join".
Join 'this' relation and 'r2 by performing a "natural-join". Rows from both relations are compared requiring agreement on common attributes (column names).
- r2
the rhs relation in the join operation
-
abstract
def
add(tuple: Row): Unit
Add 'tuple to 'this' relation as a new row.
Add 'tuple to 'this' relation as a new row. FIX: want an efficient, covariant, mutable data structure, but
Array
is invariant.- tuple
an aggregation of columns values (new row)
-
abstract
def
cols: Int
Return the size in terms of number of columns in the relation.
-
abstract
def
contains(tuple: Row): Boolean
Determine whether 'this' relation contains a row matching the given 'tuple'.
Determine whether 'this' relation contains a row matching the given 'tuple'.
- tuple
an aggregation of columns values (potential row)
-
abstract
def
incompatible(r2: Table): Boolean
Determine whether 'this' relation and 'r2' are incompatible by having differing numbers of columns or differing domain strings.
Determine whether 'this' relation and 'r2' are incompatible by having differing numbers of columns or differing domain strings.
- r2
the other relation
-
abstract
def
intersect(r2: Table): Table
Intersect 'this' relation and 'r2'.
Intersect 'this' relation and 'r2'. Check that the two relations are compatible.
- r2
the other relation
-
abstract
def
join(cName: Seq[String], r2: Table): Table
Join 'this' relation and 'r2 by performing a "natural-join".
Join 'this' relation and 'r2 by performing a "natural-join". Rows from both relations are compared requiring 'cName' values to be equal.
- cName
the common join column names for both relation
- r2
the rhs relation in the join operation
-
abstract
def
join(cName1: String, cName2: String, r2: Table): Table
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 string of join column names of this relation (e.g., the Foreign Key)
- cName2
the string of join column names of relation r2 (e.g., the Primary Key)
- r2
the rhs relation in the join operation
-
abstract
def
join(cName1: Seq[String], cName2: Seq[String], r2: Table): Table
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
-
abstract
def
pi(cPos: Seq[Int], cName: Seq[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
-
abstract
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
-
abstract
def
pisigmaC(cName: String, p: (Complex) ⇒ Boolean): Table
Select elements from column 'cName' in 'this' relation that satisfy the predicate 'p' and project onto that column.
Select elements from column 'cName' in 'this' relation that satisfy the predicate 'p' and project onto that column.
- cName
the name of the column used for selection
- p
the predicate (
Boolean
function) to be satisfied
- abstract def pisigmaD(cName: String, p: (Double) ⇒ Boolean): Table
- abstract def pisigmaI(cName: String, p: (Int) ⇒ Boolean): Table
- abstract def pisigmaL(cName: String, p: (Long) ⇒ Boolean): Table
- abstract def pisigmaQ(cName: String, p: (Rational) ⇒ Boolean): Table
- abstract def pisigmaR(cName: String, p: (Real) ⇒ Boolean): Table
- abstract def pisigmaS(cName: String, p: (StrNum) ⇒ Boolean): Table
-
abstract
def
row(i: Int): Row
Create a row by pulling values from all columns at position 'i'.
Create a row by pulling values from all columns at position 'i'.
- i
the 'i'th position
-
abstract
def
rows: Int
Return the size in terms of number of rows in the relation.
-
abstract
def
save(): Unit
Save 'this' relation in a file using serialization.
-
abstract
def
selectAt(pos: Seq[Int]): Table
Select across all columns at the specified column positions.
Select across all columns at the specified column positions.
- pos
the specified column positions
-
abstract
def
selectC(cName: String, p: (Complex) ⇒ Boolean): Seq[Int]
Select the positions of elements from columns in 'cName' in 'this' relation that satisfy the predicate 'p'.
Select the positions of elements from columns in 'cName' in 'this' relation that satisfy the predicate 'p'.
- cName
the name of the column used for selection
- p
the predicate (
Boolean
function) to be satisfied
- abstract def selectD(cName: String, p: (Double) ⇒ Boolean): Seq[Int]
- abstract def selectI(cName: String, p: (Int) ⇒ Boolean): Seq[Int]
- abstract def selectL(cName: String, p: (Long) ⇒ Boolean): Seq[Int]
- abstract def selectQ(cName: String, p: (Rational) ⇒ Boolean): Seq[Int]
- abstract def selectR(cName: String, p: (Real) ⇒ Boolean): Seq[Int]
- abstract def selectS(cName: String, p: (StrNum) ⇒ Boolean): Seq[Int]
-
abstract
def
show(): Unit
Show 'this' relation row by row.
-
abstract
def
sigma[T](cName: String, p: (T) ⇒ Boolean): Table
Select elements from columns in 'cName' in 'this' relation that satisfy the predicate 'p'.
Select elements from columns in 'cName' in 'this' relation that satisfy the predicate 'p'.
- cName
the name of the column used for selection
- p
the predicate (
Boolean
function) to be satisfied
-
abstract
def
sigmaC(cName: String, p: (Complex) ⇒ Boolean): Table
Select elements from columns in 'cName' in 'this' relation that satisfy the predicate 'p'.
Select elements from columns in 'cName' in 'this' relation that satisfy the predicate 'p'.
- cName
the name of the column used for selection
- p
the predicate (
Boolean
function) to be satisfied
- abstract def sigmaD(cName: String, p: (Double) ⇒ Boolean): Table
- abstract def sigmaI(cName: String, p: (Int) ⇒ Boolean): Table
- abstract def sigmaL(cName: String, p: (Long) ⇒ Boolean): Table
- abstract def sigmaQ(cName: String, p: (Rational) ⇒ Boolean): Table
- abstract def sigmaR(cName: String, p: (Real) ⇒ Boolean): Table
- abstract def sigmaS(cName: String, p: (StrNum) ⇒ Boolean): Table
-
abstract
def
union(r2: Table): Table
Union 'this' relation and 'r2'.
Union 'this' relation and 'r2'. Check that the two relations are compatible.
- r2
the other relation
-
abstract
def
writeCSV(fileName: String): Unit
Write 'this' relation into a CSV file with each row written to a line.
Write 'this' relation into a CSV file with each row written to a line.
- fileName
the file name of the data file
-
abstract
def
writeJSON(fileName: String): Unit
Write 'this' relation into a JSON file.
Write 'this' relation into a JSON file.
- fileName
the file name of the data file
-
abstract
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
-
abstract
def
σ[T](cName: String, p: (T) ⇒ Boolean): Table
Select elements from columns in 'cName' in 'this' relation that satisfy the predicate 'p'.
Select elements from columns in 'cName' in 'this' relation that satisfy the predicate 'p'.
- cName
the name of the column used for selection
- p
the predicate (
Boolean
function) to be satisfied
-
abstract
def
⋂(r2: Table): Table
Intersect 'this' relation and 'r2'.
Intersect 'this' relation and 'r2'. Check that the two relations are compatible.
- r2
the other relation
-
abstract
def
⋃(r2: Table): Table
Union 'this' relation and 'r2'.
Union 'this' relation and 'r2'. Check that the two relations are compatible.
- r2
the other relation
-
abstract
def
⋈(r2: Table): Table
Join 'this' relation and 'r2 by performing a "natural-join".
Join 'this' relation and 'r2 by performing a "natural-join". Rows from both relations are compared requiring agreement on common attributes (column names).
- r2
the rhs relation in the join operation
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
disambiguate(cn1: Seq[String], cn2: Seq[String]): Seq[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
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
indices: Range
Return the range of index values for the relation.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
row(sos: Seq[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'
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
uniq_union(cn1: Seq[String], cn2: Seq[String]): Seq[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
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )