MAM API
(developer's version)

Class PPMModel

java.lang.Object
  extended by PPMModel
All Implemented Interfaces:
ArithmeticModel

public class PPMModel
extends Object
implements ArithmeticModel

An implementation of prediction by partial matching.


Field Summary
(package private)  int context
           
(package private)  int maxContext
           
(package private)  int[] symbols
           
(package private)  int[] totalCounts
           
(package private)  PPMTree tree
           
 
Constructor Summary
PPMModel()
           
PPMModel(int maxContext)
           
 
Method Summary
 int countToSymbol(int cum)
          Return the symbol with the cumulative count
 long highInterval(int symbol)
          Returns the high interval cumulative count of a symbol
 long lowInterval(int symbol)
          Returns the low interval cumulative count of a symbol
 void reset()
          State reset to the initial values
 long totalCount()
          Returns the total count.
 void updateModel(int symbol)
          Informs the model with last seen symbol.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

maxContext

int maxContext

context

int context

symbols

int[] symbols

totalCounts

int[] totalCounts

tree

PPMTree tree
Constructor Detail

PPMModel

public PPMModel()

PPMModel

public PPMModel(int maxContext)
Method Detail

lowInterval

public long lowInterval(int symbol)
Returns the low interval cumulative count of a symbol

Specified by:
lowInterval in interface ArithmeticModel

highInterval

public long highInterval(int symbol)
Returns the high interval cumulative count of a symbol

Specified by:
highInterval in interface ArithmeticModel

totalCount

public long totalCount()
Returns the total count.

Specified by:
totalCount in interface ArithmeticModel

updateModel

public void updateModel(int symbol)
Informs the model with last seen symbol. Model and its frequency counts are updated accordingly

Specified by:
updateModel in interface ArithmeticModel

countToSymbol

public int countToSymbol(int cum)
Return the symbol with the cumulative count

Specified by:
countToSymbol in interface ArithmeticModel

reset

public void reset()
Description copied from interface: ArithmeticModel
State reset to the initial values

Specified by:
reset in interface ArithmeticModel

MAM API
(developer's version)

Copyright © 2007 Aija Niissalo, Marko Laakso, Markus Heinonen.