MCPcopy Index your code
hub / github.com/BrainJS/brain.js / previousConnectionIndex

Function previousConnectionIndex

browser.js:3963–3972  ·  view source on GitHub ↗
(m)

Source from the content-addressed store, hash-verified

3961 }
3962
3963 function previousConnectionIndex(m) {
3964 var connection = model.equationConnections[0];
3965 var states = equations[0].states;
3966 for (var i = 0, max = states.length; i < max; i++) {
3967 if (states[i].product === m) {
3968 return i;
3969 }
3970 }
3971 return connection.indexOf(m);
3972 }
3973
3974 function matrixToString(m, stateIndex) {
3975 if (!m || !m.rows || !m.columns) return 'null';

Callers 3

matrixOriginFunction · 0.85
matrixOriginMethod · 0.85
matrixOriginMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected