public class GroupSerializer
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
GroupSerializer.Precision
A flag for how decimal values should be serialized and methods for
converting doubles or doubles as long bits appropriately.
|
Constructor and Description |
---|
GroupSerializer() |
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] args)
Test Main
|
static byte[] |
rowCompMat2CompByteArray(long[] riCompressedMat,
GroupSerializer.Precision precision)
Converts a complete row compressed represenation of a matrix into a byte
array.
|
static void |
serializeCompressedSynGroup(SynapseGroup synGrp,
GroupSerializer.Precision wtPrecision,
java.lang.String filename)
Saves a synapse group with a given precision representing its weights to
a file with the given filename.
|
public static void serializeCompressedSynGroup(SynapseGroup synGrp, GroupSerializer.Precision wtPrecision, java.lang.String filename)
rowCompMat2CompByteArray(long[], Precision)
.synGrp
- the synapse group to serializewtPrecision
- the precision (32 or 64 bit) used to store the weight valuesfilename
- the name of the file containing the synapse group information.public static byte[] rowCompMat2CompByteArray(long[] riCompressedMat, GroupSerializer.Precision precision)
riCompressedMat
- row compressed matrix where column values are separated by a
new row code (-1 or 0xffffffff) representing positions in a
sparse matrixprecision
- public static void main(java.lang.String[] args)
args
-