dragon.ml.seqmodel.data
Class BasicDataset

java.lang.Object
  |
  +--dragon.ml.seqmodel.data.BasicDataset
All Implemented Interfaces:
Dataset

public class BasicDataset
extends java.lang.Object
implements Dataset

Basic data structure of a set of sequence data

Copyright: Copyright (c) 2005

Company: IST, Drexel University

Version:
1.0
Author:
Davis Zhou

Constructor Summary
BasicDataset(int originalLabelNum, int markovOrder)
           
 
Method Summary
 boolean add(DataSequence seq)
           
 Dataset copy()
           
 int getLabelNum()
          Gets the number of unique labels.
 int getMarkovOrder()
          Gets the order of the markov chain
 int getOriginalLabelNum()
          Gets the number of original unique labels no matter what order the markov chain is.
 boolean hasNext()
          Tests if the next sequence exists
 DataSequence next()
          Reads out the next sequence
 int size()
          Gets the number of sequences in the dataset
 void startScan()
          Moves the pointer to the position before the first sequence.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicDataset

public BasicDataset(int originalLabelNum,
                    int markovOrder)
Method Detail

copy

public Dataset copy()

size

public int size()
Description copied from interface: Dataset
Gets the number of sequences in the dataset

Specified by:
size in interface Dataset
Returns:
the number of sequences in the dataset

startScan

public void startScan()
Description copied from interface: Dataset
Moves the pointer to the position before the first sequence.

Specified by:
startScan in interface Dataset

hasNext

public boolean hasNext()
Description copied from interface: Dataset
Tests if the next sequence exists

Specified by:
hasNext in interface Dataset
Returns:
true if next sequence exists

next

public DataSequence next()
Description copied from interface: Dataset
Reads out the next sequence

Specified by:
next in interface Dataset
Returns:
the next sequence if any, otherwise null

add

public boolean add(DataSequence seq)

getLabelNum

public int getLabelNum()
Description copied from interface: Dataset
Gets the number of unique labels. If there are 4 original labels and the markov chain is of the second order, this method returns 16.

Specified by:
getLabelNum in interface Dataset
Returns:
the number of unique labels.

getOriginalLabelNum

public int getOriginalLabelNum()
Description copied from interface: Dataset
Gets the number of original unique labels no matter what order the markov chain is.

Specified by:
getOriginalLabelNum in interface Dataset
Returns:
the number of original unique labels no matter what order the markov chain is.

getMarkovOrder

public int getMarkovOrder()
Description copied from interface: Dataset
Gets the order of the markov chain

Specified by:
getMarkovOrder in interface Dataset
Returns:
the order of the markov chain