Commit 3dacd3fc authored by mzed's avatar mzed
Browse files

safer rapidStream push for JS

parent 5716a8bf
......@@ -208,8 +208,8 @@ int main(int argc, const char * argv[]) {
//std::cout << "knn from file: " << myKnnFromFile.run(inputVec)[0] << std::endl;
assert(myKnn.run(inputVec)[0] == 20);
//assert(myKnn.run(inputVec)[0] == myKnnFromString.run(inputVec)[0]);
//assert(myKnn.run(inputVec)[0] == myKnnFromFile.run(inputVec)[0]);
assert(myKnn.run(inputVec)[0] == myKnnFromString.run(inputVec)[0]);
assert(myKnn.run(inputVec)[0] == myKnnFromFile.run(inputVec)[0]);
try {
myKnn.run(emptyVec);
......
......@@ -10,7 +10,7 @@
"use strict";
console.log("RapidLib 08.12.2017 16:54");
console.log("RapidLib 12.12.2017 17:50");
/**
* Utility function to convert js objects into C++ trainingSets
......@@ -566,7 +566,7 @@ Module.SeriesClassification.prototype = {
Module.StreamBuffer = function (windowSize) {
if (windowSize) {
this.rapidStream = new Module.RapidStreamCpp(windowSize);
this.rapidStream = new Module.RapidStreamCpp(parseFloat(windowSize));
} else {
this.rapidStream = new Module.RapidStreamCpp();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment