Verified Commit c9970776 authored by Stefan Brunecker's avatar Stefan Brunecker
Browse files

Avoid size is not a function error

parent 2e96670d
......@@ -31,8 +31,8 @@ function setInNoRangeNoUnit(_inNoRangeNoUnit) {
//check dimension
var dim = math.matrix([4]);
if (!math.deepEqual(value.size(), dim)) {
throw "inNoRangeNoUnit: Input has dimension " + value.size() + " but expected " + dim;
if (!math.deepEqual(math.size(value), dim)) {
throw "inNoRangeNoUnit: Input has dimension " + math.size(value) + " but expected " + dim;
}
var array = [];
......
......@@ -33,8 +33,8 @@ function setInRangeNoUnit(_inRangeNoUnit) {
//check dimension
var dim = math.matrix([4]);
if (!math.deepEqual(value.size(), dim)) {
throw "inRangeNoUnit: Input has dimension " + value.size() + " but expected " + dim;
if (!math.deepEqual(math.size(value), dim)) {
throw "inRangeNoUnit: Input has dimension " + math.size(value) + " but expected " + dim;
}
var array = [];
......
......@@ -33,8 +33,8 @@ function setInRangeUnit(_inRangeUnit) {
//check dimension
var dim = math.matrix([4]);
if (!math.deepEqual(value.size(), dim)) {
throw "inRangeUnit: Input has dimension " + value.size() + " but expected " + dim;
if (!math.deepEqual(math.size(value), dim)) {
throw "inRangeUnit: Input has dimension " + math.size(value) + " but expected " + dim;
}
var array = [];
......
......@@ -31,8 +31,8 @@ function setInNoRangeNoUnit(_inNoRangeNoUnit) {
//check dimension
var dim = math.matrix([3, 1]);
if (!math.deepEqual(value.size(), dim)) {
throw "inNoRangeNoUnit: Input has dimension " + value.size() + " but expected " + dim;
if (!math.deepEqual(math.size(value), dim)) {
throw "inNoRangeNoUnit: Input has dimension " + math.size(value) + " but expected " + dim;
}
var array = [];
......
......@@ -33,8 +33,8 @@ function setInRangeNoUnit(_inRangeNoUnit) {
//check dimension
var dim = math.matrix([3, 1]);
if (!math.deepEqual(value.size(), dim)) {
throw "inRangeNoUnit: Input has dimension " + value.size() + " but expected " + dim;
if (!math.deepEqual(math.size(value), dim)) {
throw "inRangeNoUnit: Input has dimension " + math.size(value) + " but expected " + dim;
}
var array = [];
......
......@@ -34,8 +34,8 @@ function setInRangeUnit(_inRangeUnit) {
//check dimension
var dim = math.matrix([3, 1]);
if (!math.deepEqual(value.size(), dim)) {
throw "inRangeUnit: Input has dimension " + value.size() + " but expected " + dim;
if (!math.deepEqual(math.size(value), dim)) {
throw "inRangeUnit: Input has dimension " + math.size(value) + " but expected " + dim;
}
var array = [];
......
......@@ -31,8 +31,8 @@ function setInNoRangeNoUnit(_inNoRangeNoUnit) {
//check dimension
var dim = math.matrix([4, 2, 3]);
if (!math.deepEqual(value.size(), dim)) {
throw "inNoRangeNoUnit: Input has dimension " + value.size() + " but expected " + dim;
if (!math.deepEqual(math.size(value), dim)) {
throw "inNoRangeNoUnit: Input has dimension " + math.size(value) + " but expected " + dim;
}
var array = [];
......
......@@ -33,8 +33,8 @@ function setInRangeNoUnit(_inRangeNoUnit) {
//check dimension
var dim = math.matrix([4, 2, 3]);
if (!math.deepEqual(value.size(), dim)) {
throw "inRangeNoUnit: Input has dimension " + value.size() + " but expected " + dim;
if (!math.deepEqual(math.size(value), dim)) {
throw "inRangeNoUnit: Input has dimension " + math.size(value) + " but expected " + dim;
}
var array = [];
......
......@@ -33,8 +33,8 @@ function setInRangeUnit(_inRangeUnit) {
//check dimension
var dim = math.matrix([4, 2, 3]);
if (!math.deepEqual(value.size(), dim)) {
throw "inRangeUnit: Input has dimension " + value.size() + " but expected " + dim;
if (!math.deepEqual(math.size(value), dim)) {
throw "inRangeUnit: Input has dimension " + math.size(value) + " but expected " + dim;
}
var array = [];
......
......@@ -31,8 +31,8 @@ function setInNoRangeNoUnit(_inNoRangeNoUnit) {
//check dimension
var dim = math.matrix([2, 3]);
if (!math.deepEqual(value.size(), dim)) {
throw "inNoRangeNoUnit: Input has dimension " + value.size() + " but expected " + dim;
if (!math.deepEqual(math.size(value), dim)) {
throw "inNoRangeNoUnit: Input has dimension " + math.size(value) + " but expected " + dim;
}
var array = [];
......
......@@ -33,8 +33,8 @@ function setInRangeNoUnit(_inRangeNoUnit) {
//check dimension
var dim = math.matrix([2, 3]);
if (!math.deepEqual(value.size(), dim)) {
throw "inRangeNoUnit: Input has dimension " + value.size() + " but expected " + dim;
if (!math.deepEqual(math.size(value), dim)) {
throw "inRangeNoUnit: Input has dimension " + math.size(value) + " but expected " + dim;
}
var array = [];
......
......@@ -33,8 +33,8 @@ function setInRangeUnit(_inRangeUnit) {
//check dimension
var dim = math.matrix([2, 3]);
if (!math.deepEqual(value.size(), dim)) {
throw "inRangeUnit: Input has dimension " + value.size() + " but expected " + dim;
if (!math.deepEqual(math.size(value), dim)) {
throw "inRangeUnit: Input has dimension " + math.size(value) + " but expected " + dim;
}
var array = [];
......
......@@ -31,8 +31,8 @@ function setInNoRangeNoUnit(_inNoRangeNoUnit) {
//check dimension
var dim = math.matrix([1, 3]);
if (!math.deepEqual(value.size(), dim)) {
throw "inNoRangeNoUnit: Input has dimension " + value.size() + " but expected " + dim;
if (!math.deepEqual(math.size(value), dim)) {
throw "inNoRangeNoUnit: Input has dimension " + math.size(value) + " but expected " + dim;
}
var array = [];
......
......@@ -33,8 +33,8 @@ function setInRangeNoUnit(_inRangeNoUnit) {
//check dimension
var dim = math.matrix([1, 3]);
if (!math.deepEqual(value.size(), dim)) {
throw "inRangeNoUnit: Input has dimension " + value.size() + " but expected " + dim;
if (!math.deepEqual(math.size(value), dim)) {
throw "inRangeNoUnit: Input has dimension " + math.size(value) + " but expected " + dim;
}
var array = [];
......
......@@ -33,8 +33,8 @@ function setInRangeUnit(_inRangeUnit) {
//check dimension
var dim = math.matrix([1, 3]);
if (!math.deepEqual(value.size(), dim)) {
throw "inRangeUnit: Input has dimension " + value.size() + " but expected " + dim;
if (!math.deepEqual(math.size(value), dim)) {
throw "inRangeUnit: Input has dimension " + math.size(value) + " but expected " + dim;
}
var array = [];
......
......@@ -32,8 +32,8 @@ function setInThousandsMatrixArray(_inThousandsMatrixArray) {
//check dimension
var dim = math.matrix([1111, 1234, 3, 1200300]);
if (!math.deepEqual(value.size(), dim)) {
throw "inThousandsMatrixArray: Input has dimension " + value.size() + " but expected " + dim;
if (!math.deepEqual(math.size(value), dim)) {
throw "inThousandsMatrixArray: Input has dimension " + math.size(value) + " but expected " + dim;
}
var array = [];
......
......@@ -38,8 +38,8 @@ function setM1(_m1) {
//check dimension
var dim = math.matrix([2, 3]);
if (!math.deepEqual(value.size(), dim)) {
throw "m1: Input has dimension " + value.size() + " but expected " + dim;
if (!math.deepEqual(math.size(value), dim)) {
throw "m1: Input has dimension " + math.size(value) + " but expected " + dim;
}
var array = [];
......@@ -79,8 +79,8 @@ function setM2(_m2) {
//check dimension
var dim = math.matrix([3, 1]);
if (!math.deepEqual(value.size(), dim)) {
throw "m2: Input has dimension " + value.size() + " but expected " + dim;
if (!math.deepEqual(math.size(value), dim)) {
throw "m2: Input has dimension " + math.size(value) + " but expected " + dim;
}
var array = [];
......
......@@ -54,8 +54,8 @@ function execute() {
<#if setter.dimension??>
//check dimension
var dim = math.matrix([${setter.dimension?join(", ")}]);
if (!math.deepEqual(${varName}.size(), dim)) {
throw "${portName}: Input has dimension " + ${varName}.size() + " but expected " + dim;
if (!math.deepEqual(math.size(${varName}), dim)) {
throw "${portName}: Input has dimension " + math.size(${varName}) + " but expected " + dim;
}
var array = [];
......
Supports Markdown
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