ca.pfv.spmf.algorithms.sequentialpatterns.fournier2008_seqdim.multidimensionalsequentialpatterns
Class MDSequenceDatabase
- java.lang.Object
-
- ca.pfv.spmf.algorithms.sequentialpatterns.fournier2008_seqdim.multidimensionalsequentialpatterns.MDSequenceDatabase
-
public class MDSequenceDatabase extends java.lang.ObjectImplementation of a "Multi-Dimensional Sequence Database" as used by the SeqDim algorithm (Pinto et al., 2001).
A MD-Sequences database contains a list of md-Sequences, where each MD-Sequence is composed of an MD-Pattern and a Sequence.- See Also:
MDSequence,MDSequences,AlgoSeqDim
-
-
Constructor Summary
Constructors Constructor and Description MDSequenceDatabase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddSequence(MDSequence sequence)Add an MDSequence to this MDSequence database.MDSequenceget(int index)Get the i-th MDSequence.intgetItemCount()Get the number of distinct items in this database.java.util.Set<ItemSimple>getItemIDs()Get the list of item IDs in this database.MDPatternsDatabasegetPatternDatabase()Get the list of MDPatterns contained in the MDSequences.SequenceDatabasegetSequenceDatabase()Get the list of sequences contained in the MDSequences.java.util.List<MDSequence>getSequences()Get the list of MDSequences stored in this databasevoidloadFile(java.lang.String path)Load a MD-Sequence database from a filevoidprintDatabase()Print this database to system.out.intsize()Get the number of MDsequences.java.lang.StringtoString()Get a String representation of this database.
-
-
-
Method Detail
-
getItemCount
public int getItemCount()
Get the number of distinct items in this database.- Returns:
- an integer
-
loadFile
public void loadFile(java.lang.String path) throws java.io.IOExceptionLoad a MD-Sequence database from a file- Parameters:
path- the path of the file- Throws:
java.io.IOException- exception if error reading the file
-
addSequence
public void addSequence(MDSequence sequence)
Add an MDSequence to this MDSequence database.- Parameters:
sequence- an MDSequence
-
printDatabase
public void printDatabase()
Print this database to system.out.
-
toString
public java.lang.String toString()
Get a String representation of this database.- Overrides:
toStringin classjava.lang.Object- Returns:
- a string
-
size
public int size()
Get the number of MDsequences.- Returns:
- a integer value
-
getSequences
public java.util.List<MDSequence> getSequences()
Get the list of MDSequences stored in this database- Returns:
- a List of MDSequence objects.
-
get
public MDSequence get(int index)
Get the i-th MDSequence.- Parameters:
index- the position i.- Returns:
- the MDSequence
-
getItemIDs
public java.util.Set<ItemSimple> getItemIDs()
Get the list of item IDs in this database.- Returns:
- a set of Item objects.
-
getSequenceDatabase
public SequenceDatabase getSequenceDatabase()
Get the list of sequences contained in the MDSequences.- Returns:
- a SequencDatabase
-
getPatternDatabase
public MDPatternsDatabase getPatternDatabase()
Get the list of MDPatterns contained in the MDSequences.- Returns:
- a MDPatternsDatabase
-
-
DMelt 3.0 © DataMelt by jWork.ORG