001    package calhoun.analysis.crf;
002    
003    import calhoun.util.DenseBooleanMatrix2D;
004    
005    /** overall itnerface for an entire model.  The model contains the hidden state defintions and transitions as well as all of the features.
006     */ 
007    public interface ModelManager extends FeatureManagerEdge, FeatureManagerNode, FeatureManagerEdgeExplicitLength, FeatureManagerNodeExplicitLength {
008            
009            /** the number of hidden states.
010             * @return the number of hidden states
011             */
012            public int getNumStates();
013    
014            /** looks up the human readable name of a hidden state given it's index.
015             * @return string name of the state with this index.
016             */
017            public String getStateName(int state);
018    
019            /** looks up a hidden state's index given it's human readable name.
020             * @return index of the state with this name.
021             */
022            public int getStateIndex(String name);
023            
024            /** returns a boolean matrix where each <code>(row, column)</code> entry contains true if the
025             * model has a legal transition between state <code>row</code> and state <code>column</code>.
026             * A ModelManager may safely return null if all transitions are legal.
027             * @return a boolean matrix containing the legal transitions.
028             */
029            public DenseBooleanMatrix2D getLegalTransitions();
030    }