Packages

c

org.saddle.index

IndexLong

class IndexLong extends Index[Long]

Index with long keys

Linear Supertypes
Index[Long], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. IndexLong
  2. Index
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new IndexLong(keys: Vec[Long], ord: ORD[Long])

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(keys: Array[Long]): Array[Int]

    Given an array of keys, return the sequence of locations in the index at which those keys correspondingly occur, ignoring keys which do not exist.

    Given an array of keys, return the sequence of locations in the index at which those keys correspondingly occur, ignoring keys which do not exist.

    keys

    Sequence of keys to find

    Definition Classes
    Index
  5. def apply(keys: Long*): Array[Int]

    Given a sequence of keys, return the sequence of locations in the index at which those keys correspondingly occur, ignoring keys which do not exist.

    Given a sequence of keys, return the sequence of locations in the index at which those keys correspondingly occur, ignoring keys which do not exist.

    keys

    Sequence of keys to find

    Definition Classes
    Index
  6. def argSort: Array[Int]

    Returns offsets into index that would result in sorted index

    Returns offsets into index that would result in sorted index

    Definition Classes
    IndexLongIndex
  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def at(locs: Int*): Index[Long]

    Retrieve several elements from the index at provided offsets

    Retrieve several elements from the index at provided offsets

    locs

    A sequence of integer offsets

    Definition Classes
    Index
  9. def at(locs: Array[Int]): Index[Long]

    Retrieve several elements from the index at provided offets

    Retrieve several elements from the index at provided offets

    locs

    An array of integer offsets

    Definition Classes
    Index
  10. def at(loc: Int): Scalar[Long]

    Retrieve an element of the index at a particular offset

    Retrieve an element of the index at a particular offset

    loc

    Offset into index

    Definition Classes
    Index
  11. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  12. def concat(x: Index[Long]): Index[Long]

    Concatenate two Index objects together

    Concatenate two Index objects together

    Definition Classes
    IndexLongIndex
  13. def contains(key: Long): Boolean

    Returns true if the index contains at least one entry equal to the provided key

    Returns true if the index contains at least one entry equal to the provided key

    key

    Key to query

    Definition Classes
    Index
  14. def count(key: Long): Int

    Return the number of times the key occurs in the index

    Return the number of times the key occurs in the index

    key

    The key to query

    Definition Classes
    Index
  15. def counts: Array[Int]

    Returns an array whose entries represent the number of times the corresponding entry in uniques occurs within the index.

    Returns an array whose entries represent the number of times the corresponding entry in uniques occurs within the index.

    Definition Classes
    Index
  16. def distinct(implicit st: ST[Long], ord: ORD[Long]): Index[Long]

    Return the index of distinct values.

    Return the index of distinct values. Keeps order of first occurences.

    Definition Classes
    Index
  17. def dropLevel[U](implicit ev: Splitter[Long, U, _]): Index[U]

    For an index which contains Tuples, drop the right-most element of each tuple, resulting in a new index.

    For an index which contains Tuples, drop the right-most element of each tuple, resulting in a new index.

    U

    Type of elements of result index

    ev

    Implicit evidence of a Splitter instance that takes T (of arity N) to U (of arity N-1)

    Definition Classes
    Index
  18. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. def equals(o: Any): Boolean

    Default equality does an iterative, element-wise equality check of all values.

    Default equality does an iterative, element-wise equality check of all values.

    Definition Classes
    IndexLongIndex → AnyRef → Any
  20. def exists(pred: (Long) => Boolean): Boolean

    Returns true if there is an element which satisfies the predicate function,

    Returns true if there is an element which satisfies the predicate function,

    pred

    Function from T => Boolean

    Definition Classes
    Index
  21. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  22. def findOne(pred: (Long) => Boolean): Int

    Returns the int location of the first element of the index to satisfy the predicate function, or -1 if no element satisfies the function.

    Returns the int location of the first element of the index to satisfy the predicate function, or -1 if no element satisfies the function.

    pred

    Function from T => Boolean

    Definition Classes
    Index
  23. def first: Scalar[Long]

    Returns the first element of the Index, or NA if there is none

    Returns the first element of the Index, or NA if there is none

    Definition Classes
    Index
  24. def firsts(keys: Array[Long]): Array[Int]

    Given a sequence of keys, return the sequence of first locations in the index at which those keys correspondingly occur, ignoring keys which do not exist.

    Given a sequence of keys, return the sequence of first locations in the index at which those keys correspondingly occur, ignoring keys which do not exist.

    keys

    Sequence of keys to find

    Definition Classes
    Index
  25. def get(key: Long): Array[Int]

    Get location offsets within Index given a particular key

    Get location offsets within Index given a particular key

    key

    Key with which to search

    Definition Classes
    Index
  26. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  27. def getFirst(key: Long): Int

    Get first integer offset of a key

    Get first integer offset of a key

    key

    Key to find in index

    Definition Classes
    Index
  28. def getIndexer(other: Index[Long]): Option[Array[Int]]

    Generates offsets into current index given another index for the purposes of re-indexing.

    Generates offsets into current index given another index for the purposes of re-indexing. For more on reindexing, see org.saddle.index.ReIndexer. If the current and other indexes are equal, a value of None is returned.

    other

    The other index with which to generate offsets

    Definition Classes
    Index
  29. def getLast(key: Long): Int

    Get last integer offset of a key

    Get last integer offset of a key

    key

    Key to find in index

    Definition Classes
    Index
  30. def hashCode(): Int

    Default hashcode is simple rolling prime multiplication of sums of hashcodes for all values.

    Default hashcode is simple rolling prime multiplication of sums of hashcodes for all values.

    Definition Classes
    Index → AnyRef → Any
  31. def head(n: Int): Index[Long]

    Returns a slice comprised of at most the first n elements of the Index

    Returns a slice comprised of at most the first n elements of the Index

    n

    Number of elements to slice

    Definition Classes
    Index
  32. def intersect(other: Index[Long]): ReIndexer[Long]

    Produces a org.saddle.index.ReIndexer corresponding to the intersection of this Index with another.

    Produces a org.saddle.index.ReIndexer corresponding to the intersection of this Index with another. Both indexes must have set semantics - ie, have no duplicates.

    other

    The other index

    Definition Classes
    IndexLongIndex
  33. def isContiguous: Boolean

    Returns true if the index is either unique, or any two or more duplicate keys occur in consecutive locations in the index.

    Returns true if the index is either unique, or any two or more duplicate keys occur in consecutive locations in the index.

    Definition Classes
    IndexLongIndex
  34. def isEmpty: Boolean
    Definition Classes
    Index
  35. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  36. def isMonotonic: Boolean

    Returns true if the ordering of the elements of the Index is non-decreasing.

    Returns true if the ordering of the elements of the Index is non-decreasing.

    Definition Classes
    IndexLongIndex
  37. def isUnique: Boolean

    Returns true if there are no duplicate keys in the Index

    Returns true if there are no duplicate keys in the Index

    Definition Classes
    Index
  38. def join(other: Index[Long], how: JoinType = LeftJoin): ReIndexer[Long]

    Allows for the following SQL-style joins between this index and another:

    Allows for the following SQL-style joins between this index and another:

    other

    Another index

    how

    join type, see org.saddle.index.JoinType

    Definition Classes
    IndexLongIndex
  39. def last: Scalar[Long]

    Returns the last element of the Index, or NA if there is none

    Returns the last element of the Index, or NA if there is none

    Definition Classes
    Index
  40. def length: Int

    Number of elements in the index

    Number of elements in the index

    Definition Classes
    IndexLongIndex
  41. def locator: Locator[Long]
    Attributes
    protected
    Definition Classes
    IndexLongIndex
  42. def locatorAll: Option[LocatorAll[Long]]
    Attributes
    protected
    Definition Classes
    IndexLongIndex
  43. def lsearch(t: Long): Int

    Find the first location whereby inserting a key would maintain a sorted index.

    Find the first location whereby inserting a key would maintain a sorted index. Index must already be sorted.

    t

    Key that would be inserted

    Definition Classes
    IndexLongIndex
  44. def map[B](f: (Long) => B)(implicit arg0: ST[B], arg1: ORD[B]): Index[B]

    Map over the elements in the Index, producing a new Index, similar to Map in the Scala collections.

    Map over the elements in the Index, producing a new Index, similar to Map in the Scala collections.

    B

    Type of resulting elements

    f

    Function to map with

    Definition Classes
    IndexLongIndex
  45. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  46. def next(current: Scalar[Long]): Scalar[Long]

    Given a key, return the next value in the Index (in the natural, ie supplied, order).

    Given a key, return the next value in the Index (in the natural, ie supplied, order). The Index must at least be contiguous, if not unique. Returns current if it is the last.

    current

    Key value to find

    Definition Classes
    Index
  47. def nonEmpty: Boolean
    Definition Classes
    Index
  48. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  49. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  50. val ord: ORD[Long]
    Definition Classes
    IndexLongIndex
  51. def prev(current: Scalar[Long]): Scalar[Long]

    Given a key, return the previous value in the Index (in the natural, ie supplied, order).

    Given a key, return the previous value in the Index (in the natural, ie supplied, order). The Index must at least be contiguous, if not unique. Returns current if it is the first.

    current

    Key value to find

    Definition Classes
    Index
  52. def print(len: Int = 10, stream: OutputStream = System.out): Unit

    Pretty-printer for Index, which simply outputs the result of stringify.

    Pretty-printer for Index, which simply outputs the result of stringify.

    len

    Number of elements to display

    Definition Classes
    Index
  53. def raw(idx: Int): Long

    Access an element directly within the index, without wrapping in a Scalar box.

    Access an element directly within the index, without wrapping in a Scalar box.

    Definition Classes
    IndexLongIndex
  54. def reversed: Index[Long]

    Returns the index in reversed order

    Returns the index in reversed order

    Definition Classes
    IndexLongIndex
  55. def rsearch(t: Long): Int

    Find the last location whereby inserting a key would maintain a sorted index.

    Find the last location whereby inserting a key would maintain a sorted index. Index must already be sorted.

    t

    Key that would be inserted

    Definition Classes
    IndexLongIndex
  56. val scalarTag: ScalarTagLong.type

    A org.saddle.scalar.ScalarTag representing the kind of Scalar found in this index.

    A org.saddle.scalar.ScalarTag representing the kind of Scalar found in this index.

    Definition Classes
    IndexLongIndex
  57. def slice(from: Int, until: Int, stride: Int): Index[Long]

    Returns a slice of Index between two integers, including the from bound, and excluding the until bound.

    Returns a slice of Index between two integers, including the from bound, and excluding the until bound.

    from

    Int, lower bound

    until

    Int, one past upper bound

    stride

    Default is 1, the step with which to advance over bound

    Definition Classes
    IndexLongIndex
  58. def sliceBy(rng: Slice[Long]): Index[Long]

    Returns a slice of Index between two keys, including both the lower and upper keys.

    Returns a slice of Index between two keys, including both the lower and upper keys.

    rng

    An instance of

    Definition Classes
    Index
  59. def sliceBy(from: Long, to: Long, inclusive: Boolean = true): Index[Long]

    Returns a slice of an index between two keys; if inclusive is false, then exclude the upper bound.

    Returns a slice of an index between two keys; if inclusive is false, then exclude the upper bound. Index must be sorted, as this method relies on lsearch and rsearch.

    from

    Key lower bound

    to

    Key upper bound

    inclusive

    If true (default), include upper bound in slice

    Definition Classes
    Index
  60. def sorted: Index[Long]

    Returns the index in sorted (ascending) order

    Returns the index in sorted (ascending) order

    Definition Classes
    Index
  61. def split[O1, O2](implicit ev: Splitter[Long, O1, O2]): (Index[O1], Index[O2])

    Given this index contains tuples of arity N > 1, split will result in a pair of index instances; the left will have elements of arity N-1, and the right arity 1.

    Given this index contains tuples of arity N > 1, split will result in a pair of index instances; the left will have elements of arity N-1, and the right arity 1.

    O1

    Left index type (of arity N-1)

    O2

    Right index type (of arity 1)

    ev

    Implicit evidence of an instance of Splitter

    Definition Classes
    Index
  62. def stack[U, V](other: Index[U])(implicit ev: Stacker[Long, U, V]): Index[V]

    Given this index whose elements have arity N and another index of arity 1, form a result index whose entries are tuples of arity N+1 reflecting the Cartesian product of the two, in the provided order.

    Given this index whose elements have arity N and another index of arity 1, form a result index whose entries are tuples of arity N+1 reflecting the Cartesian product of the two, in the provided order. See org.saddle.index.Stacker for more details.

    U

    The input type, of arity 1

    V

    The result type, of arity N+1

    other

    Another Index

    ev

    Implicit evidence of a Stacker

    Definition Classes
    Index
  63. def stringify(len: Int = 10): String

    Creates a string representation of Index

    Creates a string representation of Index

    len

    Max number of elements to include

    Definition Classes
    Index
  64. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  65. def tail(n: Int): Index[Long]

    Returns a slice comprised of at most the last n elements of the Index

    Returns a slice comprised of at most the last n elements of the Index

    n

    Number of elements to slice

    Definition Classes
    Index
  66. def take(locs: Array[Int]): Index[Long]

    Take values of the index at certain locations, returning a new Index consisting of those values.

    Take values of the index at certain locations, returning a new Index consisting of those values.

    See also org.saddle.array.take

    locs

    Locations to take

    Definition Classes
    IndexLongIndex
    Annotations
    @nowarn()
  67. def toArray: Array[Long]
    Definition Classes
    IndexLongIndex
  68. def toSeq: IndexedSeq[Long]

    Convert Index elements to an IndexedSeq.

    Convert Index elements to an IndexedSeq.

    Definition Classes
    Index
  69. def toString(): String
    Definition Classes
    Index → AnyRef → Any
  70. def toUniqueIndex(implicit ord: ORD[Long]): Index[(Long, Int)]

    Returns a unique index where each element is paired up with a unique integer in [0,n) n being the multiplicity count of that element in the index

    Returns a unique index where each element is paired up with a unique integer in [0,n) n being the multiplicity count of that element in the index

    Definition Classes
    Index
  71. def toVec: Vec[Long]

    Convert Index to a org.saddle.Vec

    Convert Index to a org.saddle.Vec

    Definition Classes
    IndexLongIndex
  72. def union(other: Index[Long]): ReIndexer[Long]

    Produces a org.saddle.index.ReIndexer corresponding to the union of this Index with another.

    Produces a org.saddle.index.ReIndexer corresponding to the union of this Index with another. Both indexes must have set semantics - ie, have no duplicates.

    other

    The other index

    Definition Classes
    IndexLongIndex
  73. def uniques(implicit ord: ORD[Long], tag: ST[Long]): Index[Long]

    Returns an array of unique keys in the Index, in the order in which they originally appeared in the backing Vec.

    Returns an array of unique keys in the Index, in the order in which they originally appeared in the backing Vec.

    ord

    Implicit ORD for instances of type T

    tag

    Implicit ST for instances of type T

    Definition Classes
    Index
  74. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  75. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  76. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  77. def without(locs: Array[Int]): Index[Long]

    Complement of the take method; return a new Index whose values are those which do not occur at the specified locations.

    Complement of the take method; return a new Index whose values are those which do not occur at the specified locations.

    locs

    Locations to omit

    Definition Classes
    IndexLongIndex

Inherited from Index[Long]

Inherited from AnyRef

Inherited from Any

Ungrouped