We use the org.numenta:htm.java:jar:0.6.13 which has a reference to the algorithmfoundry:algorithmfoundry-shade-culled:jar:1.3:compile
We used the SerializerCore just because we thought that it calls methods from the Persistable interface.
Is it possible to rely on the SerializerCore if it is obtained from the PersistenceAPI like it is descibed in the
Saving-Your-Network:-The-Persistence-API
Our use case is the following. We use the Kryo serializer in the Spark Streaming application and we need to store the serialized HTM objects in the Kryo.
Probably we can use the following code from the suggested PersistenceAPITest to save and restore the HTM classes in the Kryo Input/Output:
Parameters p = getParameters();
SerialConfig config = new SerialConfig("testSerializeParameters", SerialConfig.SERIAL_TEST_DIR);
PersistenceAPI api = Persistence.get(config);
// 1. serialize
byte[] data = api.write(p, "testSerializeParameters");
// save data into the Kryo Output
// 2. deserialize
// read data from the Kryo Input
Parameters serialized = api.read(data);