Class StateCompressor<H extends nl.tue.astar.Head,T extends nl.tue.astar.Tail>
- java.lang.Object
-
- org.processmining.lpm.adjustedalignments.StateCompressor<H,T>
-
- All Implemented Interfaces:
nl.tue.storage.Deflater<nl.tue.astar.impl.State<H,T>>,nl.tue.storage.EqualOperation<nl.tue.astar.impl.State<H,T>>,nl.tue.storage.HashOperation<nl.tue.astar.impl.State<H,T>>,nl.tue.storage.Inflater<nl.tue.astar.impl.State<H,T>>
public class StateCompressor<H extends nl.tue.astar.Head,T extends nl.tue.astar.Tail> extends java.lang.Object implements nl.tue.storage.Inflater<nl.tue.astar.impl.State<H,T>>, nl.tue.storage.Deflater<nl.tue.astar.impl.State<H,T>>, nl.tue.storage.EqualOperation<nl.tue.astar.impl.State<H,T>>, nl.tue.storage.HashOperation<nl.tue.astar.impl.State<H,T>>
-
-
Constructor Summary
Constructors Constructor Description StateCompressor(nl.tue.astar.impl.memefficient.StorageAwareDelegate<H,T> delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeflate(nl.tue.astar.impl.State<H,T> object, java.io.OutputStream stream)deflate the given object into the provided stream.booleanequals(nl.tue.astar.impl.State<H,T> object, nl.tue.storage.CompressedStore<nl.tue.astar.impl.State<H,T>> store, long l)Check for equality between a given object and a location in the store.intgetHashCode(nl.tue.astar.impl.State<H,T> state)Returns the hashCode of the given object.intgetHashCode(nl.tue.storage.CompressedStore<nl.tue.astar.impl.State<H,T>> store, long l)Returns the hashCode of the object stored in the store at index l.intgetMaxByteCount()the method is called before each call to deflate.nl.tue.astar.impl.State<H,T>inflate(java.io.InputStream stream)read an object from a stream.
-
-
-
Method Detail
-
getHashCode
public int getHashCode(nl.tue.astar.impl.State<H,T> state)
Description copied from interface:nl.tue.storage.HashOperationReturns the hashCode of the given object.- Specified by:
getHashCodein interfacenl.tue.storage.HashOperation<H extends nl.tue.astar.Head>- Returns:
-
getHashCode
public int getHashCode(nl.tue.storage.CompressedStore<nl.tue.astar.impl.State<H,T>> store, long l) throws nl.tue.storage.StorageException
Description copied from interface:nl.tue.storage.HashOperationReturns the hashCode of the object stored in the store at index l.- Specified by:
getHashCodein interfacenl.tue.storage.HashOperation<H extends nl.tue.astar.Head>- Returns:
- Throws:
nl.tue.storage.StorageException
-
equals
public boolean equals(nl.tue.astar.impl.State<H,T> object, nl.tue.storage.CompressedStore<nl.tue.astar.impl.State<H,T>> store, long l) throws nl.tue.storage.StorageException, java.io.IOException
Description copied from interface:nl.tue.storage.EqualOperationCheck for equality between a given object and a location in the store. Should return true, if and only if the given object is indeed stored at index l in the store.- Specified by:
equalsin interfacenl.tue.storage.EqualOperation<H extends nl.tue.astar.Head>- Returns:
- Throws:
nl.tue.storage.StorageExceptionjava.io.IOException
-
deflate
public void deflate(nl.tue.astar.impl.State<H,T> object, java.io.OutputStream stream) throws java.io.IOException
Description copied from interface:nl.tue.storage.Deflaterdeflate the given object into the provided stream. This method should NOT close the stream.- Specified by:
deflatein interfacenl.tue.storage.Deflater<H extends nl.tue.astar.Head>- Throws:
java.io.IOException
-
inflate
public nl.tue.astar.impl.State<H,T> inflate(java.io.InputStream stream) throws java.io.IOException
Description copied from interface:nl.tue.storage.Inflaterread an object from a stream. The inflater should know when to stop reading and should NOT close the stream;- Specified by:
inflatein interfacenl.tue.storage.Inflater<H extends nl.tue.astar.Head>- Returns:
- Throws:
java.io.IOException
-
getMaxByteCount
public int getMaxByteCount()
Description copied from interface:nl.tue.storage.Deflaterthe method is called before each call to deflate. The call to deflate should not write more than the number of bytes returned by this method! It may write less. If a negative value is returned, then a resizeable buffer is used- Specified by:
getMaxByteCountin interfacenl.tue.storage.Deflater<H extends nl.tue.astar.Head>- Returns:
-
-