Packages

case class SequenceComp[T](v1: Vector[T], v2: Vector[T]) extends Product with Serializable

A class for comparing pairs of vectors.

v1

First Vector to compare.

v2

Second Vector to compare.

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SequenceComp
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SequenceComp(v1: Vector[T], v2: Vector[T])

    v1

    First Vector to compare.

    v2

    Second Vector to compare.

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 def align(src1: Vector[T], src2: Vector[T], overlap: Vector[T], mashup: Vector[Pairing[T]]): Vector[Pairing[T]]

    Recursively align two vectors against their supersequence.

    Recursively align two vectors against their supersequence.

    src1

    First Vector to align.

    src2

    Second Vector to align.

    overlap

    The Shortest Common Supersequence of src1 and src2.

    mashup

    The cumulative alignment.

    Annotations
    @tailrec()
  5. def align: Vector[Pairing[T]]

    Align vectors against their supersequence.

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  10. final def insertSingles(src1: Vector[T], src2: Vector[T], overlap: Vector[T], mashup: Vector[T]): Vector[T]

    Recursively insert unique elements from a pair of vectors into a vector of their common or overlapping elements.

    Recursively insert unique elements from a pair of vectors into a vector of their common or overlapping elements. This is equivalent to solving the SCS problem for a pair of Vectors by inserting elements into the LCS solution for same Vectors. Initial elements of the source vectors and the common vector are compared to decide whether or what to add to the composite mashup, then the process is repeated recursively until no elements remain in the overlap vector. Finally, any remaining elements in src1 and src2 are added to the mashup with the convention that src1 precedes src2. This means that reversing the order of src1 and src2 might or might not produce identical results.

    src1

    First vector to examine.

    src2

    Second vector to examine.

    overlap

    Common vector (LCS of src1 and src2).

    mashup

    Accumulator with previously inserted elements.

    Annotations
    @tailrec()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. def lcs: Vector[T]

    Compute Longest Common Subsequence for two Vectors of objects by walking back through the memoizing array to recover the common values in each of the two Vectors.

    Compute Longest Common Subsequence for two Vectors of objects by walking back through the memoizing array to recover the common values in each of the two Vectors.

    Compare the textbook discussion at http://introcs.cs.princeton.edu/java/23recursion/ with accompanying java impementation at http://introcs.cs.princeton.edu/java/23recursion/LongestCommonSubsequence.java.html

  13. def memo: Array[Array[Int]]

    Create a memoizing array by comparing each pair of elements in v1 and v2 and saving the resulting counts of the length of the common Vector (or lcs) at that point.

  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. def printMemo: Unit

    Print to stdout a display of the memoizing array.

    Print to stdout a display of the memoizing array. Useful for teaching and explaining how the LCS algorithm works.

  18. def printRow(i: Integer): Unit

    Print to stdout a display of a specified row of the memoizing array.

    Print to stdout a display of a specified row of the memoizing array. Used by printMemo.

    i

    Index of row to print out.

  19. def scs: Vector[T]

    Compute Shortest Common Supersequence for v1 and v2 by finding LCS and inserting into it at the approrpiate point accompanying any elements of v1 and v2 that appear only in one Vector.

  20. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  21. val v1: Vector[T]
  22. val v2: Vector[T]
  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  25. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

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

    (Since version ) see corresponding Javadoc for more information.

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped