node-red-contrib-prib-functions 0.17.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -1
- package/matrix/icons/icons8-matrix-desktop-80.png +0 -0
- package/matrix/matrix.js +614 -0
- package/matrix/matrixNode.html +224 -0
- package/matrix/matrixNode.js +145 -0
- package/package.json +19 -3
- package/test/dataAnalysis.js +1 -1
- package/test/matrix/01base.js +338 -0
- package/test/matrix/10flowMatrices.js +68 -0
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
<script type="text/javascript">
|
|
2
|
+
/*globals RED */
|
|
3
|
+
RED.nodes.registerType('matrix', {
|
|
4
|
+
category: 'function',
|
|
5
|
+
color: '#fdeea2',
|
|
6
|
+
defaults: {
|
|
7
|
+
name: {value:null},
|
|
8
|
+
action: {value: "create",required:true},
|
|
9
|
+
args: {value:[]},
|
|
10
|
+
arg: {value:null},
|
|
11
|
+
"arg-type": {value:"msg"},
|
|
12
|
+
column: {value:null},
|
|
13
|
+
"column-type": {value:"num"},
|
|
14
|
+
end: {value:null},
|
|
15
|
+
"end-type": {value:"num"},
|
|
16
|
+
factor: {value:null},
|
|
17
|
+
"factor-type": {value:"num"},
|
|
18
|
+
precision: {value:3},
|
|
19
|
+
"precision-type": {value:"num"},
|
|
20
|
+
row: {value:3},
|
|
21
|
+
"row-type": {value:"num"},
|
|
22
|
+
rowTarget: {value:null},
|
|
23
|
+
"rowTarget-type": {value:"num"},
|
|
24
|
+
source: {value:"_matrix"},
|
|
25
|
+
"source-type": {value:"msg"},
|
|
26
|
+
matrix: {value:"payload"},
|
|
27
|
+
"matrix-type": {value:"msg"},
|
|
28
|
+
start: {value:null},
|
|
29
|
+
"start-type": {value:"num"},
|
|
30
|
+
target: {value:"_matrix"},
|
|
31
|
+
"target-type": {value:"msg"},
|
|
32
|
+
value: {value:"payload"},
|
|
33
|
+
"value-type": {value:"msg"}
|
|
34
|
+
},
|
|
35
|
+
inputs: 1,
|
|
36
|
+
outputs: 2,
|
|
37
|
+
icon: "icons8-matrix-desktop-80.png",
|
|
38
|
+
align: 'left',
|
|
39
|
+
paletteLabel: "Matrix",
|
|
40
|
+
inputLabels: "Message In",
|
|
41
|
+
outputLabels: ["Message Out","Error"],
|
|
42
|
+
label: function () {
|
|
43
|
+
return this.name || ("Matrix "+this.action||"*** new ***");
|
|
44
|
+
},
|
|
45
|
+
oneditprepare: function() {
|
|
46
|
+
const node=this;
|
|
47
|
+
let properties=[];
|
|
48
|
+
const baseDiv=$("#node-inputDynamicBase");
|
|
49
|
+
function defineProperty(property,...types) {
|
|
50
|
+
const inputNode=$('<input type="text" id="node-input-'+property.name+'"/>').val(node[property.name]);
|
|
51
|
+
const typeNode=$('<input type="hidden" id="node-input-'+property.name+'-type"/>');
|
|
52
|
+
const element= $('<div/>',{ "class": "form-row form-row-http-in-"+property.name+" hide" }).append([
|
|
53
|
+
$('<label for="node-input-'+property.name+'" style="white-space: nowrap"><i class="icon-'+(property.icon||'-bookmark')+'"></i> '+property.label+'</label>'),
|
|
54
|
+
inputNode,typeNode
|
|
55
|
+
]);
|
|
56
|
+
element.appendTo(baseDiv);
|
|
57
|
+
properties.push(property.name);
|
|
58
|
+
const typeValue=node[property.name+"-type"];
|
|
59
|
+
if(typeValue) typeNode.val(typeValue);
|
|
60
|
+
$("#node-input-"+property.name).typedInput({
|
|
61
|
+
type:typeValue||types[0],
|
|
62
|
+
types:types,
|
|
63
|
+
typeField: "#node-input-"+property.name+"-type"
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
defineProperty({name:"source" ,label:"Source" ,icon:"tag"},"msg","flow","global");
|
|
67
|
+
defineProperty({name:"arg" ,label:"Argument" ,icon:"tag"},"num","json","msg","flow","global","env");
|
|
68
|
+
defineProperty({name:"matrix" ,label:"Matrix" ,icon:"tag"},"msg","flow","global");
|
|
69
|
+
defineProperty({name:"target" ,label:"Target" ,icon:"tag"},"msg","flow","global");
|
|
70
|
+
defineProperty({name:"column" ,label:"Column" ,icon:"tag"},"num","msg","flow","global");
|
|
71
|
+
defineProperty({name:"row" ,label:"Row" ,icon:"tag"},"num","msg","flow","global");
|
|
72
|
+
defineProperty({name:"value" ,label:"Value" ,icon:"tag"},"num","msg","flow","global");
|
|
73
|
+
defineProperty({name:"rowTarget",label:"Target Row" ,icon:"tag"},"num","msg","flow","global");
|
|
74
|
+
defineProperty({name:"factor" ,label:"Factor" ,icon:"tag"},"num","msg","flow","global");
|
|
75
|
+
defineProperty({name:"precision",label:"Precision" ,icon:"tag"},"num","msg","flow","global");
|
|
76
|
+
defineProperty({name:"start" ,label:"Start" ,icon:"tag"},"num","msg","flow","global");
|
|
77
|
+
defineProperty({name:"end" ,label:"End" ,icon:"tag"},"num","msg","flow","global");
|
|
78
|
+
|
|
79
|
+
const actionNode=$("#node-input-action");
|
|
80
|
+
actionNode.typedInput({
|
|
81
|
+
types: [{
|
|
82
|
+
value: "actionType",
|
|
83
|
+
options: [
|
|
84
|
+
{value:"define", label:"Define"},
|
|
85
|
+
{value:"defineEmpty", label:"Define Empty"},
|
|
86
|
+
{value:"create", label:"Create"},
|
|
87
|
+
{value:"createLike", label:"Create Like"},
|
|
88
|
+
{value:"clone", label:"Clone"},
|
|
89
|
+
{value:"add", label:"Add"},
|
|
90
|
+
{value:"addRow2Row", label:"Add Row to Row"},
|
|
91
|
+
{value:"addCell", label:"Add to Cell"},
|
|
92
|
+
{value:"addRow", label:"Add Row"},
|
|
93
|
+
{value:"subtractCell", label:"Subtract Cell"},
|
|
94
|
+
{value:"multiple", label:"Multiple"},
|
|
95
|
+
{value:"multipleCell", label:"Multiple Cell"},
|
|
96
|
+
{value:"divideCell", label:"Divide Cell"},
|
|
97
|
+
{value:"divideRow", label:"Divide Row"},
|
|
98
|
+
{value:"transpose", label:"Transpose"},
|
|
99
|
+
{value:"getAdjoint", label:"Adjoint"},
|
|
100
|
+
{value:"getCofactor", label:"Cofactor"},
|
|
101
|
+
{value:"getComplementMinor", label:"Complement Minor"},
|
|
102
|
+
{value:"getIdentity", label:"Identity"},
|
|
103
|
+
{value:"getInverse", label:"Inverse"},
|
|
104
|
+
{value:"getInverseAdjointMethod",label:"Inverse (Adjoint Method)"},
|
|
105
|
+
{value:"getInverseGaussJordan" ,label:"Inverse (Gauss Jordan Method)"},
|
|
106
|
+
{value:"getDeterminant", label:"Determinant"},
|
|
107
|
+
{value:"getDeterminantUsingCofactor",label:"Determinant (Cofactor)"},
|
|
108
|
+
{value:"getDeterminantUsingCofactor",label:"Determinant (Row Echelon Form)"},
|
|
109
|
+
{value:"backwardSubstitution", label:"Backward Substitution"},
|
|
110
|
+
{value:"forwardElimination", label:"Forward Elimination"},
|
|
111
|
+
{value:"gaussianElimination", label:"Gaussian Elimination"},
|
|
112
|
+
{value:"reducedRowEchelonForm", label:"Reduced Row EchelonForm"},
|
|
113
|
+
{value:"rowEchelonForm", label:"Row Echelon Form"},
|
|
114
|
+
{value:"equalsNearly", label:"Nearly Equals"},
|
|
115
|
+
{value:"testIsSquare", label:"Is Square"},
|
|
116
|
+
{value:"get", label:"Get Cell"},
|
|
117
|
+
{value:"sumRow", label:"Sum Row"},
|
|
118
|
+
{value:"swapRows", label:"Swap Rows"},
|
|
119
|
+
{value:"toArray", label:"To Array Object"}
|
|
120
|
+
]
|
|
121
|
+
}]
|
|
122
|
+
});
|
|
123
|
+
//Matrix.prototype.createForEachCellPairSet=function(matrix,call){
|
|
124
|
+
//Matrix.prototype.findRowColumn=function(row,call,startColumn=0,endColumn=this.columns-1){
|
|
125
|
+
//Matrix.prototype.forRowCells=function(row,call,startColumn=0,endColumn=this.columns-1){
|
|
126
|
+
//Matrix.prototype.fillArray=function(a){
|
|
127
|
+
//Matrix.prototype.findColumnRow=function(column,call,startRow=0,endRow=this.rows-1){
|
|
128
|
+
//Matrix.prototype.forColumnCells=function(column,call,startRow=0,endRow=this.rows-1){
|
|
129
|
+
//Matrix.prototype.forEachCell=function(call){
|
|
130
|
+
//Matrix.prototype.forEachRow=function(call){
|
|
131
|
+
//Matrix.prototype.forEachCellPairSet=function(matrix,call){
|
|
132
|
+
//Matrix.prototype.getIndex=function(row, column){
|
|
133
|
+
//Matrix.prototype.getZeroed=function(row, column){
|
|
134
|
+
//Matrix.prototype.getMatrix=function(row,column,rows,columns){
|
|
135
|
+
//Matrix.prototype.getRow=function(row){
|
|
136
|
+
//Matrix.prototype.maxAbsColumn=function(column,startRow=0){
|
|
137
|
+
//Matrix.prototype.maxColumn=function(column,startRow=0){
|
|
138
|
+
//Matrix.prototype.multiplyRow=function(row,factor){
|
|
139
|
+
//Matrix.prototype.reduceRow=function(row,call,value=0){
|
|
140
|
+
//Matrix.prototype.set=function(row,column,value){
|
|
141
|
+
//Matrix.prototype.setRow=function(vector,row){
|
|
142
|
+
actionNode.change(function() {
|
|
143
|
+
action=$(this).val();
|
|
144
|
+
let show=["source","target"];
|
|
145
|
+
node.args=[];
|
|
146
|
+
properties.forEach(property=>$(".form-row-http-in-"+property).hide());
|
|
147
|
+
if(["forwardElimination","backwardSubstitution","gaussianElimination",
|
|
148
|
+
"reducedRowEchelonForm","rowEchelonForm","testIsSquare"].includes(action)) {
|
|
149
|
+
show=["source"];
|
|
150
|
+
} else if(["equalsNearly"].includes(action)) {
|
|
151
|
+
show=["source"];
|
|
152
|
+
node.args=["matrix"];
|
|
153
|
+
} else if(["define"].includes(action)) {
|
|
154
|
+
show=["target"];
|
|
155
|
+
node.args=["row","column"];
|
|
156
|
+
} else if(["addCell","subtractCell","multiplyCell","divideCell"].includes(action)) {
|
|
157
|
+
show=["source"];
|
|
158
|
+
node.args=["row","column","value"];
|
|
159
|
+
} else if(["get","getComplementMinor","getCofactor"].includes(action)) {
|
|
160
|
+
show=["source","target"];
|
|
161
|
+
node.args=["row","column"];
|
|
162
|
+
} else if(["sumRow"].includes(action)){
|
|
163
|
+
node.args=["row"];
|
|
164
|
+
} else if(["define"].includes(action)){
|
|
165
|
+
show=["target"];
|
|
166
|
+
node.args=["row","column"];
|
|
167
|
+
} else if(["defineEmpty"].includes(action)){
|
|
168
|
+
show=["target"];
|
|
169
|
+
node.args=["row","column"];
|
|
170
|
+
} else if(["swapRows"].includes(action)){
|
|
171
|
+
show=["source"];
|
|
172
|
+
node.args["row","rowTarget"];
|
|
173
|
+
} else if(["addRow2Row"].includes(action)){
|
|
174
|
+
show=["source"];
|
|
175
|
+
node.args["row","rowTarget","factor","start","end"];
|
|
176
|
+
} else if(["divideRow"].includes(action)){
|
|
177
|
+
show=["source"];
|
|
178
|
+
node.args["row","factor","start","end"];
|
|
179
|
+
} else if(["toArray"].includes(action)){
|
|
180
|
+
node.args["precision"];
|
|
181
|
+
};
|
|
182
|
+
node.args.forEach(property=>$(".form-row-http-in-"+property).show());
|
|
183
|
+
show.forEach(property=>$(".form-row-http-in-"+property).show());
|
|
184
|
+
});
|
|
185
|
+
},
|
|
186
|
+
oneditsave: function() {
|
|
187
|
+
},
|
|
188
|
+
oneditresize: function() {
|
|
189
|
+
},
|
|
190
|
+
resizeRule: function(file,newWidth) {
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
</script>
|
|
194
|
+
|
|
195
|
+
<script type="text/x-red" data-template-name="matrix">
|
|
196
|
+
|
|
197
|
+
<div class="form-row">
|
|
198
|
+
<label for="node-input-name"><i class="fa fa-tag"></i> Name </label>
|
|
199
|
+
<input type="text" id="node-input-name" placeholder="Name">
|
|
200
|
+
</div>
|
|
201
|
+
<div class="form-row">
|
|
202
|
+
<label for="node-input-action" style="white-space: nowrap"><i class="icon-list"></i> Action</label>
|
|
203
|
+
<input type="text" id="node-input-action">
|
|
204
|
+
</div>
|
|
205
|
+
<div class="form-row form-row-http-in-source1Propertyx hide">
|
|
206
|
+
<label for="node-input-source1Propertyx" style="white-space: nowrap"><i class="icon-bookmark"></i> Sourcex`</label>
|
|
207
|
+
<input type="text" id="node-input-source1Propertyx">
|
|
208
|
+
<input type="hidden" id="node-input-source1Propertyx-type">
|
|
209
|
+
</div>
|
|
210
|
+
<div id="node-inputDynamicBase"/>
|
|
211
|
+
</script>
|
|
212
|
+
|
|
213
|
+
<script type="text/x-red" data-help-name="matrix">
|
|
214
|
+
<p>
|
|
215
|
+
Matrix manipulation
|
|
216
|
+
</p>
|
|
217
|
+
<h3>Inputs</h3>
|
|
218
|
+
<dl class="message-properties">
|
|
219
|
+
<dt>msg <span class="property-type">topic</span></dt>
|
|
220
|
+
<dd>incoming message with topic</dd>
|
|
221
|
+
<dt>msg <span class="property-type">payload</span></dt>
|
|
222
|
+
<dd></dd>
|
|
223
|
+
</dl>
|
|
224
|
+
</script>
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
const logger = new (require("node-red-contrib-logger"))("matrix");
|
|
2
|
+
logger.sendInfo("Copyright 2022 Jaroslav Peter Prib");
|
|
3
|
+
const Matrix = require("./matrix");
|
|
4
|
+
function error(node,message,shortMessage){
|
|
5
|
+
if(logger.active) logger.send({label:"error",node:node.id,error:error,shortMessage});
|
|
6
|
+
node.error(message);
|
|
7
|
+
node.status({fill:"red",shape:"ring",text:shortMessage});
|
|
8
|
+
}
|
|
9
|
+
function evalFunction(id,mapping){
|
|
10
|
+
logger.sendInfo({label:"evalFunction",id:id,mapping:mapping})
|
|
11
|
+
try{
|
|
12
|
+
return eval(mapping);
|
|
13
|
+
} catch(ex) {
|
|
14
|
+
logger.sendError({label:"evalFunction error",id:id,mapping:mapping,error:ex.message})
|
|
15
|
+
throw Error(id+" "+ex.message);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function evalInFunction(node,propertyName){
|
|
19
|
+
try{
|
|
20
|
+
const nodeContext = node.context();
|
|
21
|
+
const flow = nodeContext.flow;
|
|
22
|
+
const global = nodeContext.global;
|
|
23
|
+
const property=node[propertyName];
|
|
24
|
+
if(property==null) throw Error("no value for "+propertyName);
|
|
25
|
+
const propertyType=propertyName+"-type";
|
|
26
|
+
switch (node[propertyType]){
|
|
27
|
+
case "num":
|
|
28
|
+
return evalFunction(propertyName,"()=>"+property);
|
|
29
|
+
case "node":
|
|
30
|
+
return evalFunction(propertyName,"()=>nodeContext.get("+property+")");
|
|
31
|
+
case "flow":
|
|
32
|
+
if(flow) throw Error("context store may be memoryonly so flow doesn't work")
|
|
33
|
+
return evalFunction(propertyName,"()=>flow.get("+property+")");
|
|
34
|
+
case "global":
|
|
35
|
+
return evalFunction(propertyName,"()=>global.get("+property+")");
|
|
36
|
+
case "env":
|
|
37
|
+
return evalFunction(propertyName,"()=>env.get("+property+")");
|
|
38
|
+
case "msg":
|
|
39
|
+
return evalFunction(propertyName,"(msg)=>msg."+property);
|
|
40
|
+
default:
|
|
41
|
+
logger.sendInfo({label:"setData unknown type",action:node.action,propertyType:propertyType,type:node[propertyType]});
|
|
42
|
+
throw Error("unknown type "+node[propertyType])
|
|
43
|
+
}
|
|
44
|
+
} catch(ex) {
|
|
45
|
+
logger.sendError({label:"setup",error:ex.message,stack:ex.stack});
|
|
46
|
+
throw Error(property+" "+ex.message);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
module.exports = function (RED) {
|
|
50
|
+
function matrixNode(n) {
|
|
51
|
+
RED.nodes.createNode(this,n);
|
|
52
|
+
// logger.sendInfo({label:"create",node:n});
|
|
53
|
+
const node=Object.assign(this,n);
|
|
54
|
+
try{
|
|
55
|
+
if(node.source)node.getSource=evalInFunction(node,"source");
|
|
56
|
+
if(node.target) {
|
|
57
|
+
const nodeContext = node.context();
|
|
58
|
+
const flow = nodeContext.flow;
|
|
59
|
+
const global = nodeContext.global;
|
|
60
|
+
switch(node["target-type"]){
|
|
61
|
+
case "node":
|
|
62
|
+
node.setData=evalFunction("target","data=>nodeContext.set("+node.target+",data)");
|
|
63
|
+
break;
|
|
64
|
+
case "flow":
|
|
65
|
+
if(flow) throw Error("context store may be memoryonly so flow doesn't work")
|
|
66
|
+
node.setData=evalFunction("target","data=>flow.set("+node.target+",data)");
|
|
67
|
+
break;
|
|
68
|
+
case "global":
|
|
69
|
+
node.setData=evalFunction("target","data=>global.set("+node.target+",data)");
|
|
70
|
+
break;
|
|
71
|
+
case "msg":
|
|
72
|
+
node.setData=evalFunction("target","(data,msg)=>{msg."+node.target+"=data;}");
|
|
73
|
+
break;
|
|
74
|
+
default:
|
|
75
|
+
logger.sendInfo({label:"setData unknown type",action:node.action,targetType:node["target-type"]});
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
node.argFunction=[];
|
|
79
|
+
node.args.forEach(property=>{
|
|
80
|
+
node.argFunction.push(evalInFunction(node,property).bind(this));
|
|
81
|
+
})
|
|
82
|
+
function baseProcess(msg){
|
|
83
|
+
const sourceIn=node.getSource(msg);
|
|
84
|
+
if(sourceIn==null) throw Error("source data not found");
|
|
85
|
+
const sourceMatrix=(sourceIn instanceof Matrix?sourceIn:new Matrix(sourceIn));
|
|
86
|
+
const args=[];
|
|
87
|
+
node.argFunction.forEach(callFunction=> {
|
|
88
|
+
const result=callFunction(msg);
|
|
89
|
+
args.push(result);
|
|
90
|
+
});
|
|
91
|
+
return sourceMatrix[node.action].apply(sourceMatrix,args);
|
|
92
|
+
}
|
|
93
|
+
function baseProcessAndSet(msg){
|
|
94
|
+
const result=baseProcess(msg);
|
|
95
|
+
node.setData.apply(node,[result,msg]);
|
|
96
|
+
}
|
|
97
|
+
function createProcess(msg){
|
|
98
|
+
const sourceIn=node.getSource(msg);
|
|
99
|
+
if(sourceIn==null) throw Error("source data not found");
|
|
100
|
+
const sourceMatrix=(sourceIn instanceof Matrix?sourceIn.clone():new Matrix(sourceIn));
|
|
101
|
+
node.setData.apply(node,[sourceMatrix,msg]);
|
|
102
|
+
}
|
|
103
|
+
function defineProcess(msg){
|
|
104
|
+
if(logger.active) logger.sendInfo({label:"define",arg:{rows:node.row,columns:node.column}});
|
|
105
|
+
const sourceMatrix=new Matrix({rows:node.row,columns:node.column});
|
|
106
|
+
node.setData.apply(node,[sourceMatrix,msg]);
|
|
107
|
+
}
|
|
108
|
+
function defineEmptyProcess(msg){
|
|
109
|
+
if(logger.active) logger.sendInfo({label:"define",arg:{rowsMax:node.row,columns:node.column}});
|
|
110
|
+
const sourceMatrix=new Matrix({rowsMax:node.row,columns:node.column});
|
|
111
|
+
node.setData.apply(node,[sourceMatrix,msg]);
|
|
112
|
+
}
|
|
113
|
+
node.msgProcess=baseProcess;
|
|
114
|
+
if(["define"].includes(node.action)){
|
|
115
|
+
node.msgProcess=defineProcess;
|
|
116
|
+
}else if(["defineEmpty"].includes(node.action)){
|
|
117
|
+
node.msgProcess=defineEmptyProcess;
|
|
118
|
+
}else if(["create"].includes(node.action)){
|
|
119
|
+
node.msgProcess=createProcess;
|
|
120
|
+
}else{
|
|
121
|
+
if(node.action.startsWith("get")
|
|
122
|
+
|| ["create","createLike","clone","transpose","sumRow","createForEachCellPairSet",
|
|
123
|
+
,"findRowColumn","findColumnRow","maxAbsColumn","maxColumn","toArray"
|
|
124
|
+
].includes(node.action)) {
|
|
125
|
+
node.msgProcess=baseProcessAndSet;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
} catch(ex) {
|
|
129
|
+
error(node,ex,"Invalid setup "+ex.message);
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
node.status({fill:"green",shape:"ring"});
|
|
133
|
+
node.on("input",function (msg) {
|
|
134
|
+
try{
|
|
135
|
+
node.msgProcess(msg);
|
|
136
|
+
node.send(msg);
|
|
137
|
+
} catch(ex) {
|
|
138
|
+
msg.error=ex.message;
|
|
139
|
+
node.send([null,msg]);
|
|
140
|
+
if(logger.active) logger.send({label:"error",node:node.id,action:node.action,exception:ex.message,stack:ex.stack});
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
RED.nodes.registerType(logger.label, matrixNode);
|
|
145
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-prib-functions",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "Node-RED added node functions.",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"avsc": "^5.6.1",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"node-red-node-test-helper": "^0.2.7"
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
|
-
"test": "mocha \"test
|
|
21
|
+
"test": "mocha \"test/matrix/**/*.js\""
|
|
22
22
|
},
|
|
23
23
|
"repository": {
|
|
24
24
|
"type": "git",
|
|
@@ -26,32 +26,44 @@
|
|
|
26
26
|
},
|
|
27
27
|
"keywords": [
|
|
28
28
|
"node-red",
|
|
29
|
+
"adjoint",
|
|
29
30
|
"append",
|
|
30
31
|
"analysis",
|
|
31
32
|
"average",
|
|
32
33
|
"avg",
|
|
33
34
|
"AVRO",
|
|
34
35
|
"arvo",
|
|
36
|
+
"backward substitution",
|
|
35
37
|
"compare",
|
|
38
|
+
"Complement Minor",
|
|
36
39
|
"CMA",
|
|
37
40
|
"cumulative",
|
|
38
41
|
"Cumulative Moving Average",
|
|
39
42
|
"data",
|
|
40
43
|
"data analysis",
|
|
41
44
|
"delta",
|
|
45
|
+
"determinant",
|
|
42
46
|
"distance",
|
|
43
47
|
"euclidian distance",
|
|
44
48
|
"EMA",
|
|
45
49
|
"EWMA",
|
|
46
50
|
"Exponential Moving Average",
|
|
51
|
+
"forward elimination",
|
|
47
52
|
"functions",
|
|
48
|
-
"
|
|
53
|
+
"gauss jordan",
|
|
54
|
+
"Gauss Jordan Inverse",
|
|
55
|
+
"gaussian elimination",
|
|
49
56
|
"host available",
|
|
50
57
|
"host status",
|
|
58
|
+
"identity",
|
|
59
|
+
"injector",
|
|
60
|
+
"inverse",
|
|
61
|
+
"inverse matrix",
|
|
51
62
|
"Linear Correlation Coefficient",
|
|
52
63
|
"levenshtein distance",
|
|
53
64
|
"load",
|
|
54
65
|
"load injector",
|
|
66
|
+
"matrix",
|
|
55
67
|
"maximum",
|
|
56
68
|
"mean",
|
|
57
69
|
"median",
|
|
@@ -66,6 +78,8 @@
|
|
|
66
78
|
"Process",
|
|
67
79
|
"range",
|
|
68
80
|
"realtime",
|
|
81
|
+
"Reduced Row Echelon Form",
|
|
82
|
+
"Row Echelon Form",
|
|
69
83
|
"sample variance",
|
|
70
84
|
"sample stddev",
|
|
71
85
|
"Simple Moving Average",
|
|
@@ -82,6 +96,7 @@
|
|
|
82
96
|
"test",
|
|
83
97
|
"translate",
|
|
84
98
|
"transform",
|
|
99
|
+
"transpose",
|
|
85
100
|
"variance",
|
|
86
101
|
"weighted",
|
|
87
102
|
"Weighted Moving Average",
|
|
@@ -100,6 +115,7 @@
|
|
|
100
115
|
"hostAvailable": "testing/hostAvailable.js",
|
|
101
116
|
"levenshteinDistance": "levenshteinDistance/levenshteinDistanceNode.js",
|
|
102
117
|
"load-injector": "testing/load-injector.js",
|
|
118
|
+
"matrix": "matrix/matrixNode.js",
|
|
103
119
|
"monitorflow": "monitor/monitorflow.js",
|
|
104
120
|
"os": "nodejs/os.js",
|
|
105
121
|
"spawnProcess": "spawnProcess/spawnProcess.js",
|