Packages

object Relation extends Error with Serializable

The Relation companion object provides additional functions for the Relation class. FIX - apply methods - make compatible with RelationSQL

Linear Supertypes
Serializable, Error, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Relation
  2. Serializable
  3. Error
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def apply(fileName: String, key: Int, domain: String): Relation

    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'.

    fileName

    the file name of the data file

    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')

  5. def apply(fileName: String, name: String, colName: ArrayBuffer[String], key: Int, domain: String): Relation

    Read the relation with the given 'name' into memory loading its columns with data from the CSV file named 'fileName'.

    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).

    fileName

    the file name of the data file

    name

    the name of the relation

    colName

    the names of columns

    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')

  6. def apply(fileName: String, name: String, domain: String, key: Int, eSep: String = ","): Relation

    Read the relation with the given 'name' into memory loading its columns with data from the CSV file named 'fileName'.

    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 ReArray, and maintains indices.

    fileName

    the file name of the data file

    name

    the name of the relation

    domain

    an optional string indicating domains for columns (e.g., 'SD' = 'StrNum', 'Double')

    key

    the column number for the primary key (< 0 => no primary key)

    eSep

    the element separation string/regex (e.g., "," ";" " +")

  7. def apply(fileName: String, name: String, key: Int, domain: String, eSep: String, cPos: ArrayBuffer[Int]): Relation

    Read the relation with the given 'name' into memory loading its columns with data from the CSV file named 'fileName'.

    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.

    fileName

    the file name of the data file

    name

    the name of the 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')

    eSep

    the element separation string/regex (e.g., "," ";" " +")

    cPos

    the sequence of column positions in the input file to be used (null => select all)

  8. def apply(fileName: String, name: String, colName: ArrayBuffer[String], key: Int, domain: String, skip: Int, eSep: String): Relation

    Read the relation with the given 'name' into memory loading its columns with data from the CSV file named 'fileName'.

    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 "onethree" -> "one","",three"

    fileName

    the file name of the data file

    name

    the name of the relation

    colName

    the names of columns

    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')

    skip

    the number of lines in the CSV file to skip (e.g., header line(s))

    eSep

    the element separation string/regex (e.g., "," ";" " +")

  9. def apply(name: String): Relation

    Read the relation with the given 'name' into memory using serialization.

    Read the relation with the given 'name' into memory using serialization.

    name

    the name of the relation to load

  10. def apply(name: String, colName: ArrayBuffer[String], row: ArrayBuffer[Row], key: Int): Relation

    Create a relation from a sequence of row/tuples.

    Create a relation from a sequence of row/tuples. These rows must be converted to columns.

    name

    the name of the relation

    colName

    the names of columns

    row

    the sequence of rows to be converted to columns for the columnar relation

    key

    the column number for the primary key (< 0 => no primary key)

  11. def apply(name: String, colName: ArrayBuffer[String], row: ArrayBuffer[Row], key: Int, domain: String): Relation

    Create a relation from a sequence of row/tuples.

    Create a relation from a sequence of row/tuples. These rows must be converted to columns.

    name

    the name of the relation

    colName

    the names of columns

    row

    the sequence of rows to be converted to columns for 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')

  12. def apply(name: String, key: Int, domain: String, colName: ArrayBuffer[String]): Relation

    Create an unpopulated relation.

    Create an unpopulated relation.

    name

    the name of the 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')

    colName

    the names of columns

  13. def apply(name: String, key: Int, domain: String, colName: String*): Relation

    Create an unpopulated relation.

    Create an unpopulated relation.

    name

    the name of the 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')

    colName

    the names of columns

  14. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  15. def avg(r: Relation, cName: String): Vec

    Get a Vec of average of the 'cName' column for the 'r' relation.

    Get a Vec of average of the 'cName' column for the 'r' relation.

    r

    the relation you want to operate on

    cName

    average on column "cName"

  16. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  17. def corr(r: Relation, i: Int = 0, j: Int = 1): Double

    Compute the correlation of column 'i' and 'j' within columnar relation 'r'.

    Compute the correlation of column 'i' and 'j' within columnar relation 'r'.

    r

    the given relation

    i

    the first column vector

    j

    the second column vector

  18. def count(r: Relation, cName: String): Vec

    Get a Vec of count of the 'cName' column for the 'r' relation.

    Get a Vec of count of the 'cName' column for the 'r' relation.

    r

    the relation you want to operate on

    cName

    the column name for the column to be counted

  19. def count(r: Relation): IndexedSeq[Int]

    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'.

    r

    the given relation

  20. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  22. final def flaw(method: String, message: String): Unit
    Definition Classes
    Error
  23. def from(relations: Relation*): Relation

    From function return cartesian product of all the relations.

    From function return cartesian product of all the relations.

    relations

    the relations making up the from clause

  24. def fromMatriD(xy: MatriD, name: String, colName: ArrayBuffer[String], key: Int = -1, domain: String = null): Relation

    Create a relation from the 'xy' matrix of doubles.

    Create a relation from the 'xy' matrix of doubles.

    xy

    the matrix containing the data

    name

    the name of the relation

    colName

    the names of columns

    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')

  25. def fromMatriD_(x: MatriD, y: Vec, name: String, colName: ArrayBuffer[String], key: Int = -1, domain: String = null): Relation

    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.

    x

    the matrix containing the data

    y

    the vector containing the data

    name

    the name of the relation

    colName

    the names of columns

    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')

  26. def fromMatriI(xy: MatriI, name: String, colName: ArrayBuffer[String], key: Int = -1, domain: String = null): Relation

    Create a relation from the 'xy' matrix of integers.

    Create a relation from the 'xy' matrix of integers.

    xy

    the matrix containing the data

    name

    the name of the relation

    colName

    the names of columns

    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')

  27. def fromMatriII(x: MatriI, y: VectorI, name: String, colName: ArrayBuffer[String], key: Int = -1, domain: String = null): Relation

    Create a relation from the 'xy' matrix of integers and 'y' vector of integers.

    Create a relation from the 'xy' matrix of integers and 'y' vector of integers.

    x

    the matrix containing the data

    y

    the vector containing the data

    name

    the name of the relation

    colName

    the names of columns

    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')

  28. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  29. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  30. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  31. def max(r: Relation, cName: String): Vec

    Get a Vec of max of the 'cName' column for the 'r' relation.

    Get a Vec of max of the 'cName' column for the 'r' relation.

    r

    the relation you want to operate on

    cName

    max on column "cName"

  32. def max(r: Relation): IndexedSeq[Any]

    Return the maximum of each of the columns of columnar relation 'r'.

    Return the maximum of each of the columns of columnar relation 'r'.

    r

    the given relation

  33. def mean(r: Relation): IndexedSeq[Any]

    Compute the mean of each of the columns of columnar relation 'r'.

    Compute the mean of each of the columns of columnar relation 'r'.

    r

    the given relation

  34. def min(r: Relation, cName: String): Vec

    Get a Vec of min of the 'cName' column for the 'r' relation

    Get a Vec of min of the 'cName' column for the 'r' relation

    r

    the relation you want to operate on

    cName

    min on column "cName"

  35. def min(r: Relation): IndexedSeq[Any]

    Return the minimum of each of the columns of columnar relation 'r'.

    Return the minimum of each of the columns of columnar relation 'r'.

    r

    the given relation

  36. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  37. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  38. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  39. def sum(r: Relation, cName: String): Vec

    Get a Vec of sum of the 'cName' column for the 'r' relation base on each group, the result will be the same size.

    Get a Vec of sum of the 'cName' column for the 'r' relation base on each group, the result will be the same size.

    r

    the relation to operate on

    cName

    sum on column "cName"

  40. def sum(r: Relation): IndexedSeq[Any]

    Compute the mean of each of the columns of columnar relation 'r'.

    Compute the mean of each of the columns of columnar relation 'r'.

    r

    the given relation

  41. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  42. def toString(): String
    Definition Classes
    AnyRef → Any
  43. def variance(r: Relation): IndexedSeq[Any]

    Compute the variance of each of the columns of columnar relation 'r'.

    Compute the variance of each of the columns of columnar relation 'r'.

    r

    the given relation

  44. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  45. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  46. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  47. def Ɛ(r: Relation): IndexedSeq[Any]

    Compute the mean of each of the columns of columnar relation 'r'.

    Compute the mean of each of the columns of columnar relation 'r'.

    r

    the given relation

  48. def Ʋ(r: Relation): IndexedSeq[Any]

    Compute the variance of each of the columns of columnar relation 'r'.

    Compute the variance of each of the columns of columnar relation 'r'.

    r

    the given relation

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from Serializable

Inherited from Error

Inherited from AnyRef

Inherited from Any

Ungrouped