BIDMat

MatFunctions

object MatFunctions

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MatFunctions
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

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. final val ?: IMatWildcard

  5. def DDS(a: Mat, b: Mat, c: Mat, omat: Mat = null): Mat

  6. def DDS(a: GDMat, b: GDMat, c: GDMat): GDMat

  7. def DDS(a: GMat, b: GMat, c: GMat): GMat

  8. def DDS(a: FMat, b: FMat, c: FMat): FMat

  9. def DDS(a: GMat, b: GMat, c: GSMat): GSMat

  10. def DDS(a: GMat, b: GMat, c: GSMat, omat: Mat): GSMat

  11. def DDS(a: FMat, b: FMat, c: SMat): SMat

  12. def DDS(a: FMat, b: FMat, c: SMat, omat: Mat): SMat

  13. def DDSQ(a: FMat, b: FMat, c: SMat, veps: Float): SMat

  14. def DDShelper(a: FMat, b: FMat, c: SMat, out: SMat, istart: Int, iend: Int, ioff: Int): Unit

  15. def _maxi(a: IMat): IMat

  16. def _sortlex(mat: IMat, asc: Boolean): Unit

  17. def _sortlexInds(mat: IMat, inds: IMat, asc: Boolean): Unit

  18. def accum(inds: Mat, ival: Int, nrows: Int, ncols: Int): Mat

    Accumulate (row, col, ival) tuples from inds (generic version).

    Accumulate (row, col, ival) tuples from inds (generic version). nr and nc are row and column bounds

  19. def accum(inds: Mat, ival: Int, omat: Mat, nrows: Int, ncols: Int): Mat

    Accumulate (row, col, ival) tuples from inds (generic version) into omat.

    Accumulate (row, col, ival) tuples from inds (generic version) into omat. nr and nc are row and column bounds

  20. def accum(inds: Mat, fval: Float, nrows: Int, ncols: Int): Mat

    Accumulate (row, col, fval) tuples from inds (generic version).

    Accumulate (row, col, fval) tuples from inds (generic version). nr and nc are row and column bounds

  21. def accum(inds: Mat, fval: Float, omat: Mat, nrows: Int, ncols: Int): Mat

    Accumulate (row, col, fval) tuples from inds (generic version) into omat.

    Accumulate (row, col, fval) tuples from inds (generic version) into omat. nr and nc are row and column bounds

  22. def accum(inds: Mat, vals: Mat, nrows: Int, ncols: Int): Mat

    Accumulate (row, col, value) tuples from inds \\ vals (generic version).

    Accumulate (row, col, value) tuples from inds \\ vals (generic version). nr and nc are row and column bounds

  23. def accum(inds: Mat, vals: Mat, omat: Mat, nrows: Int, ncols: Int): Mat

    Accumulate (row, col, value) tuples from inds \\ vals (generic version) into omat.

    Accumulate (row, col, value) tuples from inds \\ vals (generic version) into omat. nr and nc are row and column bounds

  24. def accum(inds: GIMat, fval: Int, nrows: Int, ncols: Int): GIMat

    Accumulate (row, col, fval) tuples from inds.

    Accumulate (row, col, fval) tuples from inds. nr and nc are row and column bounds

  25. def accum(inds: GIMat, fval: Int, omat: Mat, nrows: Int, ncols: Int): GIMat

    Accumulate (row, col, fval) tuples from inds into omat.

    Accumulate (row, col, fval) tuples from inds into omat. nr and nc are row and column bounds

  26. def accum(inds: GIMat, vals: GIMat, nrows: Int, ncols: Int): GIMat

    Accumulate (row, col, value) tuples from inds \\ vals.

    Accumulate (row, col, value) tuples from inds \\ vals. nr and nc are row and column bounds

  27. def accum(inds: GIMat, vals: GIMat, omat: Mat, nrows: Int, ncols: Int): GIMat

    Accumulate (row, col, value) tuples from inds \\ vals into omat.

    Accumulate (row, col, value) tuples from inds \\ vals into omat. nr and nc are row and column bounds

  28. def accum(inds: GIMat, fval: Float, nrows: Int, ncols: Int): GMat

    Accumulate (row, col, fval) tuples from inds.

    Accumulate (row, col, fval) tuples from inds. nr and nc are row and column bounds

  29. def accum(inds: GIMat, fval: Float, omat: Mat, nrows: Int, ncols: Int): GMat

    Accumulate (row, col, fval) tuples from inds into omat.

    Accumulate (row, col, fval) tuples from inds into omat. nr and nc are row and column bounds

  30. def accum(inds: GIMat, vals: GMat, nrows: Int, ncols: Int): GMat

    Accumulate (row, col, value) tuples from inds \\ vals.

    Accumulate (row, col, value) tuples from inds \\ vals. nr and nc are row and column bounds

  31. def accum(inds: GIMat, vals: GMat, omat: Mat, nrows: Int, ncols: Int): GMat

    Accumulate (row, col, value) tuples from inds \\ vals into omat.

    Accumulate (row, col, value) tuples from inds \\ vals into omat. nr and nc are row and column bounds

  32. def accum(inds: IMat, v: Long): LMat

    Accumulate (row, value) tuples from inds \\ vals.

    Accumulate (row, value) tuples from inds \\ vals. inds can be a vector or two-column matrix

  33. def accum(inds: IMat, v: Long, nr: Int): LMat

    Accumulate (row, col, value) tuples from inds \\ vals.

    Accumulate (row, col, value) tuples from inds \\ vals. nr is row and bounds, ncols = 1

  34. def accum(inds: IMat, v: Long, nr: Int, nc: Int): LMat

    Accumulate (row, col, value) tuples from inds \\ vals.

    Accumulate (row, col, value) tuples from inds \\ vals. nr and nc are row and column bounds

  35. def accum(inds: IMat, vals: LMat): LMat

    Accumulate (row, value) tuples from inds \\ vals.

    Accumulate (row, value) tuples from inds \\ vals. inds can be a vector or two-column matrix

  36. def accum(inds: IMat, vals: LMat, nr: Int): LMat

    Accumulate (row, col, value) tuples from inds \\ vals.

    Accumulate (row, col, value) tuples from inds \\ vals. nr is row and bounds, ncols = 1

  37. def accum(inds: IMat, vals: LMat, nr: Int, nc: Int): LMat

    Accumulate (row, col, value) tuples from inds \\ vals.

    Accumulate (row, col, value) tuples from inds \\ vals. nr and nc are row and column bounds

  38. def accum(inds: IMat, v: Int): IMat

    Accumulate (row, value) tuples from inds \\ vals.

    Accumulate (row, value) tuples from inds \\ vals. inds can be a vector or two-column matrix

  39. def accum(inds: IMat, v: Int, nr: Int): IMat

    Accumulate (row, col, value) tuples from inds \\ vals.

    Accumulate (row, col, value) tuples from inds \\ vals. nr is row and bounds, ncols = 1

  40. def accum(inds: IMat, v: Int, nr: Int, nc: Int): IMat

    Accumulate (row, col, value) tuples from inds \\ vals.

    Accumulate (row, col, value) tuples from inds \\ vals. nr and nc are row and column bounds

  41. def accum(inds: IMat, vals: IMat): IMat

    Accumulate (row, value) tuples from inds \\ vals.

    Accumulate (row, value) tuples from inds \\ vals. inds can be a vector or two-column matrix

  42. def accum(inds: IMat, vals: IMat, nr: Int): IMat

    Accumulate (row, col, value) tuples from inds \\ vals.

    Accumulate (row, col, value) tuples from inds \\ vals. nr is row and bounds, ncols = 1

  43. def accum(inds: IMat, vals: IMat, nr: Int, nc: Int): IMat

    Accumulate (row, col, value) tuples from inds \\ vals.

    Accumulate (row, col, value) tuples from inds \\ vals. nr and nc are row and column bounds

  44. def accum(inds: IMat, v: Float): FMat

    Accumulate (row, value) tuples from inds \\ vals.

    Accumulate (row, value) tuples from inds \\ vals. Inds can be a vector or two-column matrix

  45. def accum(inds: IMat, v: Float, nr: Int): FMat

    Accumulate (row, col, value) tuples from inds \\ vals.

    Accumulate (row, col, value) tuples from inds \\ vals. nr is row and bounds, ncols = 1

  46. def accum(inds: IMat, v: Float, nr: Int, nc: Int): FMat

    Accumulate (row, col, value) tuples from inds \\ vals.

    Accumulate (row, col, value) tuples from inds \\ vals. nr and nc are row and column bounds

  47. def accum(inds: IMat, vals: FMat): FMat

    Accumulate (row, value) tuples from inds \\ vals.

    Accumulate (row, value) tuples from inds \\ vals. Inds can be a vector or two-column matrix

  48. def accum(inds: IMat, vals: FMat, nr: Int): FMat

    Accumulate (row, col, value) tuples from inds \\ vals.

    Accumulate (row, col, value) tuples from inds \\ vals. nr is row and bounds, ncols = 1

  49. def accum(inds: IMat, vals: FMat, nr: Int, nc: Int): FMat

    Accumulate (row, col, value) tuples from inds \\ vals.

    Accumulate (row, col, value) tuples from inds \\ vals. nr and nc are row and column bounds

  50. def accum(inds: IMat, v: Double): DMat

    Accumulate (row, value) tuples from inds \\ vals.

    Accumulate (row, value) tuples from inds \\ vals. inds can be a vector or two-column matrixs

  51. def accum(inds: IMat, v: Double, nr: Int): DMat

    Accumulate (row, value) tuples from inds \\ vals.

    Accumulate (row, value) tuples from inds \\ vals. nr is row bound. Assumes 1 column

  52. def accum(inds: IMat, v: Double, nr: Int, nc: Int): DMat

    Accumulate (row, col, value) tuples from inds \\ vals.

    Accumulate (row, col, value) tuples from inds \\ vals. nr and nc are row and column bounds

  53. def accum(inds: IMat, vals: DMat): DMat

    Accumulate (row, value) tuples from inds \\ vals.

    Accumulate (row, value) tuples from inds \\ vals. inds can be a vector or two-column matrix

  54. def accum(inds: IMat, vals: DMat, nr: Int): DMat

    Accumulate (row, value) tuples from inds \\ vals.

    Accumulate (row, value) tuples from inds \\ vals. nr is row bound. Assumes 1 column

  55. def accum(inds: IMat, vals: DMat, nr: Int, nc: Int): DMat

    Accumulate (row, col, value) tuples from inds \\ vals.

    Accumulate (row, col, value) tuples from inds \\ vals. nr and nc are row and column bounds

  56. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  57. def blank: Mat

    Legacy function to make a placeholder matrix with no storage.

  58. def cat2sparse(c: IMat, ncats0: Int = 0): SMat

  59. def cblank: CMat

    Legacy function to make a placeholder matrix with no storage.

  60. def checkCUDAerrors(): Unit

  61. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  62. def col(x: Range): FMat

    Make a float column vector from a range.

  63. def col[T](x: T*)(implicit numeric: Numeric[T]): FMat

    Make a float column vector from a vararg list.

  64. def col[T](x: List[T])(implicit numeric: Numeric[T]): FMat

    Make a float column vector from a list of type T.

  65. def col(x: Array[Int]): FMat

    Make a float column vector from an array of Ints.

  66. def col(x: Array[Double]): FMat

    Make a float column vector from an array of Doubles.

  67. def col(x: Array[Float]): FMat

    Make a float column vector from an array of Floats.

  68. def cols2sparse(rows: IMat, cols: IMat, values: FMat): SMat

  69. def cols2sparse(rows: IMat, cols: IMat, values: FMat, issorted: Boolean): SMat

  70. def cols2sparse(rows: IMat, cols: IMat, values: FMat, issorted: Boolean, ibase: Int): SMat

  71. def cols2sparse(mat: DMat): SMat

  72. def cols2sparse(mat: DMat, fliprc: Boolean): SMat

  73. def cols2sparse(mat: DMat, fliprc: Boolean, issorted: Boolean): SMat

  74. def cols2sparse(mat: DMat, fliprc: Boolean, issorted: Boolean, ibase: Int): SMat

  75. def coomult(inds: IMat, vals: FMat, in: FMat, out: FMat, transpose: Boolean = true): Unit

    sparse matrix-vector multiply in coordinate form.

    sparse matrix-vector multiply in coordinate form. inds should be an nnz x 2 matrix containing row/column indices of the sparse matrix. vals is an nnz x 1 matrix of values of the sparse matrix. in is the input vector, out is the output vector. Note that the bounds of row/col indices are not checked.

  76. def copyrow(a: IMat, i: Int, b: IMat, j: Int): Unit

    Copies row i from a into row j of b.

  77. def countDistinct(a: IMat): (IMat, IMat)

    Count distinct elements in a sorted array of rows.

    Count distinct elements in a sorted array of rows. Returns (bptrs, iptrs), where bptrs points to a set of distinct rows, and iptrs gives the index in this list for each input row.

  78. def cscol(args: String*): CSMat

    Make a string column vector from string arguments to this function.

  79. def cscol(x: List[String]): CSMat

    Make a string column vector from a list of strings.

  80. def csrow(args: String*): CSMat

    Make a string row vector from this calls vararg list.

  81. def csrow(x: List[String]): CSMat

    Make a string row vector from a list of strings.

  82. var currentTimeWasThen: Long

  83. implicit def dbl2FMat(x: Double): FMat

    implicit to convert doubles to 1x1 FMats

  84. def dblank: DMat

    Legacy function to make a placeholder matrix with no storage.

  85. def dcol(args: Double*): DMat

    Make a double column vector from the varargs to this function.

  86. def dcol(x: List[Double]): DMat

    Make a double column vector from a list of doubles.

  87. def dcol(x: Range): DMat

    Make a double column vector from a range.

  88. def distribute(indx: IMat, vv: FMat, mats: Array[FMat], locs: IMat, left: Int, right: Int): Unit

    Distribute the data in the vv matrix using indices in the indx matrix into the mats array.

    Distribute the data in the vv matrix using indices in the indx matrix into the mats array. Left and right are the range of the output buffer indices. Element vv(i) goes into buffer number (indx(i)-left)

  89. def distribute(indx: IMat, vv: IMat, mats: Array[IMat], locs: IMat, left: Int, right: Int): Unit

    Distribute the data in the vv matrix using indices in the indx matrix into the mats array.

    Distribute the data in the vv matrix using indices in the indx matrix into the mats array. Left and right are the range of the output buffer indices. Element vv(i) goes into buffer number (indx(i)-left)

  90. def distribute(indx: FMat, vv: IMat, mats: Array[IMat], locs: IMat, left: Int, right: Int): Unit

    Distribute the data in the vv matrix using indices in the indx matrix into the mats array.

    Distribute the data in the vv matrix using indices in the indx matrix into the mats array. Left and right are the range of the output buffer indices. Element vv(i) goes into buffer number (indx(i)-left)

  91. def dones(nr: Int, nc: Int): DMat

    Make a double matrix of ones with the given dimensions.

  92. def drow(x: Range): DMat

    Make a double row vector from a range.

  93. def drow(args: Double*): DMat

    Make a double row vector from the varargs to this function.

  94. def drow(x: List[Double]): DMat

    Make a double row vector from a list of doubles.

  95. def drow(x: Array[Double]): DMat

    Make a double row vector from an array of doubles.

  96. def dzeros(nr: Int, nc: Int): DMat

    Make a double matrix of zeros of the given dimensions.

  97. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  98. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  99. implicit def fMat2DMat(x: FMat): DMat

    implicit to convert an FMat to a DMat

  100. def fblank: FMat

    Legacy function to make a placeholder matrix with no storage.

  101. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  102. def find(a: SMat): IMat

    Find non-zero linear indices

  103. def find(a: SDMat): IMat

    Find non-zero linear indices

  104. def find(a: CSMat): IMat

    Find non-zero linear indices

  105. def find(a: LMat): IMat

    Find non-zero linear indices

  106. def find(a: IMat): IMat

    Find non-zero linear indices

  107. def find(a: FMat): IMat

    Find non-zero linear indices

  108. def find(a: DMat): IMat

    Find non-zero linear indices

  109. def find2(a: SMat): (IMat, IMat)

    Find non-zero (row, col) tuples

  110. def find2(a: SDMat): (IMat, IMat)

    Find non-zero (row, col) tuples

  111. def find2(a: CSMat): (IMat, IMat)

    Find non-zero (row, col) tuples

  112. def find2(a: LMat): (IMat, IMat)

    Find non-zero (row, col) indices

  113. def find2(a: IMat): (IMat, IMat)

    Find non-zero (row, col) indices

  114. def find2(a: FMat): (IMat, IMat)

    Find non-zero (row, col) indices

  115. def find2(a: DMat): (IMat, IMat)

    Find non-zero (row, col) indices

  116. def find3(a: SMat): (IMat, IMat, FMat)

    Find non-zero (row, col, value) tuples

  117. def find3(a: SDMat): (IMat, IMat, DMat)

    Find non-zero (row, col, value) tuples

  118. def find3(a: CSMat): (IMat, IMat, CSMat)

    Find non-zero (row, col, value) tuples

  119. def find3(a: LMat): (IMat, IMat, LMat)

    Find non-zero (row, col, value) tuples

  120. def find3(a: IMat): (IMat, IMat, IMat)

    Find non-zero (row, col, value) tuples

  121. def find3(a: FMat): (IMat, IMat, FMat)

    Find non-zero (row, col, value) tuples

  122. def find3(a: DMat): (IMat, IMat, DMat)

    Find non-zero (row, col, value) tuples

  123. def flip: Unit

    Reset timer and flop counters.

    Reset timer and flop counters. Complement to flop which returns the time and flops since the last flip.

  124. def flop: (Float, Float)

    Wrap

    Wrap

    flip; code; val f=flop

    around any code you want to profile. f is a tuple of (flops,time)

  125. implicit def flt2FMat(x: Float): FMat

    implicit to convert floats to 1x1 FMats

  126. def fsqrt(v: Float): Float

    Returns the square root of v as a float, as an alternative to math.sqrt(v)'s double.

  127. def full(a: Mat): Mat

  128. def full(ss: GSDMat): GDMat

    Convert from GPU double sparse to GPU double dense.

  129. def full(ss: GSMat): GMat

    Convert from GPU float sparse to GPU float dense.

  130. def full(ss: SMat): FMat

    Convert from float sparse to double dense.

  131. def full(sd: SDMat): DMat

    Convert from double sparse to double dense.

  132. def full(a: FMat): FMat

    Convert from single dense to single dense.

  133. def full(a: DMat): DMat

    Convert from double dense to double dense.

  134. def gblank: GMat

    Legacy function to make a placeholder matrix with no storage.

  135. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  136. def getdiag(a: Mat): Mat

    Gets the leading diagonal of a matrix as a vector.

    Gets the leading diagonal of a matrix as a vector. Works on most matrix types.

    Example, with IMats:

    scala> val a = 1\2\3\4 on 4\5\6\7 on 7\8\9\10
    a: BIDMat.IMat =
       1   2   3   4
       4   5   6   7
       7   8   9  10
    
    scala> getdiag(a)
    res3: BIDMat.IMat =
       1
       5
       9
  137. def getdiag(a: GLMat): GLMat

    Gets the leading diagonal of GLMat a as a GLMat vector.

  138. def getdiag(a: GIMat): GIMat

    Gets the leading diagonal of GIMat a as a GIMat vector.

  139. def getdiag(a: GDMat): GDMat

    Gets the leading diagonal of GDMat a as a GDMat vector.

  140. def getdiag(a: GMat): GMat

    Gets the leading diagonal of GMat a as a GMat vector.

  141. def getdiag(a: CMat): CMat

    Gets the leading diagonal of CMat a as a CMat vector.

  142. def getdiag(a: LMat): LMat

    Gets the leading diagonal of LMat a as a LMat vector.

  143. def getdiag(a: FMat): FMat

    Gets the leading diagonal of FMat a as an FMat vector.

  144. def getdiag(a: DMat): DMat

    Gets the leading diagonal of DMat a as a DMat vector.

  145. def gflop: (Float, Float)

    Wrap

    Wrap

    flip; code; val g=gflop

    around any code you want to profile. g is a tuple of (gflops,time)

  146. def giblank: GIMat

    Legacy function to make a placeholder matrix with no storage.

  147. def giones(nr: Int, nc: Int): GIMat

    Make an integer matrix of ones in GPU memory.

  148. def gizeros(nr: Int, nc: Int): GIMat

    Make an integer matrix of zeros in GPU memory.

  149. def glones(nr: Int, nc: Int): GLMat

    Make a long matrix of ones in GPU memory.

  150. def glzeros(nr: Int, nc: Int): GLMat

    Make a long matrix of zeros in GPU memory.

  151. def gones(nr: Int, nc: Int): GMat

    Make a float matrix of ones in GPU memory.

  152. def gsblank: GSMat

    Legacy function to make a placeholder matrix with no storage.

  153. def gzeros(nr: Int, nc: Int): GMat

    Make a single-precision matrix of zeros in GPU memory.

  154. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  155. implicit def iMat2FMat(x: IMat): FMat

    implicit to convert an IMat to an FMat

  156. def iblank: IMat

    Legacy function to make a placeholder matrix with no storage.

  157. def icol(args: Int*): IMat

    Make an integer column vector from this calls vararg list.

  158. def icol(x: List[Int]): IMat

    Make an integer column vector from a List.

  159. def icol(x: (Int, Int)): IMat

    Make an integer column vector from a tuple to support 0->5 syntax for ranges.

  160. def icol(x: Range): IMat

    Make an integer column vector from a range.

  161. implicit def int2IMat(x: Int): IMat

    implicit to convert ints to 1x1 IMats

  162. def invperm(a: IMat): IMat

    Compute the inverse permutation to a given integer permutation matrix.

    Compute the inverse permutation to a given integer permutation matrix. i.e. given a vector ii which is a one-to-one map of 0...(n-1) to 0...(n-1), Compute a vector iinv s.t. iinv(ii) = ii(iinv) = 0...(n-1). For matrices, compute inverse permutations within columns.

  163. def iones(nr: Int, nc: Int): IMat

    Make an integer matrix of ones of the given dimensions.

  164. def irow(args: Int*): IMat

    Make an integer row vector from this call's vararg list.

  165. def irow(x: List[Int]): IMat

    Make an integer row vector from a List of Ints.

  166. def irow(x: Array[Int]): IMat

    Make an integer row vector from an array of Ints.

  167. def irow(x: (Int, Int)): IMat

    Make an integer row vector from a 2-tuple.

    Make an integer row vector from a 2-tuple. Supports the syntax 0->5 for ranges.

  168. def irow(x: Range): IMat

    Make an integer row vector from a range.

  169. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  170. def isortlex(a: CSMat): IMat

    Lexicographially sort with an index array, and return it.

    Lexicographially sort with an index array, and return it. a is not modified

  171. def isortlex(a: LMat): IMat

    Lexicographially sort with an index array, and return it.

    Lexicographially sort with an index array, and return it. a is not modified

  172. def isortlex(a: IMat): IMat

    Lexicographially sort with an index array, and return it.

    Lexicographially sort with an index array, and return it. a is not modified

  173. def isortlex(a: FMat): IMat

    Lexicographially sort with an index array, and return it.

    Lexicographially sort with an index array, and return it. a is not modified

  174. def isortlex(a: DMat): IMat

    Lexicographically sort some rows ascending, return only the indices

  175. def isortlexdown(a: CSMat): IMat

    Lexicographically sort rows ascending

  176. def isortlexdown(a: LMat): IMat

    Lexicographially sort descending with an index array, and return it.

    Lexicographially sort descending with an index array, and return it. a is not modified

  177. def isortlexdown(a: IMat): IMat

  178. def isortlexdown(a: FMat): IMat

    Lexicographially sort descending with an index array, and return it.

    Lexicographially sort descending with an index array, and return it. a is not modified

  179. def isortlexdown(a: DMat): IMat

    Lexicographically sort some rows descending, return only the indices

  180. def isortlexfast(mat: IMat, asc: Boolean): IMat

    Lexicographic sort of a matrix mat with order asc (boolean true for ascending order).

    Lexicographic sort of a matrix mat with order asc (boolean true for ascending order). Side-effects mat.

  181. def izeros(nr: Int, nc: Int): IMat

    Make an integer matrix of zeros of the given dimensions.

  182. var lastFlops: Long

  183. def lcol(args: Long*): LMat

    Make an integer column vector from this calls vararg list.

  184. def lcol(x: List[Long]): LMat

    Make an integer column vector from a List.

  185. def lcol(x: (Int, Int)): LMat

    Make an integer column vector from a tuple to support 0->5 syntax for ranges.

  186. def lcol(x: Range): LMat

    Make an integer column vector from a range.

  187. def length(a: LMat): Int

    Return the length of a, (number of rows x columns)

  188. def length(a: IMat): Int

    Return the length of a, (number of rows x columns)

  189. def length(a: FMat): Int

    Return the length of a, (number of rows x columns)

  190. def length(a: DMat): Int

    Return the length of a, (number of rows x columns)

  191. def load[A, B](fname: String, v1: String, v2: String): (A, B)

  192. def load[T](fname: String, vname: String): T

  193. def loadDMat(fname: String, omat: Mat, compressed: Int): DMat

  194. def loadDMat(fname: String, omat: Mat): DMat

  195. def loadDMat(fname: String): DMat

  196. def loadFMat(fname: String, omat: Mat, compressed: Int): FMat

  197. def loadFMat(fname: String, omat: Mat): FMat

  198. def loadFMat(fname: String): FMat

  199. def loadIDX(fname: String): FND

  200. def loadIDX(fname: String, compressed: Int): FND

  201. def loadIMat(fname: String, omat: Mat, compressed: Int): IMat

  202. def loadIMat(fname: String, omat: Mat): IMat

  203. def loadIMat(fname: String): IMat

  204. def loadLibSVM(fname: String, nrows: Int): (SMat, IMat, FMat)

  205. def loadLibSVM(fname: String, nrows: Int, compressed: Int): (SMat, IMat, FMat)

  206. def loadLibSVM(fname: String, nrows: Int, compressed: Int, oneBased: Int): (SMat, IMat, FMat)

  207. def loadMat(fname: String, omat: Mat, compressed: Int): Mat

  208. def loadMat(fname: String, omat: Mat): Mat

  209. def loadMat(fname: String): Mat

  210. def loadSBMat(fname: String, compressed: Int): SBMat

  211. def loadSBMat(fname: String): SBMat

  212. def loadSMat(fname: String, compressed: Int): SMat

  213. def loadSMat(fname: String): SMat

  214. def loadx(fname: String, vnames: String*): List[AnyRef]

  215. def lones(nr: Int, nc: Int): LMat

    Make an integer matrix of ones of the given dimensions.

  216. def lrow(args: Long*): LMat

    Make an integer row vector from this call's vararg list.

  217. def lrow(x: List[Long]): LMat

    Make an long row vector from a List of Ints.

  218. def lrow(x: Array[Long]): LMat

    Make an integer row vector from an array of Ints.

  219. def lrow(x: (Int, Int)): LMat

    Make an integer row vector from a 2-tuple.

    Make an integer row vector from a 2-tuple. Supports the syntax 0->5 for ranges.

  220. def lrow(x: Range): LMat

    Make an integer row vector from a range.

  221. def lzeros(nr: Int, nc: Int): LMat

    Make an integer matrix of zeros of the given dimensions.

  222. def mapfun2x1(fn: (Float, Float) ⇒ Float, in0: FMat, in1: FMat, out0: FMat): Unit

  223. def mapfun2x2(fn: (Float, Float) ⇒ (Float, Float), in0: FMat, in1: FMat, out0: FMat, out1: FMat): Unit

  224. def mkdiag(a: Mat): Mat

    Creates a diagonal, square matrix with elements of a in the diagonal.

    Creates a diagonal, square matrix with elements of a in the diagonal. Works on most matrix types.

    Throws exception if a is a non-vector matrix.

    Example, with IMats:

    scala> val a = 1 on 2 on 3
    a: BIDMat.IMat =
       1
       2
       3
    
    scala> mkdiag(a)
    res4: BIDMat.IMat =
       1   0   0
       0   2   0
       0   0   3
  225. def mkdiag(a: GLMat): GLMat

    Creates a diagonal, square GLMat matrix with elements of a in the diagonal.

  226. def mkdiag(a: GIMat): GIMat

    Creates a diagonal, square GIMat matrix with elements of a in the diagonal.

  227. def mkdiag(a: GDMat): GDMat

    Creates a diagonal, square GDMat matrix with elements of a in the diagonal.

  228. def mkdiag(a: GMat): GMat

    Creates a diagonal, square GMat matrix with elements of a in the diagonal.

  229. def mkdiag(a: CMat): CMat

    Creates a diagonal, square CMat matrix with elements of a in the diagonal.

  230. def mkdiag(a: LMat): LMat

    Creates a diagonal, square LMat matrix with elements of a in the diagonal.

  231. def mkdiag(a: IMat): IMat

    Creates a diagonal, square IMat matrix with elements of a in the diagonal.

  232. def mkdiag(a: FMat): FMat

    Creates a diagonal, square FMat matrix with elements of a in the diagonal.

  233. def mkdiag(a: DMat): DMat

    Creates a diagonal, square DMat matrix with elements of a in the diagonal.

  234. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  235. def nnz(a: SDMat): Int

    Return the number of non-zeros in a

  236. def nnz(a: SMat): Int

    Return the number of non-zeros in a

  237. def nnz(a: LMat): Int

    Return the number of non-zeros in a

  238. def nnz(a: IMat): Int

    Return the number of non-zeros in a

  239. def nnz(a: FMat): Int

    Return the number of non-zeros in a

  240. def nnz(a: DMat): Int

    Return the number of non-zeros in a

  241. final def notify(): Unit

    Definition Classes
    AnyRef
  242. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  243. def oneHot(c: IMat): SMat

  244. def oneHot(c: IMat, ncats: Int): SMat

  245. def ones(nr: Int, nc: Int): FMat

    Make a float matrix of ones of the given size.

  246. implicit def range2IMat(x: Range): IMat

    implicit to convert ranges to IMats

  247. def recycleTry(a: Mat, b: Mat, c: Mat): Mat

  248. def recycleTry(a: Mat, b: GSMat, c: GSMat): GSMat

  249. def recycleTry(a: Mat, b: GIMat, c: GIMat): GIMat

  250. def recycleTry(a: Mat, b: GMat, c: GMat): GMat

  251. def recycleTry(a: Mat, b: SDMat, c: SDMat): SDMat

  252. def recycleTry(a: Mat, b: SMat, c: SMat): SMat

  253. def recycleTry(a: Mat, b: IMat, c: IMat): IMat

  254. def recycleTry(a: Mat, b: DMat, c: DMat): DMat

  255. def recycleTry(a: Mat, b: FMat, c: FMat): FMat

  256. def recycleTry(a: Mat, b: Mat): Mat

  257. def recycleTry(a: Mat, b: GSMat): GSMat

  258. def recycleTry(a: Mat, b: GIMat): GIMat

  259. def recycleTry(a: Mat, b: GMat): GMat

  260. def recycleTry(a: Mat, b: SDMat): SDMat

  261. def recycleTry(a: Mat, b: SMat): SMat

  262. def recycleTry(a: Mat, b: CMat): CMat

  263. def recycleTry(a: Mat, b: IMat): IMat

  264. def recycleTry(a: Mat, b: DMat): DMat

  265. def recycleTry(a: Mat, b: FMat): FMat

  266. def recycleTry(a: Mat, nr: Int, nc: Int, b: Mat, nnz: Int): Mat

  267. def recycleTry(a: Mat, nr: Int, nc: Int, b: GSMat, nnz: Int): GSMat

  268. def recycleTry(a: Mat, nr: Int, nc: Int, b: GIMat, nnz: Int): GIMat

  269. def recycleTry(a: Mat, nr: Int, nc: Int, b: GMat, nnz: Int): GMat

  270. def recycleTry(a: Mat, nr: Int, nc: Int, b: SDMat, nnz: Int): SDMat

  271. def recycleTry(a: Mat, nr: Int, nc: Int, b: SMat, nnz: Int): SMat

  272. def recycleTry(a: Mat, nr: Int, nc: Int, b: IMat, nnz: Int): IMat

  273. def recycleTry(a: Mat, nr: Int, nc: Int, b: DMat, nnz: Int): DMat

  274. def recycleTry(a: Mat, nr: Int, nc: Int, b: FMat, nnz: Int): FMat

  275. def row(x: Range): FMat

    Make a float row vector from a range.

  276. def row[T](x: T*)(implicit numeric: Numeric[T]): FMat

    Make a float row vector from varargs.

  277. def row[T](x: List[T])(implicit numeric: Numeric[T]): FMat

    Make a float row vector from a List of generic type.

  278. def row(x: Array[Int]): FMat

    Make a float row vector from an array of Ints.

  279. def row(x: Array[Double]): FMat

    Make a float row vector from an array of doubles.

  280. def row(x: Array[Float]): FMat

    Make a float row matrix from an array of Floats.

  281. def saveAs(fname: String, args: AnyRef*): Unit

  282. def saveAsHDF5(fname: String, args: AnyRef*): Int

  283. def saveDMat(fname: String, m: DMat, compressed: Int): Unit

  284. def saveDMat(fname: String, m: DMat): Unit

  285. def saveFMat(fname: String, m: FMat, compressed: Int): Unit

  286. def saveFMat(fname: String, m: FMat): Unit

  287. def saveIMat(fname: String, m: IMat, compressed: Int): Unit

  288. def saveIMat(fname: String, m: IMat): Unit

  289. def saveLibSVM(fname: String, data: SMat, cats: SMat): Unit

  290. def saveLibSVM(fname: String, data: SMat, cats: SMat, weights: FMat): Unit

  291. def saveLibSVM(fname: String, data: SMat, cats: SMat, weights: FMat, compressed: Int): Unit

  292. def saveMat(fname: String, m: Mat, compressed: Int): Unit

  293. def saveMat(fname: String, m: Mat): Unit

  294. def saveSBMat(fname: String, m: SBMat, compressed: Int): Unit

  295. def saveSBMat(fname: String, m: SBMat): Unit

  296. def saveSMat(fname: String, m: SMat, compressed: Int): Unit

  297. def saveSMat(fname: String, m: SMat): Unit

  298. def sblank: SMat

    Legacy function to make a placeholder matrix with no storage.

  299. def sdblank: SDMat

    Legacy function to make a placeholder matrix with no storage.

  300. def sdzeros(nr: Int, nc: Int): SDMat

    Make a sparse double-precision matrix which is all zeros.

  301. def size(a: Mat, n: Int): Int

    Retrieve the size of a along axis n - n=1: Number of rows - n=2: Number of columns

  302. def size(a: Mat): (Int, Int)

    Return the size of a as a (rows, columns) tuple.

  303. def sort(keys: GMat): GMat

  304. def sort(a: CSMat): CSMat

    Sort a set of keys ascending.

  305. def sort(a: CSMat, ind: Int): CSMat

    Sort a set of key/ind pairs ascending.

  306. def sort(keys: LMat): LMat

    Sort a set of keys ascending.

  307. def sort(keys: LMat, dir: Int): LMat

    Sort a set of keys ascending along a given direction dir: 1=columns, 2=rows, 0=smart.

  308. def sort(a: IMat): IMat

    Sort a set of keys ascending.

  309. def sort(a: IMat, ind: Int): IMat

    Sort a set of key/ind pairs ascending.

  310. def sort(keys: FMat): FMat

    Sort a set of keys ascending.

  311. def sort(keys: FMat, dir: Int): FMat

    Sort a set of keys ascending along a given direction dir: 1=columns, 2=rows, 0=smart.

  312. def sort(a: DMat): DMat

    Sort a set of keys ascending.

  313. def sort(a: DMat, ind: Int): DMat

    Sort a set of key/ind pairs ascending.

  314. def sort2(keys: GMat): (GMat, GIMat)

  315. def sort2(a: CSMat): (CSMat, IMat)

    Sort a set of keys ascending, and return sorted keys and indices.

  316. def sort2(keys: LMat, dir: Int): (LMat, IMat)

    Sort a set of keys and return sorted keys and indices along a given direction: 1=columns, 2=rows, 0=smart

  317. def sort2(keys: LMat): (LMat, IMat)

    Sort a set of keys ascending, and return sorted keys and indices.

  318. def sort2(a: IMat, dir: Int): (IMat, IMat)

    Sort a set of keys and return sorted keys and indices along a given direction: 1=columns, 2=rows

  319. def sort2(a: IMat): (IMat, IMat)

    Sort a set of keys ascending, and return sorted keys and indices.

  320. def sort2(keys: FMat, dir: Int): (FMat, IMat)

    Sort a set of keys and return sorted keys and indices along a given direction: 1=columns, 2=rows, 0=smart

  321. def sort2(keys: FMat): (FMat, IMat)

    Sort a set of keys ascending, and return sorted keys and indices.

  322. def sort2(a: DMat, dir: Int): (DMat, IMat)

    Sort a set of keys and return sorted keys and indices along a given direction: 1=columns, 2=rows, 0=smart

  323. def sort2(a: DMat): (DMat, IMat)

    Sort a set of keys ascending, and return sorted keys and indices.

  324. def sortdown(keys: GMat): GMat

  325. def sortdown(a: CSMat): CSMat

    Sort a set of key/ind pairs descending.

  326. def sortdown(a: CSMat, ind: Int): CSMat

    Sort a set of key/ind pairs descending.

  327. def sortdown(keys: LMat): LMat

    Sort a set of keys descending.

  328. def sortdown(keys: LMat, dir: Int): LMat

    Sort a set of keys descending along a given direction: 1=columns, 2=rows, 0=smart.

  329. def sortdown(a: IMat): IMat

    Sort a set of keys descending.

  330. def sortdown(a: IMat, dir: Int): IMat

    Sort a set of keys descending along a given direction: 1=columns, 2=rows.

  331. def sortdown(keys: FMat): FMat

    Sort a set of keys descending.

  332. def sortdown(keys: FMat, dir: Int): FMat

    Sort a set of keys descending along a given direction: 1=columns, 2=rows, 0=smart.

  333. def sortdown(a: DMat): DMat

    Sort a set of keys descending, and return sorted keys and indices.

  334. def sortdown(a: DMat, ind: Int): DMat

    Sort a set of key/ind pairs descending.

  335. def sortdown2(keys: GMat): (GMat, GIMat)

  336. def sortdown2(a: CSMat): (CSMat, IMat)

    Sort a set of keys descending and return sorted keys and indices.

  337. def sortdown2(keys: LMat, dir: Int): (LMat, IMat)

    Sort a set of keys descending and return sorted keys and indices along a given direction: 1=columns, 2=rows, 0=smart

  338. def sortdown2(keys: LMat): (LMat, IMat)

    Sort a set of keys descending and return sorted keys and indices.

  339. def sortdown2(a: IMat, dir: Int): (IMat, IMat)

    Sort a set of keys descending and return sorted keys and indices along a given direction: 1=columns, 2=rows

  340. def sortdown2(a: IMat): (IMat, IMat)

    Sort a set of keys descending and return sorted keys and indices.

  341. def sortdown2(keys: FMat, dir: Int): (FMat, IMat)

    Sort a set of keys descending and return sorted keys and indices along a given direction: 1=columns, 2=rows, 0=smart

  342. def sortdown2(keys: FMat): (FMat, IMat)

    Sort a set of keys descending and return sorted keys and indices.

  343. def sortdown2(a: DMat, dir: Int): (DMat, IMat)

    Sort a set of keys descending and return sorted keys and indices along a given direction: 1=columns, 2=rows, 0=smart

  344. def sortdown2(a: DMat): (DMat, IMat)

    Sort a set of keys descending, and return sorted keys and indices.

  345. def sortlex(mat: IMat): Unit

    Lexicographic sort of a matrix mat.

    Lexicographic sort of a matrix mat. Side-effects mat.

  346. def sortlexInds(mat: IMat, inds: IMat): Unit

    Lexicographic sort of a matrix mat and a set of indices inds.

    Lexicographic sort of a matrix mat and a set of indices inds. Side-effects both matrices, i.e. both mat and inds are modified.

  347. def sortrows(a: CSMat): (CSMat, IMat)

  348. def sortrows(rows: LMat): (LMat, IMat)

    Lexicographically sort rows ascending

  349. def sortrows(a: IMat): (IMat, IMat)

    Lexicographically sort some rows ascending

  350. def sortrows(rows: FMat): (FMat, IMat)

    Lexicographically sort rows ascending

  351. def sortrows(a: DMat): (DMat, IMat)

    Lexicographically sort some rows ascending

  352. def sortrowsdown(a: CSMat): (CSMat, IMat)

  353. def sortrowsdown(rows: LMat): (LMat, IMat)

    Lexicographically sort rows descending

  354. def sortrowsdown(a: IMat): (IMat, IMat)

    Lexicographically sort rows descending

  355. def sortrowsdown(rows: FMat): (FMat, IMat)

    Lexicographically sort rows descending

  356. def sortrowsdown(a: DMat): (DMat, IMat)

    Lexicographically sort some rows descending

  357. def sparse(ii: IMat, jj: IMat, vv: FMat): SMat

    Construct an auto-sized sparse float matrix from arrays of indices (ii=row, jj=col) and values.

  358. def sparse(ii: IMat, jj: IMat, vv: FMat, nr: Int, nc: Int): SMat

    Construct a sparse float matrix from arrays of indices (ii=row, jj=col) and values, with given size.

  359. def sparse(ii: IMat, jj: IMat, vv: DMat): SDMat

    Construct an auto-sized sparse double matrix from arrays of indices (ii=row, jj=col) and values.

  360. def sparse(ii: IMat, jj: IMat, vv: DMat, nr: Int, nc: Int): SDMat

    Construct a sparse double matrix from arrays of indices (ii=row, jj=col) and values, with given size.

  361. def sparse(a: FMat): SMat

    Convert a sparse double-precision sparse matrix to sparse.

  362. def sparse(a: DMat): SDMat

    Convert a dense double-precision sparse matrix to sparse.

  363. def spdiag(n: Int): SMat

    Returns a sparse, diagonal n x n matrix with ones in the diagonal.

    Returns a sparse, diagonal n x n matrix with ones in the diagonal.

    Example:

    scala> spdiag(3)
    res10: BIDMat.SMat =
    (   0,   0)   1
    (   1,   1)   1
    (   2,   2)   1
  364. def spzeros(nr: Int, nc: Int): SMat

    Make an empty sparse matrix of ones of the given size.

  365. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  366. def szeros(nr: Int, nc: Int): SMat

    Make a sparse single-precision matrix which is all zeros.

  367. def threadPool(n: Int = Mat.numThreads): ExecutionContextExecutor

  368. def tic: Unit

    Establishes the start of a (seconds) timer, to be timed later at the next call to 'toc'.

  369. def toString(): String

    Definition Classes
    AnyRef → Any
  370. def toc: Float

    Returns the elapsed time in milliseconds between now and the previous call to 'tic'.

  371. implicit def tuple2IMat(x: (Int, Int)): IMat

    implicit to convert 2-tuples to IMats over the range of the 2-tuple

  372. def union(dd: Dict*): HashMap[String, Int]

  373. def unique(a: LMat): (LMat, IMat, IMat)

  374. def unique(a: IMat): IMat

  375. def unique(a: FMat): FMat

  376. def unique(a: DMat): DMat

  377. def unique3(a: IMat): (IMat, IMat, IMat)

  378. def unique3(a: FMat): (FMat, IMat, IMat)

  379. def unique3(a: DMat): (DMat, IMat, IMat)

    Find unique elements.

    Find unique elements. Return: (b,ii,jj) s.t. b=unique(a), b=a(ii,?), a=b(jj,?)

  380. def uniquerows(a: IMat): (IMat, IMat, IMat)

    Find the unique rows from a matrix of input rows.

    Find the unique rows from a matrix of input rows. Returns (outv, bptrs, outp) where

    • outv is a matrix of sorted rows.
    • bptrs are the positions of the distinct rows in the original matrix.
    • output are the positions of each input row in the output row matrix.
  381. def uniquerows(a: CSMat): (CSMat, IMat, IMat)

  382. def uniquerows(a: LMat): (LMat, IMat, IMat)

  383. def uniquerows(a: FMat): (FMat, IMat, IMat)

  384. def uniquerows(a: DMat): (DMat, IMat, IMat)

    Find unique rows.

    Find unique rows. Return: (b,ii,jj) s.t. b=uniquerows(a), b=a(ii,?), a=b(jj,?)

  385. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  386. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  387. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  388. def zeros(nr: Int, nc: Int): FMat

    Make a float matrix of zeros of the given size.

Inherited from AnyRef

Inherited from Any

Ungrouped