Documentation of 'ca.pfv.spmf.input.sequence_database_array_integers.SequenceDatabase' Java class
SequenceDatabase
ca.pfv.spmf.input.sequence_database_array_integers

Class SequenceDatabase



  • public class SequenceDatabase
    extends java.lang.Object
    Implementation of a sequence database, where each sequence is implemented as an array of integers and should have a unique id.
    See Also:
    Sequence
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      int maxItem
      largest item in this database
      int minItem
      smallest item in this database
      int tidsCount
      the number of sequences in this database
    • Constructor Summary

      Constructors 
      Constructor and Description
      SequenceDatabase() 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addSequence(Sequence sequence)
      Method to add a sequence to this sequence database
      void addSequence(java.lang.String[] tokens)
      Method to process a line from the input file
      java.util.List<Sequence> getSequences()
      Get the sequences from this sequence database.
      void loadFile(java.lang.String path)
      Method to load a sequence database from a text file in SPMF format.
      void print()
      Print this sequence database to System.out.
      void printDatabaseStats()
      Print statistics about this database.
      int size()
      Get the sequence count in this database.
      java.lang.String toString()
      Return a string representation of this sequence database.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • minItem

        public int minItem
        smallest item in this database
      • maxItem

        public int maxItem
        largest item in this database
      • tidsCount

        public int tidsCount
        the number of sequences in this database
    • Constructor Detail

      • SequenceDatabase

        public SequenceDatabase()
    • Method Detail

      • loadFile

        public void loadFile(java.lang.String path)
                      throws java.io.IOException
        Method to load a sequence database from a text file in SPMF format.
        Parameters:
        path - the input file path.
        Throws:
        java.io.IOException - exception if error while reading the file.
      • addSequence

        public void addSequence(java.lang.String[] tokens)
        Method to process a line from the input file
        Parameters:
        tokens - A list of tokens from the line (which were separated by spaces in the original file).
      • addSequence

        public void addSequence(Sequence sequence)
        Method to add a sequence to this sequence database
        Parameters:
        sequence - A sequence of type "Sequence".
      • print

        public void print()
        Print this sequence database to System.out.
      • printDatabaseStats

        public void printDatabaseStats()
        Print statistics about this database.
      • toString

        public java.lang.String toString()
        Return a string representation of this sequence database.
        Overrides:
        toString in class java.lang.Object
      • size

        public int size()
        Get the sequence count in this database.
        Returns:
        the sequence count.
      • getSequences

        public java.util.List<Sequence> getSequences()
        Get the sequences from this sequence database.
        Returns:
        A list of sequences (Sequence).

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.