|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ostore.oil.patchwork.PatchworkModel.Delta
A PatchworkModel.Delta
object contains a diff
of the sufficient statistics for a PatchworkModel
.
Constructor Summary | |
PatchworkModel.Delta()
Construct a new Delta . |
|
PatchworkModel.Delta(byte[] data,
int[] offset)
Construct a Delta from its
QuickSerializable form. |
Method Summary | |
Object |
clone()
Clone this delta |
Matrix |
getMatrix()
Returns a Matrix containing all the delta information. |
void |
storeDeltas(NodeId id,
Array deltas)
Store an Array representing the deltas
for the node id . |
Model.Delta |
sum(Model.Delta other)
Specified by ostore.oil.Model.Delta interface |
void |
to_bytes(byte[] data,
int[] offset)
Specified by ostore.util.QuickSerializable |
String |
toString()
Returns a String representation of this Delta |
int |
type_code()
Specified by ostore.util.QuickSerializable |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public PatchworkModel.Delta(byte[] data, int[] offset) throws QSException
Delta
from its
QuickSerializable
form.
See to_bytes(byte[], int[])
.public PatchworkModel.Delta()
Delta
.Method Detail |
public void storeDeltas(NodeId id, Array deltas)
Array
representing the deltas
for the node id
. The deltas are doubles
indexed by QSInt
types in PatchworkModel
.
Overwrites any existing deltas for that id.id
- the node to record deltas fordeltas
- the deltas themselvespublic Matrix getMatrix()
Matrix
containing all the delta information.
Arrays
of deltas are indexed by NodeId
,
while deltas within those Arrays
are indexed by
QSInts
.Matrix
of deltaspublic Model.Delta sum(Model.Delta other)
sum
in interface Model.Delta
ostore.oil.Model.Delta
other
- The other Delta
.Delta
, constructed such that applying
it to a Model
produces an equivalent
Model
to that produced by adding first
this
, then other
.IllegalArgumentException
- if other
is not
an instance of a compatible Delta
subclass.public void to_bytes(byte[] data, int[] offset)
to_bytes
in interface QuickSerializable
ostore.util.QuickSerializable
data
- The byte array to store into, or null
.offset
- A single element array whose first
element is the index in data to begin writing at on
function entry, and which on function exit has been
incremented by the number of bytes written.public int type_code()
type_code
in interface QuickSerializable
ostore.util.QuickSerializable
public Object clone() throws CloneNotSupportedException
clone
in class Object
public String toString()
Delta
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |