id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
162,400
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/simple/SimpleBase.java
SimpleBase.convertToDense
public void convertToDense() { switch ( mat.getType() ) { case DSCC: { DMatrix m = new DMatrixRMaj(mat.getNumRows(), mat.getNumCols()); ConvertDMatrixStruct.convert((DMatrix) mat, m); setMatrix(m); } break; case FSCC: { ...
java
public void convertToDense() { switch ( mat.getType() ) { case DSCC: { DMatrix m = new DMatrixRMaj(mat.getNumRows(), mat.getNumCols()); ConvertDMatrixStruct.convert((DMatrix) mat, m); setMatrix(m); } break; case FSCC: { ...
[ "public", "void", "convertToDense", "(", ")", "{", "switch", "(", "mat", ".", "getType", "(", ")", ")", "{", "case", "DSCC", ":", "{", "DMatrix", "m", "=", "new", "DMatrixRMaj", "(", "mat", ".", "getNumRows", "(", ")", ",", "mat", ".", "getNumCols", ...
Switches from a sparse to dense matrix
[ "Switches", "from", "a", "sparse", "to", "dense", "matrix" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/simple/SimpleBase.java#L1525-L1545
162,401
lessthanoptimal/ejml
main/ejml-experimental/src/org/ejml/dense/blockd3/BlockD3MatrixOps.java
BlockD3MatrixOps.multBlockAdd
private static void multBlockAdd( double []blockA, double []blockB, double []blockC, final int m, final int n, final int o, final int blockLength ) { // for( int i = 0; i < m; i++ ) { // for( int j = 0; j < o; j++ ) { // ...
java
private static void multBlockAdd( double []blockA, double []blockB, double []blockC, final int m, final int n, final int o, final int blockLength ) { // for( int i = 0; i < m; i++ ) { // for( int j = 0; j < o; j++ ) { // ...
[ "private", "static", "void", "multBlockAdd", "(", "double", "[", "]", "blockA", ",", "double", "[", "]", "blockB", ",", "double", "[", "]", "blockC", ",", "final", "int", "m", ",", "final", "int", "n", ",", "final", "int", "o", ",", "final", "int", ...
Performs a matrix multiplication between inner block matrices. (m , o) += (m , n) * (n , o)
[ "Performs", "a", "matrix", "multiplication", "between", "inner", "block", "matrices", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-experimental/src/org/ejml/dense/blockd3/BlockD3MatrixOps.java#L169-L219
162,402
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/decomposition/lu/LUDecompositionBase_DDRM.java
LUDecompositionBase_DDRM._solveVectorInternal
public void _solveVectorInternal( double []vv ) { // Solve L*Y = B int ii = 0; for( int i = 0; i < n; i++ ) { int ip = indx[i]; double sum = vv[ip]; vv[ip] = vv[i]; if( ii != 0 ) { // for( int j = ii-1; j < i; j++ ) // ...
java
public void _solveVectorInternal( double []vv ) { // Solve L*Y = B int ii = 0; for( int i = 0; i < n; i++ ) { int ip = indx[i]; double sum = vv[ip]; vv[ip] = vv[i]; if( ii != 0 ) { // for( int j = ii-1; j < i; j++ ) // ...
[ "public", "void", "_solveVectorInternal", "(", "double", "[", "]", "vv", ")", "{", "// Solve L*Y = B", "int", "ii", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "n", ";", "i", "++", ")", "{", "int", "ip", "=", "indx", "[", "i...
a specialized version of solve that avoid additional checks that are not needed.
[ "a", "specialized", "version", "of", "solve", "that", "avoid", "additional", "checks", "that", "are", "not", "needed", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/decomposition/lu/LUDecompositionBase_DDRM.java#L213-L236
162,403
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/Operation.java
Operation.resize
protected void resize( VariableMatrix mat , int numRows , int numCols ) { if( mat.isTemp() ) { mat.matrix.reshape(numRows,numCols); } }
java
protected void resize( VariableMatrix mat , int numRows , int numCols ) { if( mat.isTemp() ) { mat.matrix.reshape(numRows,numCols); } }
[ "protected", "void", "resize", "(", "VariableMatrix", "mat", ",", "int", "numRows", ",", "int", "numCols", ")", "{", "if", "(", "mat", ".", "isTemp", "(", ")", ")", "{", "mat", ".", "matrix", ".", "reshape", "(", "numRows", ",", "numCols", ")", ";", ...
If the variable is a local temporary variable it will be resized so that the operation can complete. If not temporary then it will not be reshaped @param mat Variable containing the matrix @param numRows Desired number of rows @param numCols Desired number of columns
[ "If", "the", "variable", "is", "a", "local", "temporary", "variable", "it", "will", "be", "resized", "so", "that", "the", "operation", "can", "complete", ".", "If", "not", "temporary", "then", "it", "will", "not", "be", "reshaped" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/Operation.java#L61-L65
162,404
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/Operation.java
Operation.neg
public static Info neg(final Variable A, ManagerTempVariables manager) { Info ret = new Info(); if( A instanceof VariableInteger ) { final VariableInteger output = manager.createInteger(); ret.output = output; ret.op = new Operation("neg-i") { @Overr...
java
public static Info neg(final Variable A, ManagerTempVariables manager) { Info ret = new Info(); if( A instanceof VariableInteger ) { final VariableInteger output = manager.createInteger(); ret.output = output; ret.op = new Operation("neg-i") { @Overr...
[ "public", "static", "Info", "neg", "(", "final", "Variable", "A", ",", "ManagerTempVariables", "manager", ")", "{", "Info", "ret", "=", "new", "Info", "(", ")", ";", "if", "(", "A", "instanceof", "VariableInteger", ")", "{", "final", "VariableInteger", "ou...
Returns the negative of the input variable
[ "Returns", "the", "negative", "of", "the", "input", "variable" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/Operation.java#L202-L239
162,405
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/Operation.java
Operation.eye
public static Info eye( final Variable A , ManagerTempVariables manager) { Info ret = new Info(); final VariableMatrix output = manager.createMatrix(); ret.output = output; if( A instanceof VariableMatrix ) { ret.op = new Operation("eye-m") { @Override ...
java
public static Info eye( final Variable A , ManagerTempVariables manager) { Info ret = new Info(); final VariableMatrix output = manager.createMatrix(); ret.output = output; if( A instanceof VariableMatrix ) { ret.op = new Operation("eye-m") { @Override ...
[ "public", "static", "Info", "eye", "(", "final", "Variable", "A", ",", "ManagerTempVariables", "manager", ")", "{", "Info", "ret", "=", "new", "Info", "(", ")", ";", "final", "VariableMatrix", "output", "=", "manager", ".", "createMatrix", "(", ")", ";", ...
Returns an identity matrix
[ "Returns", "an", "identity", "matrix" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/Operation.java#L1260-L1288
162,406
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/Operation.java
Operation.ones
public static Info ones( final Variable A , final Variable B , ManagerTempVariables manager) { Info ret = new Info(); final VariableMatrix output = manager.createMatrix(); ret.output = output; if( A instanceof VariableInteger && B instanceof VariableInteger ) { ret.op = new ...
java
public static Info ones( final Variable A , final Variable B , ManagerTempVariables manager) { Info ret = new Info(); final VariableMatrix output = manager.createMatrix(); ret.output = output; if( A instanceof VariableInteger && B instanceof VariableInteger ) { ret.op = new ...
[ "public", "static", "Info", "ones", "(", "final", "Variable", "A", ",", "final", "Variable", "B", ",", "ManagerTempVariables", "manager", ")", "{", "Info", "ret", "=", "new", "Info", "(", ")", ";", "final", "VariableMatrix", "output", "=", "manager", ".", ...
Returns a matrix full of ones
[ "Returns", "a", "matrix", "full", "of", "ones" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/Operation.java#L1349-L1369
162,407
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/Operation.java
Operation.rng
public static Info rng( final Variable A , ManagerTempVariables manager) { Info ret = new Info(); if( A instanceof VariableInteger ) { ret.op = new Operation("rng") { @Override public void process() { int seed = ((VariableInteger)A).value...
java
public static Info rng( final Variable A , ManagerTempVariables manager) { Info ret = new Info(); if( A instanceof VariableInteger ) { ret.op = new Operation("rng") { @Override public void process() { int seed = ((VariableInteger)A).value...
[ "public", "static", "Info", "rng", "(", "final", "Variable", "A", ",", "ManagerTempVariables", "manager", ")", "{", "Info", "ret", "=", "new", "Info", "(", ")", ";", "if", "(", "A", "instanceof", "VariableInteger", ")", "{", "ret", ".", "op", "=", "new...
Sets the seed for random number generator
[ "Sets", "the", "seed", "for", "random", "number", "generator" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/Operation.java#L1374-L1391
162,408
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/Operation.java
Operation.rand
public static Info rand( final Variable A , final Variable B , ManagerTempVariables manager) { Info ret = new Info(); final VariableMatrix output = manager.createMatrix(); ret.output = output; if( A instanceof VariableInteger && B instanceof VariableInteger ) { ret.op = new ...
java
public static Info rand( final Variable A , final Variable B , ManagerTempVariables manager) { Info ret = new Info(); final VariableMatrix output = manager.createMatrix(); ret.output = output; if( A instanceof VariableInteger && B instanceof VariableInteger ) { ret.op = new ...
[ "public", "static", "Info", "rand", "(", "final", "Variable", "A", ",", "final", "Variable", "B", ",", "ManagerTempVariables", "manager", ")", "{", "Info", "ret", "=", "new", "Info", "(", ")", ";", "final", "VariableMatrix", "output", "=", "manager", ".", ...
Uniformly random numbers
[ "Uniformly", "random", "numbers" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/Operation.java#L1396-L1416
162,409
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/Operation.java
Operation.extractSimpleExtents
private static boolean extractSimpleExtents(Variable var, Extents e, boolean row, int length) { int lower; int upper; if( var.getType() == VariableType.INTEGER_SEQUENCE ) { IntegerSequence sequence = ((VariableIntegerSequence)var).sequence; if( sequence.getType() == Integ...
java
private static boolean extractSimpleExtents(Variable var, Extents e, boolean row, int length) { int lower; int upper; if( var.getType() == VariableType.INTEGER_SEQUENCE ) { IntegerSequence sequence = ((VariableIntegerSequence)var).sequence; if( sequence.getType() == Integ...
[ "private", "static", "boolean", "extractSimpleExtents", "(", "Variable", "var", ",", "Extents", "e", ",", "boolean", "row", ",", "int", "length", ")", "{", "int", "lower", ";", "int", "upper", ";", "if", "(", "var", ".", "getType", "(", ")", "==", "Var...
See if a simple sequence can be used to extract the array. A simple extent is a continuous block from a min to max index @return true if it is a simple range or false if not
[ "See", "if", "a", "simple", "sequence", "can", "be", "used", "to", "extract", "the", "array", ".", "A", "simple", "extent", "is", "a", "continuous", "block", "from", "a", "min", "to", "max", "index" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/Operation.java#L1686-L1716
162,410
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/TokenList.java
TokenList.add
public Token add( Function function ) { Token t = new Token(function); push( t ); return t; }
java
public Token add( Function function ) { Token t = new Token(function); push( t ); return t; }
[ "public", "Token", "add", "(", "Function", "function", ")", "{", "Token", "t", "=", "new", "Token", "(", "function", ")", ";", "push", "(", "t", ")", ";", "return", "t", ";", "}" ]
Adds a function to the end of the token list @param function Function which is to be added @return The new Token created around function
[ "Adds", "a", "function", "to", "the", "end", "of", "the", "token", "list" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/TokenList.java#L57-L61
162,411
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/TokenList.java
TokenList.add
public Token add( Variable variable ) { Token t = new Token(variable); push( t ); return t; }
java
public Token add( Variable variable ) { Token t = new Token(variable); push( t ); return t; }
[ "public", "Token", "add", "(", "Variable", "variable", ")", "{", "Token", "t", "=", "new", "Token", "(", "variable", ")", ";", "push", "(", "t", ")", ";", "return", "t", ";", "}" ]
Adds a variable to the end of the token list @param variable Variable which is to be added @return The new Token created around variable
[ "Adds", "a", "variable", "to", "the", "end", "of", "the", "token", "list" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/TokenList.java#L68-L72
162,412
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/TokenList.java
TokenList.add
public Token add( Symbol symbol ) { Token t = new Token(symbol); push( t ); return t; }
java
public Token add( Symbol symbol ) { Token t = new Token(symbol); push( t ); return t; }
[ "public", "Token", "add", "(", "Symbol", "symbol", ")", "{", "Token", "t", "=", "new", "Token", "(", "symbol", ")", ";", "push", "(", "t", ")", ";", "return", "t", ";", "}" ]
Adds a symbol to the end of the token list @param symbol Symbol which is to be added @return The new Token created around symbol
[ "Adds", "a", "symbol", "to", "the", "end", "of", "the", "token", "list" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/TokenList.java#L79-L83
162,413
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/TokenList.java
TokenList.add
public Token add( String word ) { Token t = new Token(word); push( t ); return t; }
java
public Token add( String word ) { Token t = new Token(word); push( t ); return t; }
[ "public", "Token", "add", "(", "String", "word", ")", "{", "Token", "t", "=", "new", "Token", "(", "word", ")", ";", "push", "(", "t", ")", ";", "return", "t", ";", "}" ]
Adds a word to the end of the token list @param word word which is to be added @return The new Token created around symbol
[ "Adds", "a", "word", "to", "the", "end", "of", "the", "token", "list" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/TokenList.java#L90-L94
162,414
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/TokenList.java
TokenList.push
public void push( Token token ) { size++; if( first == null ) { first = token; last = token; token.previous = null; token.next = null; } else { last.next = token; token.previous = last; token.next = null; ...
java
public void push( Token token ) { size++; if( first == null ) { first = token; last = token; token.previous = null; token.next = null; } else { last.next = token; token.previous = last; token.next = null; ...
[ "public", "void", "push", "(", "Token", "token", ")", "{", "size", "++", ";", "if", "(", "first", "==", "null", ")", "{", "first", "=", "token", ";", "last", "=", "token", ";", "token", ".", "previous", "=", "null", ";", "token", ".", "next", "="...
Adds a new Token to the end of the linked list
[ "Adds", "a", "new", "Token", "to", "the", "end", "of", "the", "linked", "list" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/TokenList.java#L99-L112
162,415
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/TokenList.java
TokenList.insert
public void insert( Token where , Token token ) { if( where == null ) { // put at the front of the list if( size == 0 ) push(token); else { first.previous = token; token.previous = null; token.next = first; ...
java
public void insert( Token where , Token token ) { if( where == null ) { // put at the front of the list if( size == 0 ) push(token); else { first.previous = token; token.previous = null; token.next = first; ...
[ "public", "void", "insert", "(", "Token", "where", ",", "Token", "token", ")", "{", "if", "(", "where", "==", "null", ")", "{", "// put at the front of the list", "if", "(", "size", "==", "0", ")", "push", "(", "token", ")", ";", "else", "{", "first", ...
Inserts 'token' after 'where'. if where is null then it is inserted to the beginning of the list. @param where Where 'token' should be inserted after. if null the put at it at the beginning @param token The token that is to be inserted
[ "Inserts", "token", "after", "where", ".", "if", "where", "is", "null", "then", "it", "is", "inserted", "to", "the", "beginning", "of", "the", "list", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/TokenList.java#L119-L140
162,416
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/TokenList.java
TokenList.remove
public void remove( Token token ) { if( token == first ) { first = first.next; } if( token == last ) { last = last.previous; } if( token.next != null ) { token.next.previous = token.previous; } if( token.previous != null ) { ...
java
public void remove( Token token ) { if( token == first ) { first = first.next; } if( token == last ) { last = last.previous; } if( token.next != null ) { token.next.previous = token.previous; } if( token.previous != null ) { ...
[ "public", "void", "remove", "(", "Token", "token", ")", "{", "if", "(", "token", "==", "first", ")", "{", "first", "=", "first", ".", "next", ";", "}", "if", "(", "token", "==", "last", ")", "{", "last", "=", "last", ".", "previous", ";", "}", ...
Removes the token from the list @param token Token which is to be removed
[ "Removes", "the", "token", "from", "the", "list" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/TokenList.java#L146-L162
162,417
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/TokenList.java
TokenList.replace
public void replace( Token original , Token target ) { if( first == original ) first = target; if( last == original ) last = target; target.next = original.next; target.previous = original.previous; if( original.next != null ) original.next....
java
public void replace( Token original , Token target ) { if( first == original ) first = target; if( last == original ) last = target; target.next = original.next; target.previous = original.previous; if( original.next != null ) original.next....
[ "public", "void", "replace", "(", "Token", "original", ",", "Token", "target", ")", "{", "if", "(", "first", "==", "original", ")", "first", "=", "target", ";", "if", "(", "last", "==", "original", ")", "last", "=", "target", ";", "target", ".", "nex...
Removes 'original' and places 'target' at the same location
[ "Removes", "original", "and", "places", "target", "at", "the", "same", "location" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/TokenList.java#L167-L182
162,418
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/TokenList.java
TokenList.extractSubList
public TokenList extractSubList( Token begin , Token end ) { if( begin == end ) { remove(begin); return new TokenList(begin,begin); } else { if( first == begin ) { first = end.next; } if( last == end ) { last = b...
java
public TokenList extractSubList( Token begin , Token end ) { if( begin == end ) { remove(begin); return new TokenList(begin,begin); } else { if( first == begin ) { first = end.next; } if( last == end ) { last = b...
[ "public", "TokenList", "extractSubList", "(", "Token", "begin", ",", "Token", "end", ")", "{", "if", "(", "begin", "==", "end", ")", "{", "remove", "(", "begin", ")", ";", "return", "new", "TokenList", "(", "begin", ",", "begin", ")", ";", "}", "else...
Removes elements from begin to end from the list, inclusive. Returns a new list which is composed of the removed elements
[ "Removes", "elements", "from", "begin", "to", "end", "from", "the", "list", "inclusive", ".", "Returns", "a", "new", "list", "which", "is", "composed", "of", "the", "removed", "elements" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/TokenList.java#L188-L212
162,419
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/TokenList.java
TokenList.insertAfter
public void insertAfter(Token before, TokenList list ) { Token after = before.next; before.next = list.first; list.first.previous = before; if( after == null ) { last = list.last; } else { after.previous = list.last; list.last.next = after; ...
java
public void insertAfter(Token before, TokenList list ) { Token after = before.next; before.next = list.first; list.first.previous = before; if( after == null ) { last = list.last; } else { after.previous = list.last; list.last.next = after; ...
[ "public", "void", "insertAfter", "(", "Token", "before", ",", "TokenList", "list", ")", "{", "Token", "after", "=", "before", ".", "next", ";", "before", ".", "next", "=", "list", ".", "first", ";", "list", ".", "first", ".", "previous", "=", "before",...
Inserts the LokenList immediately following the 'before' token
[ "Inserts", "the", "LokenList", "immediately", "following", "the", "before", "token" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/TokenList.java#L217-L229
162,420
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/CovarianceOps_DDRM.java
CovarianceOps_DDRM.isValid
public static int isValid( DMatrixRMaj cov ) { if( !MatrixFeatures_DDRM.isDiagonalPositive(cov) ) return 1; if( !MatrixFeatures_DDRM.isSymmetric(cov,TOL) ) return 2; if( !MatrixFeatures_DDRM.isPositiveSemidefinite(cov) ) return 3; return 0; }
java
public static int isValid( DMatrixRMaj cov ) { if( !MatrixFeatures_DDRM.isDiagonalPositive(cov) ) return 1; if( !MatrixFeatures_DDRM.isSymmetric(cov,TOL) ) return 2; if( !MatrixFeatures_DDRM.isPositiveSemidefinite(cov) ) return 3; return 0; }
[ "public", "static", "int", "isValid", "(", "DMatrixRMaj", "cov", ")", "{", "if", "(", "!", "MatrixFeatures_DDRM", ".", "isDiagonalPositive", "(", "cov", ")", ")", "return", "1", ";", "if", "(", "!", "MatrixFeatures_DDRM", ".", "isSymmetric", "(", "cov", ",...
Performs a variety of tests to see if the provided matrix is a valid covariance matrix. @return 0 = is valid 1 = failed positive diagonal, 2 = failed on symmetry, 2 = failed on positive definite
[ "Performs", "a", "variety", "of", "tests", "to", "see", "if", "the", "provided", "matrix", "is", "a", "valid", "covariance", "matrix", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/CovarianceOps_DDRM.java#L57-L68
162,421
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/CovarianceOps_DDRM.java
CovarianceOps_DDRM.invert
public static boolean invert(final DMatrixRMaj cov , final DMatrixRMaj cov_inv ) { if( cov.numCols <= 4 ) { if( cov.numCols != cov.numRows ) { throw new IllegalArgumentException("Must be a square matrix."); } if( cov.numCols >= 2 ) UnrolledInv...
java
public static boolean invert(final DMatrixRMaj cov , final DMatrixRMaj cov_inv ) { if( cov.numCols <= 4 ) { if( cov.numCols != cov.numRows ) { throw new IllegalArgumentException("Must be a square matrix."); } if( cov.numCols >= 2 ) UnrolledInv...
[ "public", "static", "boolean", "invert", "(", "final", "DMatrixRMaj", "cov", ",", "final", "DMatrixRMaj", "cov_inv", ")", "{", "if", "(", "cov", ".", "numCols", "<=", "4", ")", "{", "if", "(", "cov", ".", "numCols", "!=", "cov", ".", "numRows", ")", ...
Performs a matrix inversion operations that takes advantage of the special properties of a covariance matrix. @param cov A covariance matrix. Not modified. @param cov_inv The inverse of cov. Modified. @return true if it could invert the matrix false if it could not.
[ "Performs", "a", "matrix", "inversion", "operations", "that", "takes", "advantage", "of", "the", "special", "properties", "of", "a", "covariance", "matrix", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/CovarianceOps_DDRM.java#L89-L109
162,422
lessthanoptimal/ejml
main/ejml-core/src/org/ejml/data/BMatrixRMaj.java
BMatrixRMaj.sum
public int sum() { int total = 0; int N = getNumElements(); for (int i = 0; i < N; i++) { if( data[i] ) total += 1; } return total; }
java
public int sum() { int total = 0; int N = getNumElements(); for (int i = 0; i < N; i++) { if( data[i] ) total += 1; } return total; }
[ "public", "int", "sum", "(", ")", "{", "int", "total", "=", "0", ";", "int", "N", "=", "getNumElements", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "N", ";", "i", "++", ")", "{", "if", "(", "data", "[", "i", "]", ")",...
Returns the total number of elements which are true. @return number of elements which are set to true
[ "Returns", "the", "total", "number", "of", "elements", "which", "are", "true", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-core/src/org/ejml/data/BMatrixRMaj.java#L103-L111
162,423
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/decomposition/bidiagonal/BidiagonalDecompositionRow_DDRM.java
BidiagonalDecompositionRow_DDRM.init
protected void init(DMatrixRMaj A ) { UBV = A; m = UBV.numRows; n = UBV.numCols; min = Math.min(m,n); int max = Math.max(m,n); if( b.length < max+1 ) { b = new double[ max+1 ]; u = new double[ max+1 ]; } if( gammasU.length < m ) ...
java
protected void init(DMatrixRMaj A ) { UBV = A; m = UBV.numRows; n = UBV.numCols; min = Math.min(m,n); int max = Math.max(m,n); if( b.length < max+1 ) { b = new double[ max+1 ]; u = new double[ max+1 ]; } if( gammasU.length < m ) ...
[ "protected", "void", "init", "(", "DMatrixRMaj", "A", ")", "{", "UBV", "=", "A", ";", "m", "=", "UBV", ".", "numRows", ";", "n", "=", "UBV", ".", "numCols", ";", "min", "=", "Math", ".", "min", "(", "m", ",", "n", ")", ";", "int", "max", "=",...
Sets up internal data structures and creates a copy of the input matrix. @param A The input matrix. Not modified.
[ "Sets", "up", "internal", "data", "structures", "and", "creates", "a", "copy", "of", "the", "input", "matrix", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/decomposition/bidiagonal/BidiagonalDecompositionRow_DDRM.java#L91-L110
162,424
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/decomposition/bidiagonal/BidiagonalDecompositionRow_DDRM.java
BidiagonalDecompositionRow_DDRM.getU
@Override public DMatrixRMaj getU(DMatrixRMaj U , boolean transpose , boolean compact ) { U = handleU(U, transpose, compact,m,n,min); CommonOps_DDRM.setIdentity(U); for( int i = 0; i < m; i++ ) u[i] = 0; for( int j = min-1; j >= 0; j-- ) { u[j] = 1; for( int...
java
@Override public DMatrixRMaj getU(DMatrixRMaj U , boolean transpose , boolean compact ) { U = handleU(U, transpose, compact,m,n,min); CommonOps_DDRM.setIdentity(U); for( int i = 0; i < m; i++ ) u[i] = 0; for( int j = min-1; j >= 0; j-- ) { u[j] = 1; for( int...
[ "@", "Override", "public", "DMatrixRMaj", "getU", "(", "DMatrixRMaj", "U", ",", "boolean", "transpose", ",", "boolean", "compact", ")", "{", "U", "=", "handleU", "(", "U", ",", "transpose", ",", "compact", ",", "m", ",", "n", ",", "min", ")", ";", "C...
Returns the orthogonal U matrix. @param U If not null then the results will be stored here. Otherwise a new matrix will be created. @return The extracted Q matrix.
[ "Returns", "the", "orthogonal", "U", "matrix", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/decomposition/bidiagonal/BidiagonalDecompositionRow_DDRM.java#L181-L200
162,425
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/decomposition/bidiagonal/BidiagonalDecompositionRow_DDRM.java
BidiagonalDecompositionRow_DDRM.getV
@Override public DMatrixRMaj getV(DMatrixRMaj V , boolean transpose , boolean compact ) { V = handleV(V, transpose, compact,m,n,min); CommonOps_DDRM.setIdentity(V); // UBV.print(); // todo the very first multiplication can be avoided by setting to the rank1update output for(...
java
@Override public DMatrixRMaj getV(DMatrixRMaj V , boolean transpose , boolean compact ) { V = handleV(V, transpose, compact,m,n,min); CommonOps_DDRM.setIdentity(V); // UBV.print(); // todo the very first multiplication can be avoided by setting to the rank1update output for(...
[ "@", "Override", "public", "DMatrixRMaj", "getV", "(", "DMatrixRMaj", "V", ",", "boolean", "transpose", ",", "boolean", "compact", ")", "{", "V", "=", "handleV", "(", "V", ",", "transpose", ",", "compact", ",", "m", ",", "n", ",", "min", ")", ";", "C...
Returns the orthogonal V matrix. @param V If not null then the results will be stored here. Otherwise a new matrix will be created. @return The extracted Q matrix.
[ "Returns", "the", "orthogonal", "V", "matrix", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/decomposition/bidiagonal/BidiagonalDecompositionRow_DDRM.java#L234-L254
162,426
lessthanoptimal/ejml
main/ejml-core/src/org/ejml/UtilEjml.java
UtilEjml.safe
public static <S extends Matrix, D extends Matrix> LinearSolver<S,D> safe(LinearSolver<S,D> solver ) { if( solver.modifiesA() || solver.modifiesB() ) { if( solver instanceof LinearSolverDense ) { return new LinearSolverSafe((LinearSolverDense)solver); } else if( solve...
java
public static <S extends Matrix, D extends Matrix> LinearSolver<S,D> safe(LinearSolver<S,D> solver ) { if( solver.modifiesA() || solver.modifiesB() ) { if( solver instanceof LinearSolverDense ) { return new LinearSolverSafe((LinearSolverDense)solver); } else if( solve...
[ "public", "static", "<", "S", "extends", "Matrix", ",", "D", "extends", "Matrix", ">", "LinearSolver", "<", "S", ",", "D", ">", "safe", "(", "LinearSolver", "<", "S", ",", "D", ">", "solver", ")", "{", "if", "(", "solver", ".", "modifiesA", "(", ")...
Wraps a linear solver of any type with a safe solver the ensures inputs are not modified
[ "Wraps", "a", "linear", "solver", "of", "any", "type", "with", "a", "safe", "solver", "the", "ensures", "inputs", "are", "not", "modified" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-core/src/org/ejml/UtilEjml.java#L64-L76
162,427
lessthanoptimal/ejml
main/ejml-core/src/org/ejml/UtilEjml.java
UtilEjml.fancyStringF
public static String fancyStringF(double value, DecimalFormat format, int length, int significant) { String formatted = fancyString(value, format, length, significant); int n = length-formatted.length(); if( n > 0 ) { StringBuilder builder = new StringBuilder(n); for (i...
java
public static String fancyStringF(double value, DecimalFormat format, int length, int significant) { String formatted = fancyString(value, format, length, significant); int n = length-formatted.length(); if( n > 0 ) { StringBuilder builder = new StringBuilder(n); for (i...
[ "public", "static", "String", "fancyStringF", "(", "double", "value", ",", "DecimalFormat", "format", ",", "int", "length", ",", "int", "significant", ")", "{", "String", "formatted", "=", "fancyString", "(", "value", ",", "format", ",", "length", ",", "sign...
Fixed length fancy formatting for doubles. If possible decimal notation is used. If all the significant digits can't be shown then it will switch to exponential notation. If not all the space is needed then it will be filled in to ensure it has the specified length. @param value value being formatted @param format de...
[ "Fixed", "length", "fancy", "formatting", "for", "doubles", ".", "If", "possible", "decimal", "notation", "is", "used", ".", "If", "all", "the", "significant", "digits", "can", "t", "be", "shown", "then", "it", "will", "switch", "to", "exponential", "notatio...
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-core/src/org/ejml/UtilEjml.java#L336-L350
162,428
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/decomposition/svd/implicitqr/SvdImplicitQrAlgorithm_DDRM.java
SvdImplicitQrAlgorithm_DDRM.performDynamicStep
private void performDynamicStep() { // initially look for singular values of zero if( findingZeros ) { if( steps > 6 ) { findingZeros = false; } else { double scale = computeBulgeScale(); performImplicitSingleStep(scale,0,false); ...
java
private void performDynamicStep() { // initially look for singular values of zero if( findingZeros ) { if( steps > 6 ) { findingZeros = false; } else { double scale = computeBulgeScale(); performImplicitSingleStep(scale,0,false); ...
[ "private", "void", "performDynamicStep", "(", ")", "{", "// initially look for singular values of zero", "if", "(", "findingZeros", ")", "{", "if", "(", "steps", ">", "6", ")", "{", "findingZeros", "=", "false", ";", "}", "else", "{", "double", "scale", "=", ...
Here the lambda in the implicit step is determined dynamically. At first it selects zeros to quickly reveal singular values that are zero or close to zero. Then it computes it using a Wilkinson shift.
[ "Here", "the", "lambda", "in", "the", "implicit", "step", "is", "determined", "dynamically", ".", "At", "first", "it", "selects", "zeros", "to", "quickly", "reveal", "singular", "values", "that", "are", "zero", "or", "close", "to", "zero", ".", "Then", "it...
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/decomposition/svd/implicitqr/SvdImplicitQrAlgorithm_DDRM.java#L270-L290
162,429
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/decomposition/svd/implicitqr/SvdImplicitQrAlgorithm_DDRM.java
SvdImplicitQrAlgorithm_DDRM.performScriptedStep
private void performScriptedStep() { double scale = computeBulgeScale(); if( steps > giveUpOnKnown ) { // give up on the script followScript = false; } else { // use previous singular value to step double s = values[x2]/scale; performIm...
java
private void performScriptedStep() { double scale = computeBulgeScale(); if( steps > giveUpOnKnown ) { // give up on the script followScript = false; } else { // use previous singular value to step double s = values[x2]/scale; performIm...
[ "private", "void", "performScriptedStep", "(", ")", "{", "double", "scale", "=", "computeBulgeScale", "(", ")", ";", "if", "(", "steps", ">", "giveUpOnKnown", ")", "{", "// give up on the script", "followScript", "=", "false", ";", "}", "else", "{", "// use pr...
Shifts are performed based upon singular values computed previously. If it does not converge using one of those singular values it uses a Wilkinson shift instead.
[ "Shifts", "are", "performed", "based", "upon", "singular", "values", "computed", "previously", ".", "If", "it", "does", "not", "converge", "using", "one", "of", "those", "singular", "values", "it", "uses", "a", "Wilkinson", "shift", "instead", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/decomposition/svd/implicitqr/SvdImplicitQrAlgorithm_DDRM.java#L296-L306
162,430
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/decomposition/svd/implicitqr/SvdImplicitQrAlgorithm_DDRM.java
SvdImplicitQrAlgorithm_DDRM.nextSplit
public boolean nextSplit() { if( numSplits == 0 ) return false; x2 = splits[--numSplits]; if( numSplits > 0 ) x1 = splits[numSplits-1]+1; else x1 = 0; return true; }
java
public boolean nextSplit() { if( numSplits == 0 ) return false; x2 = splits[--numSplits]; if( numSplits > 0 ) x1 = splits[numSplits-1]+1; else x1 = 0; return true; }
[ "public", "boolean", "nextSplit", "(", ")", "{", "if", "(", "numSplits", "==", "0", ")", "return", "false", ";", "x2", "=", "splits", "[", "--", "numSplits", "]", ";", "if", "(", "numSplits", ">", "0", ")", "x1", "=", "splits", "[", "numSplits", "-...
Tells it to process the submatrix at the next split. Should be called after the current submatrix has been processed.
[ "Tells", "it", "to", "process", "the", "submatrix", "at", "the", "next", "split", ".", "Should", "be", "called", "after", "the", "current", "submatrix", "has", "been", "processed", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/decomposition/svd/implicitqr/SvdImplicitQrAlgorithm_DDRM.java#L337-L347
162,431
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/decomposition/svd/implicitqr/SvdImplicitQrAlgorithm_DDRM.java
SvdImplicitQrAlgorithm_DDRM.performImplicitSingleStep
public void performImplicitSingleStep(double scale , double lambda , boolean byAngle) { createBulge(x1,lambda,scale,byAngle); for( int i = x1; i < x2-1 && bulge != 0.0; i++ ) { removeBulgeLeft(i,true); if( bulge == 0 ) break; removeBulgeRight(i); ...
java
public void performImplicitSingleStep(double scale , double lambda , boolean byAngle) { createBulge(x1,lambda,scale,byAngle); for( int i = x1; i < x2-1 && bulge != 0.0; i++ ) { removeBulgeLeft(i,true); if( bulge == 0 ) break; removeBulgeRight(i); ...
[ "public", "void", "performImplicitSingleStep", "(", "double", "scale", ",", "double", "lambda", ",", "boolean", "byAngle", ")", "{", "createBulge", "(", "x1", ",", "lambda", ",", "scale", ",", "byAngle", ")", ";", "for", "(", "int", "i", "=", "x1", ";", ...
Given the lambda value perform an implicit QR step on the matrix. B^T*B-lambda*I @param lambda Stepping factor.
[ "Given", "the", "lambda", "value", "perform", "an", "implicit", "QR", "step", "on", "the", "matrix", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/decomposition/svd/implicitqr/SvdImplicitQrAlgorithm_DDRM.java#L356-L370
162,432
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/decomposition/svd/implicitqr/SvdImplicitQrAlgorithm_DDRM.java
SvdImplicitQrAlgorithm_DDRM.updateRotator
protected void updateRotator(DMatrixRMaj Q , int m, int n, double c, double s) { int rowA = m*Q.numCols; int rowB = n*Q.numCols; // for( int i = 0; i < Q.numCols; i++ ) { // double a = Q.get(rowA+i); // double b = Q.get(rowB+i); // Q.set( rowA+i, c*a + s*b); // ...
java
protected void updateRotator(DMatrixRMaj Q , int m, int n, double c, double s) { int rowA = m*Q.numCols; int rowB = n*Q.numCols; // for( int i = 0; i < Q.numCols; i++ ) { // double a = Q.get(rowA+i); // double b = Q.get(rowB+i); // Q.set( rowA+i, c*a + s*b); // ...
[ "protected", "void", "updateRotator", "(", "DMatrixRMaj", "Q", ",", "int", "m", ",", "int", "n", ",", "double", "c", ",", "double", "s", ")", "{", "int", "rowA", "=", "m", "*", "Q", ".", "numCols", ";", "int", "rowB", "=", "n", "*", "Q", ".", "...
Multiplied a transpose orthogonal matrix Q by the specified rotator. This is used to update the U and V matrices. Updating the transpose of the matrix is faster since it only modifies the rows. @param Q Orthogonal matrix @param m Coordinate of rotator. @param n Coordinate of rotator. @param c cosine of rotator. @pa...
[ "Multiplied", "a", "transpose", "orthogonal", "matrix", "Q", "by", "the", "specified", "rotator", ".", "This", "is", "used", "to", "update", "the", "U", "and", "V", "matrices", ".", "Updating", "the", "transpose", "of", "the", "matrix", "is", "faster", "si...
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/decomposition/svd/implicitqr/SvdImplicitQrAlgorithm_DDRM.java#L384-L404
162,433
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/decomposition/svd/implicitqr/SvdImplicitQrAlgorithm_DDRM.java
SvdImplicitQrAlgorithm_DDRM.checkForAndHandleZeros
protected boolean checkForAndHandleZeros() { // check for zeros along off diagonal for( int i = x2-1; i >= x1; i-- ) { if( isOffZero(i) ) { // System.out.println("steps at split = "+steps); resetSteps(); splits[numSplits++] = i; ...
java
protected boolean checkForAndHandleZeros() { // check for zeros along off diagonal for( int i = x2-1; i >= x1; i-- ) { if( isOffZero(i) ) { // System.out.println("steps at split = "+steps); resetSteps(); splits[numSplits++] = i; ...
[ "protected", "boolean", "checkForAndHandleZeros", "(", ")", "{", "// check for zeros along off diagonal", "for", "(", "int", "i", "=", "x2", "-", "1", ";", "i", ">=", "x1", ";", "i", "--", ")", "{", "if", "(", "isOffZero", "(", "i", ")", ")", "{", "// ...
Checks to see if either the diagonal element or off diagonal element is zero. If one is then it performs a split or pushes it off the matrix. @return True if there was a zero.
[ "Checks", "to", "see", "if", "either", "the", "diagonal", "element", "or", "off", "diagonal", "element", "is", "zero", ".", "If", "one", "is", "then", "it", "performs", "a", "split", "or", "pushes", "it", "off", "the", "matrix", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/decomposition/svd/implicitqr/SvdImplicitQrAlgorithm_DDRM.java#L643-L667
162,434
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/decomposition/svd/implicitqr/SvdImplicitQrAlgorithm_DDRM.java
SvdImplicitQrAlgorithm_DDRM.pushRight
private void pushRight( int row ) { if( isOffZero(row)) return; // B = createB(); // B.print(); rotatorPushRight(row); int end = N-2-row; for( int i = 0; i < end && bulge != 0; i++ ) { rotatorPushRight2(row,i+2); } // } }
java
private void pushRight( int row ) { if( isOffZero(row)) return; // B = createB(); // B.print(); rotatorPushRight(row); int end = N-2-row; for( int i = 0; i < end && bulge != 0; i++ ) { rotatorPushRight2(row,i+2); } // } }
[ "private", "void", "pushRight", "(", "int", "row", ")", "{", "if", "(", "isOffZero", "(", "row", ")", ")", "return", ";", "// B = createB();", "// B.print();", "rotatorPushRight", "(", "row", ")", ";", "int", "end", "=", "N", "-", "2", "-", ...
If there is a zero on the diagonal element, the off diagonal element needs pushed off so that all the algorithms assumptions are two and so that it can split the matrix.
[ "If", "there", "is", "a", "zero", "on", "the", "diagonal", "element", "the", "off", "diagonal", "element", "needs", "pushed", "off", "so", "that", "all", "the", "algorithms", "assumptions", "are", "two", "and", "so", "that", "it", "can", "split", "the", ...
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/decomposition/svd/implicitqr/SvdImplicitQrAlgorithm_DDRM.java#L673-L685
162,435
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/decomposition/svd/implicitqr/SvdImplicitQrAlgorithm_DDRM.java
SvdImplicitQrAlgorithm_DDRM.rotatorPushRight
private void rotatorPushRight( int m ) { double b11 = off[m]; double b21 = diag[m+1]; computeRotator(b21,-b11); // apply rotator on the right off[m] = 0; diag[m+1] = b21*c-b11*s; if( m+2 < N) { double b22 = off[m+1]; off[m+1] = b22*c...
java
private void rotatorPushRight( int m ) { double b11 = off[m]; double b21 = diag[m+1]; computeRotator(b21,-b11); // apply rotator on the right off[m] = 0; diag[m+1] = b21*c-b11*s; if( m+2 < N) { double b22 = off[m+1]; off[m+1] = b22*c...
[ "private", "void", "rotatorPushRight", "(", "int", "m", ")", "{", "double", "b11", "=", "off", "[", "m", "]", ";", "double", "b21", "=", "diag", "[", "m", "+", "1", "]", ";", "computeRotator", "(", "b21", ",", "-", "b11", ")", ";", "// apply rotato...
Start pushing the element off to the right.
[ "Start", "pushing", "the", "element", "off", "to", "the", "right", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/decomposition/svd/implicitqr/SvdImplicitQrAlgorithm_DDRM.java#L690-L725
162,436
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/decomposition/svd/implicitqr/SvdImplicitQrAlgorithm_DDRM.java
SvdImplicitQrAlgorithm_DDRM.rotatorPushRight2
private void rotatorPushRight2( int m , int offset) { double b11 = bulge; double b12 = diag[m+offset]; computeRotator(b12,-b11); diag[m+offset] = b12*c-b11*s; if( m+offset<N-1) { double b22 = off[m+offset]; off[m+offset] = b22*c; bulge =...
java
private void rotatorPushRight2( int m , int offset) { double b11 = bulge; double b12 = diag[m+offset]; computeRotator(b12,-b11); diag[m+offset] = b12*c-b11*s; if( m+offset<N-1) { double b22 = off[m+offset]; off[m+offset] = b22*c; bulge =...
[ "private", "void", "rotatorPushRight2", "(", "int", "m", ",", "int", "offset", ")", "{", "double", "b11", "=", "bulge", ";", "double", "b12", "=", "diag", "[", "m", "+", "offset", "]", ";", "computeRotator", "(", "b12", ",", "-", "b11", ")", ";", "...
Used to finish up pushing the bulge off the matrix.
[ "Used", "to", "finish", "up", "pushing", "the", "bulge", "off", "the", "matrix", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/decomposition/svd/implicitqr/SvdImplicitQrAlgorithm_DDRM.java#L730-L761
162,437
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/decomposition/svd/implicitqr/SvdImplicitQrAlgorithm_DDRM.java
SvdImplicitQrAlgorithm_DDRM.exceptionShift
public void exceptionShift() { numExceptional++; double mag = 0.05 * numExceptional; if (mag > 1.0) mag = 1.0; double angle = 2.0 * UtilEjml.PI * (rand.nextDouble() - 0.5) * mag; performImplicitSingleStep(0, angle, true); // allow more convergence time nextExcep...
java
public void exceptionShift() { numExceptional++; double mag = 0.05 * numExceptional; if (mag > 1.0) mag = 1.0; double angle = 2.0 * UtilEjml.PI * (rand.nextDouble() - 0.5) * mag; performImplicitSingleStep(0, angle, true); // allow more convergence time nextExcep...
[ "public", "void", "exceptionShift", "(", ")", "{", "numExceptional", "++", ";", "double", "mag", "=", "0.05", "*", "numExceptional", ";", "if", "(", "mag", ">", "1.0", ")", "mag", "=", "1.0", ";", "double", "angle", "=", "2.0", "*", "UtilEjml", ".", ...
It is possible for the QR algorithm to get stuck in a loop because of symmetries. This happens more often with larger matrices. By taking a random step it can break the symmetry and finish.
[ "It", "is", "possible", "for", "the", "QR", "algorithm", "to", "get", "stuck", "in", "a", "loop", "because", "of", "symmetries", ".", "This", "happens", "more", "often", "with", "larger", "matrices", ".", "By", "taking", "a", "random", "step", "it", "can...
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/decomposition/svd/implicitqr/SvdImplicitQrAlgorithm_DDRM.java#L767-L777
162,438
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/decomposition/svd/SvdImplicitQrDecompose_DDRM.java
SvdImplicitQrDecompose_DDRM.computeUWV
private boolean computeUWV() { bidiag.getDiagonal(diag,off); qralg.setMatrix(numRowsT,numColsT,diag,off); // long pointA = System.currentTimeMillis(); // compute U and V matrices if( computeU ) Ut = bidiag.getU(Ut,true,compact); if( computeV ) Vt =...
java
private boolean computeUWV() { bidiag.getDiagonal(diag,off); qralg.setMatrix(numRowsT,numColsT,diag,off); // long pointA = System.currentTimeMillis(); // compute U and V matrices if( computeU ) Ut = bidiag.getU(Ut,true,compact); if( computeV ) Vt =...
[ "private", "boolean", "computeUWV", "(", ")", "{", "bidiag", ".", "getDiagonal", "(", "diag", ",", "off", ")", ";", "qralg", ".", "setMatrix", "(", "numRowsT", ",", "numColsT", ",", "diag", ",", "off", ")", ";", "// long pointA = System.currentTimeMilli...
Compute singular values and U and V at the same time
[ "Compute", "singular", "values", "and", "U", "and", "V", "at", "the", "same", "time" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/decomposition/svd/SvdImplicitQrDecompose_DDRM.java#L232-L261
162,439
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/decomposition/svd/SvdImplicitQrDecompose_DDRM.java
SvdImplicitQrDecompose_DDRM.makeSingularPositive
private void makeSingularPositive() { numSingular = qralg.getNumberOfSingularValues(); singularValues = qralg.getSingularValues(); for( int i = 0; i < numSingular; i++ ) { double val = qralg.getSingularValue(i); if( val < 0 ) { singularValues[i] = 0.0 - ...
java
private void makeSingularPositive() { numSingular = qralg.getNumberOfSingularValues(); singularValues = qralg.getSingularValues(); for( int i = 0; i < numSingular; i++ ) { double val = qralg.getSingularValue(i); if( val < 0 ) { singularValues[i] = 0.0 - ...
[ "private", "void", "makeSingularPositive", "(", ")", "{", "numSingular", "=", "qralg", ".", "getNumberOfSingularValues", "(", ")", ";", "singularValues", "=", "qralg", ".", "getSingularValues", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<"...
With the QR algorithm it is possible for the found singular values to be negative. This makes them all positive by multiplying it by a diagonal matrix that has
[ "With", "the", "QR", "algorithm", "it", "is", "possible", "for", "the", "found", "singular", "values", "to", "be", "negative", ".", "This", "makes", "them", "all", "positive", "by", "multiplying", "it", "by", "a", "diagonal", "matrix", "that", "has" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/decomposition/svd/SvdImplicitQrDecompose_DDRM.java#L306-L330
162,440
lessthanoptimal/ejml
main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java
CommonOps_DSCC.checkDuplicateElements
public static boolean checkDuplicateElements(DMatrixSparseCSC A ) { A = A.copy(); // create a copy so that it doesn't modify A A.sortIndices(null); return !checkSortedFlag(A); }
java
public static boolean checkDuplicateElements(DMatrixSparseCSC A ) { A = A.copy(); // create a copy so that it doesn't modify A A.sortIndices(null); return !checkSortedFlag(A); }
[ "public", "static", "boolean", "checkDuplicateElements", "(", "DMatrixSparseCSC", "A", ")", "{", "A", "=", "A", ".", "copy", "(", ")", ";", "// create a copy so that it doesn't modify A", "A", ".", "sortIndices", "(", "null", ")", ";", "return", "!", "checkSorte...
Checks for duplicate elements. A is sorted @param A Matrix to be tested. @return true if duplicates or false if false duplicates
[ "Checks", "for", "duplicate", "elements", ".", "A", "is", "sorted" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java#L105-L109
162,441
lessthanoptimal/ejml
main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java
CommonOps_DSCC.changeSign
public static void changeSign(DMatrixSparseCSC A , DMatrixSparseCSC B ) { if( A != B ) { B.copyStructure(A); } for (int i = 0; i < A.nz_length; i++) { B.nz_values[i] = -A.nz_values[i]; } }
java
public static void changeSign(DMatrixSparseCSC A , DMatrixSparseCSC B ) { if( A != B ) { B.copyStructure(A); } for (int i = 0; i < A.nz_length; i++) { B.nz_values[i] = -A.nz_values[i]; } }
[ "public", "static", "void", "changeSign", "(", "DMatrixSparseCSC", "A", ",", "DMatrixSparseCSC", "B", ")", "{", "if", "(", "A", "!=", "B", ")", "{", "B", ".", "copyStructure", "(", "A", ")", ";", "}", "for", "(", "int", "i", "=", "0", ";", "i", "...
B = -A. Changes the sign of elements in A and stores it in B. A and B can be the same instance. @param A (Input) Matrix. Not modified. @param B (Output) Matrix. Modified.
[ "B", "=", "-", "A", ".", "Changes", "the", "sign", "of", "elements", "in", "A", "and", "stores", "it", "in", "B", ".", "A", "and", "B", "can", "be", "the", "same", "instance", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java#L442-L450
162,442
lessthanoptimal/ejml
main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java
CommonOps_DSCC.elementMin
public static double elementMin( DMatrixSparseCSC A ) { if( A.nz_length == 0) return 0; // if every element is assigned a value then the first element can be a minimum. // Otherwise zero needs to be considered double min = A.isFull() ? A.nz_values[0] : 0; for(int i =...
java
public static double elementMin( DMatrixSparseCSC A ) { if( A.nz_length == 0) return 0; // if every element is assigned a value then the first element can be a minimum. // Otherwise zero needs to be considered double min = A.isFull() ? A.nz_values[0] : 0; for(int i =...
[ "public", "static", "double", "elementMin", "(", "DMatrixSparseCSC", "A", ")", "{", "if", "(", "A", ".", "nz_length", "==", "0", ")", "return", "0", ";", "// if every element is assigned a value then the first element can be a minimum.", "// Otherwise zero needs to be consi...
Returns the value of the element with the minimum value @param A (Input) Matrix. Not modified. @return scalar
[ "Returns", "the", "value", "of", "the", "element", "with", "the", "minimum", "value" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java#L497-L512
162,443
lessthanoptimal/ejml
main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java
CommonOps_DSCC.elementMax
public static double elementMax( DMatrixSparseCSC A ) { if( A.nz_length == 0) return 0; // if every element is assigned a value then the first element can be a max. // Otherwise zero needs to be considered double max = A.isFull() ? A.nz_values[0] : 0; for(int i = 0; ...
java
public static double elementMax( DMatrixSparseCSC A ) { if( A.nz_length == 0) return 0; // if every element is assigned a value then the first element can be a max. // Otherwise zero needs to be considered double max = A.isFull() ? A.nz_values[0] : 0; for(int i = 0; ...
[ "public", "static", "double", "elementMax", "(", "DMatrixSparseCSC", "A", ")", "{", "if", "(", "A", ".", "nz_length", "==", "0", ")", "return", "0", ";", "// if every element is assigned a value then the first element can be a max.", "// Otherwise zero needs to be considere...
Returns the value of the element with the largest value @param A (Input) Matrix. Not modified. @return scalar
[ "Returns", "the", "value", "of", "the", "element", "with", "the", "largest", "value" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java#L519-L534
162,444
lessthanoptimal/ejml
main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java
CommonOps_DSCC.elementSum
public static double elementSum( DMatrixSparseCSC A ) { if( A.nz_length == 0) return 0; double sum = 0; for(int i = 0; i < A.nz_length; i++ ) { sum += A.nz_values[i]; } return sum; }
java
public static double elementSum( DMatrixSparseCSC A ) { if( A.nz_length == 0) return 0; double sum = 0; for(int i = 0; i < A.nz_length; i++ ) { sum += A.nz_values[i]; } return sum; }
[ "public", "static", "double", "elementSum", "(", "DMatrixSparseCSC", "A", ")", "{", "if", "(", "A", ".", "nz_length", "==", "0", ")", "return", "0", ";", "double", "sum", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "A", ".", ...
Sum of all elements @param A (Input) Matrix. Not modified. @return scalar
[ "Sum", "of", "all", "elements" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java#L542-L552
162,445
lessthanoptimal/ejml
main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java
CommonOps_DSCC.columnMaxAbs
public static void columnMaxAbs( DMatrixSparseCSC A , double []values ) { if( values.length < A.numCols ) throw new IllegalArgumentException("Array is too small. "+values.length+" < "+A.numCols); for (int i = 0; i < A.numCols; i++) { int idx0 = A.col_idx[i]; int idx1...
java
public static void columnMaxAbs( DMatrixSparseCSC A , double []values ) { if( values.length < A.numCols ) throw new IllegalArgumentException("Array is too small. "+values.length+" < "+A.numCols); for (int i = 0; i < A.numCols; i++) { int idx0 = A.col_idx[i]; int idx1...
[ "public", "static", "void", "columnMaxAbs", "(", "DMatrixSparseCSC", "A", ",", "double", "[", "]", "values", ")", "{", "if", "(", "values", ".", "length", "<", "A", ".", "numCols", ")", "throw", "new", "IllegalArgumentException", "(", "\"Array is too small. \"...
Finds the maximum abs in each column of A and stores it into values @param A (Input) Matrix @param values (Output) storage for column max abs
[ "Finds", "the", "maximum", "abs", "in", "each", "column", "of", "A", "and", "stores", "it", "into", "values" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java#L579-L595
162,446
lessthanoptimal/ejml
main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java
CommonOps_DSCC.diag
public static DMatrixSparseCSC diag(double... values ) { int N = values.length; return diag(new DMatrixSparseCSC(N,N,N),values,0,N); }
java
public static DMatrixSparseCSC diag(double... values ) { int N = values.length; return diag(new DMatrixSparseCSC(N,N,N),values,0,N); }
[ "public", "static", "DMatrixSparseCSC", "diag", "(", "double", "...", "values", ")", "{", "int", "N", "=", "values", ".", "length", ";", "return", "diag", "(", "new", "DMatrixSparseCSC", "(", "N", ",", "N", ",", "N", ")", ",", "values", ",", "0", ","...
Returns a diagonal matrix with the specified diagonal elements. @param values values of diagonal elements @return A diagonal matrix
[ "Returns", "a", "diagonal", "matrix", "with", "the", "specified", "diagonal", "elements", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java#L708-L711
162,447
lessthanoptimal/ejml
main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java
CommonOps_DSCC.permutationVector
public static void permutationVector( DMatrixSparseCSC P , int[] vector) { if( P.numCols != P.numRows ) { throw new MatrixDimensionException("Expected a square matrix"); } else if( P.nz_length != P.numCols ) { throw new IllegalArgumentException("Expected N non-zero elements in pe...
java
public static void permutationVector( DMatrixSparseCSC P , int[] vector) { if( P.numCols != P.numRows ) { throw new MatrixDimensionException("Expected a square matrix"); } else if( P.nz_length != P.numCols ) { throw new IllegalArgumentException("Expected N non-zero elements in pe...
[ "public", "static", "void", "permutationVector", "(", "DMatrixSparseCSC", "P", ",", "int", "[", "]", "vector", ")", "{", "if", "(", "P", ".", "numCols", "!=", "P", ".", "numRows", ")", "{", "throw", "new", "MatrixDimensionException", "(", "\"Expected a squar...
Converts the permutation matrix into a vector @param P (Input) Permutation matrix @param vector (Output) Permutation vector
[ "Converts", "the", "permutation", "matrix", "into", "a", "vector" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java#L842-L859
162,448
lessthanoptimal/ejml
main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java
CommonOps_DSCC.permutationInverse
public static void permutationInverse( int []original , int []inverse , int length ) { for (int i = 0; i < length; i++) { inverse[original[i]] = i; } }
java
public static void permutationInverse( int []original , int []inverse , int length ) { for (int i = 0; i < length; i++) { inverse[original[i]] = i; } }
[ "public", "static", "void", "permutationInverse", "(", "int", "[", "]", "original", ",", "int", "[", "]", "inverse", ",", "int", "length", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "length", ";", "i", "++", ")", "{", "inverse", "...
Computes the inverse permutation vector @param original Original permutation vector @param inverse It's inverse
[ "Computes", "the", "inverse", "permutation", "vector" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java#L867-L871
162,449
lessthanoptimal/ejml
main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java
CommonOps_DSCC.zero
public static void zero( DMatrixSparseCSC A , int row0, int row1, int col0, int col1 ) { for (int col = col1-1; col >= col0; col--) { int numRemoved = 0; int idx0 = A.col_idx[col], idx1 = A.col_idx[col+1]; for (int i = idx0; i < idx1; i++) { int row = A.nz_ro...
java
public static void zero( DMatrixSparseCSC A , int row0, int row1, int col0, int col1 ) { for (int col = col1-1; col >= col0; col--) { int numRemoved = 0; int idx0 = A.col_idx[col], idx1 = A.col_idx[col+1]; for (int i = idx0; i < idx1; i++) { int row = A.nz_ro...
[ "public", "static", "void", "zero", "(", "DMatrixSparseCSC", "A", ",", "int", "row0", ",", "int", "row1", ",", "int", "col0", ",", "int", "col1", ")", "{", "for", "(", "int", "col", "=", "col1", "-", "1", ";", "col", ">=", "col0", ";", "col", "--...
Zeros an inner rectangle inside the matrix. @param A Matrix that is to be modified. @param row0 Start row. @param row1 Stop row+1. @param col0 Start column. @param col1 Stop column+1.
[ "Zeros", "an", "inner", "rectangle", "inside", "the", "matrix", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java#L1529-L1562
162,450
lessthanoptimal/ejml
main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java
CommonOps_DSCC.removeZeros
public static void removeZeros( DMatrixSparseCSC input , DMatrixSparseCSC output , double tol ) { ImplCommonOps_DSCC.removeZeros(input,output,tol); }
java
public static void removeZeros( DMatrixSparseCSC input , DMatrixSparseCSC output , double tol ) { ImplCommonOps_DSCC.removeZeros(input,output,tol); }
[ "public", "static", "void", "removeZeros", "(", "DMatrixSparseCSC", "input", ",", "DMatrixSparseCSC", "output", ",", "double", "tol", ")", "{", "ImplCommonOps_DSCC", ".", "removeZeros", "(", "input", ",", "output", ",", "tol", ")", ";", "}" ]
Copies all elements from input into output which are &gt; tol. @param input (Input) input matrix. Not modified. @param output (Output) Output matrix. Modified and shaped to match input. @param tol Tolerance for defining zero
[ "Copies", "all", "elements", "from", "input", "into", "output", "which", "are", "&gt", ";", "tol", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java#L1761-L1763
162,451
lessthanoptimal/ejml
main/ejml-core/src/org/ejml/data/DMatrixSparseCSC.java
DMatrixSparseCSC.growMaxLength
public void growMaxLength( int arrayLength , boolean preserveValue ) { if( arrayLength < 0 ) throw new IllegalArgumentException("Negative array length. Overflow?"); // see if multiplying numRows*numCols will cause an overflow. If it won't then pick the smaller of the two if( numRows ...
java
public void growMaxLength( int arrayLength , boolean preserveValue ) { if( arrayLength < 0 ) throw new IllegalArgumentException("Negative array length. Overflow?"); // see if multiplying numRows*numCols will cause an overflow. If it won't then pick the smaller of the two if( numRows ...
[ "public", "void", "growMaxLength", "(", "int", "arrayLength", ",", "boolean", "preserveValue", ")", "{", "if", "(", "arrayLength", "<", "0", ")", "throw", "new", "IllegalArgumentException", "(", "\"Negative array length. Overflow?\"", ")", ";", "// see if multiplying ...
Increases the maximum size of the data array so that it can store sparse data up to 'length'. The class parameter nz_length is not modified by this function call. @param arrayLength Desired maximum length of sparse data @param preserveValue If true the old values will be copied into the new arrays. If false that ste...
[ "Increases", "the", "maximum", "size", "of", "the", "data", "array", "so", "that", "it", "can", "store", "sparse", "data", "up", "to", "length", ".", "The", "class", "parameter", "nz_length", "is", "not", "modified", "by", "this", "function", "call", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-core/src/org/ejml/data/DMatrixSparseCSC.java#L332-L354
162,452
lessthanoptimal/ejml
main/ejml-core/src/org/ejml/data/DMatrixSparseCSC.java
DMatrixSparseCSC.growMaxColumns
public void growMaxColumns( int desiredColumns , boolean preserveValue ) { if( col_idx.length < desiredColumns+1 ) { int[] c = new int[ desiredColumns+1 ]; if( preserveValue ) System.arraycopy(col_idx,0,c,0,col_idx.length); col_idx = c; } }
java
public void growMaxColumns( int desiredColumns , boolean preserveValue ) { if( col_idx.length < desiredColumns+1 ) { int[] c = new int[ desiredColumns+1 ]; if( preserveValue ) System.arraycopy(col_idx,0,c,0,col_idx.length); col_idx = c; } }
[ "public", "void", "growMaxColumns", "(", "int", "desiredColumns", ",", "boolean", "preserveValue", ")", "{", "if", "(", "col_idx", ".", "length", "<", "desiredColumns", "+", "1", ")", "{", "int", "[", "]", "c", "=", "new", "int", "[", "desiredColumns", "...
Increases the maximum number of columns in the matrix. @param desiredColumns Desired number of columns. @param preserveValue If the array needs to be expanded should it copy the previous values?
[ "Increases", "the", "maximum", "number", "of", "columns", "in", "the", "matrix", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-core/src/org/ejml/data/DMatrixSparseCSC.java#L361-L368
162,453
lessthanoptimal/ejml
main/ejml-core/src/org/ejml/data/DMatrixSparseCSC.java
DMatrixSparseCSC.histogramToStructure
public void histogramToStructure(int histogram[] ) { col_idx[0] = 0; int index = 0; for (int i = 1; i <= numCols; i++) { col_idx[i] = index += histogram[i-1]; } nz_length = index; growMaxLength( nz_length , false); if( col_idx[numCols] != nz_length ) ...
java
public void histogramToStructure(int histogram[] ) { col_idx[0] = 0; int index = 0; for (int i = 1; i <= numCols; i++) { col_idx[i] = index += histogram[i-1]; } nz_length = index; growMaxLength( nz_length , false); if( col_idx[numCols] != nz_length ) ...
[ "public", "void", "histogramToStructure", "(", "int", "histogram", "[", "]", ")", "{", "col_idx", "[", "0", "]", "=", "0", ";", "int", "index", "=", "0", ";", "for", "(", "int", "i", "=", "1", ";", "i", "<=", "numCols", ";", "i", "++", ")", "{"...
Given the histogram of columns compute the col_idx for the matrix. nz_length is automatically set and nz_values will grow if needed. @param histogram histogram of column values in the sparse matrix. modified, see above.
[ "Given", "the", "histogram", "of", "columns", "compute", "the", "col_idx", "for", "the", "matrix", ".", "nz_length", "is", "automatically", "set", "and", "nz_values", "will", "grow", "if", "needed", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-core/src/org/ejml/data/DMatrixSparseCSC.java#L375-L385
162,454
lessthanoptimal/ejml
main/ejml-core/src/org/ejml/data/DMatrixSparseCSC.java
DMatrixSparseCSC.sortIndices
public void sortIndices(SortCoupledArray_F64 sorter ) { if( sorter == null ) sorter = new SortCoupledArray_F64(); sorter.quick(col_idx,numCols+1,nz_rows,nz_values); indicesSorted = true; }
java
public void sortIndices(SortCoupledArray_F64 sorter ) { if( sorter == null ) sorter = new SortCoupledArray_F64(); sorter.quick(col_idx,numCols+1,nz_rows,nz_values); indicesSorted = true; }
[ "public", "void", "sortIndices", "(", "SortCoupledArray_F64", "sorter", ")", "{", "if", "(", "sorter", "==", "null", ")", "sorter", "=", "new", "SortCoupledArray_F64", "(", ")", ";", "sorter", ".", "quick", "(", "col_idx", ",", "numCols", "+", "1", ",", ...
Sorts the row indices in ascending order. @param sorter (Optional) Used to sort rows. If null a new instance will be declared internally.
[ "Sorts", "the", "row", "indices", "in", "ascending", "order", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-core/src/org/ejml/data/DMatrixSparseCSC.java#L391-L397
162,455
lessthanoptimal/ejml
main/ejml-core/src/org/ejml/data/DMatrixSparseCSC.java
DMatrixSparseCSC.copyStructure
public void copyStructure( DMatrixSparseCSC orig ) { reshape(orig.numRows, orig.numCols, orig.nz_length); this.nz_length = orig.nz_length; System.arraycopy(orig.col_idx,0,col_idx,0,orig.numCols+1); System.arraycopy(orig.nz_rows,0,nz_rows,0,orig.nz_length); }
java
public void copyStructure( DMatrixSparseCSC orig ) { reshape(orig.numRows, orig.numCols, orig.nz_length); this.nz_length = orig.nz_length; System.arraycopy(orig.col_idx,0,col_idx,0,orig.numCols+1); System.arraycopy(orig.nz_rows,0,nz_rows,0,orig.nz_length); }
[ "public", "void", "copyStructure", "(", "DMatrixSparseCSC", "orig", ")", "{", "reshape", "(", "orig", ".", "numRows", ",", "orig", ".", "numCols", ",", "orig", ".", "nz_length", ")", ";", "this", ".", "nz_length", "=", "orig", ".", "nz_length", ";", "Sys...
Copies the non-zero structure of orig into "this" @param orig Matrix who's structure is to be copied
[ "Copies", "the", "non", "-", "zero", "structure", "of", "orig", "into", "this" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-core/src/org/ejml/data/DMatrixSparseCSC.java#L403-L408
162,456
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/block/decomposition/bidiagonal/BidiagonalHelper_DDRB.java
BidiagonalHelper_DDRB.bidiagOuterBlocks
public static boolean bidiagOuterBlocks( final int blockLength , final DSubmatrixD1 A , final double gammasU[], final double gammasV[]) { // System.out.println("---------- Or...
java
public static boolean bidiagOuterBlocks( final int blockLength , final DSubmatrixD1 A , final double gammasU[], final double gammasV[]) { // System.out.println("---------- Or...
[ "public", "static", "boolean", "bidiagOuterBlocks", "(", "final", "int", "blockLength", ",", "final", "DSubmatrixD1", "A", ",", "final", "double", "gammasU", "[", "]", ",", "final", "double", "gammasV", "[", "]", ")", "{", "// System.out.println(\"---------...
Performs a standard bidiagonal decomposition just on the outer blocks of the provided matrix @param blockLength @param A @param gammasU
[ "Performs", "a", "standard", "bidiagonal", "decomposition", "just", "on", "the", "outer", "blocks", "of", "the", "provided", "matrix" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/block/decomposition/bidiagonal/BidiagonalHelper_DDRB.java#L39-L88
162,457
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/block/linsol/chol/CholeskyOuterSolver_DDRB.java
CholeskyOuterSolver_DDRB.setA
@Override public boolean setA(DMatrixRBlock A) { // Extract a lower triangular solution if( !decomposer.decompose(A) ) return false; blockLength = A.blockLength; return true; }
java
@Override public boolean setA(DMatrixRBlock A) { // Extract a lower triangular solution if( !decomposer.decompose(A) ) return false; blockLength = A.blockLength; return true; }
[ "@", "Override", "public", "boolean", "setA", "(", "DMatrixRBlock", "A", ")", "{", "// Extract a lower triangular solution", "if", "(", "!", "decomposer", ".", "decompose", "(", "A", ")", ")", "return", "false", ";", "blockLength", "=", "A", ".", "blockLength"...
Decomposes and overwrites the input matrix. @param A Semi-Positive Definite (SPD) system matrix. Modified. Reference saved. @return If the matrix can be decomposed. Will always return false of not SPD.
[ "Decomposes", "and", "overwrites", "the", "input", "matrix", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/block/linsol/chol/CholeskyOuterSolver_DDRB.java#L67-L76
162,458
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/block/linsol/chol/CholeskyOuterSolver_DDRB.java
CholeskyOuterSolver_DDRB.solve
@Override public void solve(DMatrixRBlock B, DMatrixRBlock X) { if( B.blockLength != blockLength ) throw new IllegalArgumentException("Unexpected blocklength in B."); DSubmatrixD1 L = new DSubmatrixD1(decomposer.getT(null)); if( X != null ) { if( X.blockLength != bl...
java
@Override public void solve(DMatrixRBlock B, DMatrixRBlock X) { if( B.blockLength != blockLength ) throw new IllegalArgumentException("Unexpected blocklength in B."); DSubmatrixD1 L = new DSubmatrixD1(decomposer.getT(null)); if( X != null ) { if( X.blockLength != bl...
[ "@", "Override", "public", "void", "solve", "(", "DMatrixRBlock", "B", ",", "DMatrixRBlock", "X", ")", "{", "if", "(", "B", ".", "blockLength", "!=", "blockLength", ")", "throw", "new", "IllegalArgumentException", "(", "\"Unexpected blocklength in B.\"", ")", ";...
If X == null then the solution is written into B. Otherwise the solution is copied from B into X.
[ "If", "X", "==", "null", "then", "the", "solution", "is", "written", "into", "B", ".", "Otherwise", "the", "solution", "is", "copied", "from", "B", "into", "X", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/block/linsol/chol/CholeskyOuterSolver_DDRB.java#L87-L115
162,459
lessthanoptimal/ejml
main/ejml-core/src/org/ejml/data/IGrowArray.java
IGrowArray.growInternal
public void growInternal(int amount ) { int tmp[] = new int[ data.length + amount ]; System.arraycopy(data,0,tmp,0,data.length); this.data = tmp; }
java
public void growInternal(int amount ) { int tmp[] = new int[ data.length + amount ]; System.arraycopy(data,0,tmp,0,data.length); this.data = tmp; }
[ "public", "void", "growInternal", "(", "int", "amount", ")", "{", "int", "tmp", "[", "]", "=", "new", "int", "[", "data", ".", "length", "+", "amount", "]", ";", "System", ".", "arraycopy", "(", "data", ",", "0", ",", "tmp", ",", "0", ",", "data"...
Increases the internal array's length by the specified amount. Previous values are preserved. The length value is not modified since this does not change the 'meaning' of the array, just increases the amount of data which can be stored in it. this.data = new data_type[ data.length + amount ] @param amount Number of ...
[ "Increases", "the", "internal", "array", "s", "length", "by", "the", "specified", "amount", ".", "Previous", "values", "are", "preserved", ".", "The", "length", "value", "is", "not", "modified", "since", "this", "does", "not", "change", "the", "meaning", "of...
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-core/src/org/ejml/data/IGrowArray.java#L60-L65
162,460
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/block/decomposition/chol/InnerCholesky_DDRB.java
InnerCholesky_DDRB.lower
public static boolean lower( double[]T , int indexT , int n ) { double el_ii; double div_el_ii=0; for( int i = 0; i < n; i++ ) { for( int j = i; j < n; j++ ) { double sum = T[ indexT + j*n+i]; // todo optimize for( int k = 0; k < i; k...
java
public static boolean lower( double[]T , int indexT , int n ) { double el_ii; double div_el_ii=0; for( int i = 0; i < n; i++ ) { for( int j = i; j < n; j++ ) { double sum = T[ indexT + j*n+i]; // todo optimize for( int k = 0; k < i; k...
[ "public", "static", "boolean", "lower", "(", "double", "[", "]", "T", ",", "int", "indexT", ",", "int", "n", ")", "{", "double", "el_ii", ";", "double", "div_el_ii", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "n", ";", "i",...
Performs an inline lower Cholesky decomposition on an inner row-major matrix. Only the lower triangular portion of the matrix is read or written to. @param T Array containing an inner row-major matrix. Modified. @param indexT First index of the inner row-major matrix. @param n Number of rows and columns of the matr...
[ "Performs", "an", "inline", "lower", "Cholesky", "decomposition", "on", "an", "inner", "row", "-", "major", "matrix", ".", "Only", "the", "lower", "triangular", "portion", "of", "the", "matrix", "is", "read", "or", "written", "to", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/block/decomposition/chol/InnerCholesky_DDRB.java#L97-L125
162,461
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/factory/LinearSolverFactory_DDRM.java
LinearSolverFactory_DDRM.general
public static LinearSolverDense<DMatrixRMaj> general(int numRows , int numCols ) { if( numRows == numCols ) return linear(numRows); else return leastSquares(numRows,numCols); }
java
public static LinearSolverDense<DMatrixRMaj> general(int numRows , int numCols ) { if( numRows == numCols ) return linear(numRows); else return leastSquares(numRows,numCols); }
[ "public", "static", "LinearSolverDense", "<", "DMatrixRMaj", ">", "general", "(", "int", "numRows", ",", "int", "numCols", ")", "{", "if", "(", "numRows", "==", "numCols", ")", "return", "linear", "(", "numRows", ")", ";", "else", "return", "leastSquares", ...
Creates a general purpose solver. Use this if you are not sure what you need. @param numRows The number of rows that the decomposition is optimized for. @param numCols The number of columns that the decomposition is optimized for.
[ "Creates", "a", "general", "purpose", "solver", ".", "Use", "this", "if", "you", "are", "not", "sure", "what", "you", "need", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/factory/LinearSolverFactory_DDRM.java#L77-L82
162,462
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/factory/LinearSolverFactory_DDRM.java
LinearSolverFactory_DDRM.symmPosDef
public static LinearSolverDense<DMatrixRMaj> symmPosDef(int matrixWidth ) { if(matrixWidth < EjmlParameters.SWITCH_BLOCK64_CHOLESKY ) { CholeskyDecompositionCommon_DDRM decomp = new CholeskyDecompositionInner_DDRM(true); return new LinearSolverChol_DDRM(decomp); } else { ...
java
public static LinearSolverDense<DMatrixRMaj> symmPosDef(int matrixWidth ) { if(matrixWidth < EjmlParameters.SWITCH_BLOCK64_CHOLESKY ) { CholeskyDecompositionCommon_DDRM decomp = new CholeskyDecompositionInner_DDRM(true); return new LinearSolverChol_DDRM(decomp); } else { ...
[ "public", "static", "LinearSolverDense", "<", "DMatrixRMaj", ">", "symmPosDef", "(", "int", "matrixWidth", ")", "{", "if", "(", "matrixWidth", "<", "EjmlParameters", ".", "SWITCH_BLOCK64_CHOLESKY", ")", "{", "CholeskyDecompositionCommon_DDRM", "decomp", "=", "new", ...
Creates a solver for symmetric positive definite matrices. @return A new solver for symmetric positive definite matrices.
[ "Creates", "a", "solver", "for", "symmetric", "positive", "definite", "matrices", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/factory/LinearSolverFactory_DDRM.java#L117-L129
162,463
lessthanoptimal/ejml
examples/src/org/ejml/example/LevenbergMarquardt.java
LevenbergMarquardt.setConvergence
public void setConvergence( int maxIterations , double ftol , double gtol ) { this.maxIterations = maxIterations; this.ftol = ftol; this.gtol = gtol; }
java
public void setConvergence( int maxIterations , double ftol , double gtol ) { this.maxIterations = maxIterations; this.ftol = ftol; this.gtol = gtol; }
[ "public", "void", "setConvergence", "(", "int", "maxIterations", ",", "double", "ftol", ",", "double", "gtol", ")", "{", "this", ".", "maxIterations", "=", "maxIterations", ";", "this", ".", "ftol", "=", "ftol", ";", "this", ".", "gtol", "=", "gtol", ";"...
Specifies convergence criteria @param maxIterations Maximum number of iterations @param ftol convergence based on change in function value. try 1e-12 @param gtol convergence based on residual magnitude. Try 1e-12
[ "Specifies", "convergence", "criteria" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/examples/src/org/ejml/example/LevenbergMarquardt.java#L107-L111
162,464
lessthanoptimal/ejml
examples/src/org/ejml/example/LevenbergMarquardt.java
LevenbergMarquardt.computeGradientAndHessian
private void computeGradientAndHessian(DMatrixRMaj param ) { // residuals = f(x) - y function.compute(param, residuals); computeNumericalJacobian(param,jacobian); CommonOps_DDRM.multTransA(jacobian, residuals, g); CommonOps_DDRM.multTransA(jacobian, jacobian, H); ...
java
private void computeGradientAndHessian(DMatrixRMaj param ) { // residuals = f(x) - y function.compute(param, residuals); computeNumericalJacobian(param,jacobian); CommonOps_DDRM.multTransA(jacobian, residuals, g); CommonOps_DDRM.multTransA(jacobian, jacobian, H); ...
[ "private", "void", "computeGradientAndHessian", "(", "DMatrixRMaj", "param", ")", "{", "// residuals = f(x) - y", "function", ".", "compute", "(", "param", ",", "residuals", ")", ";", "computeNumericalJacobian", "(", "param", ",", "jacobian", ")", ";", "CommonOps_DD...
Computes the d and H parameters. d = J'*(f(x)-y) <--- that's also the gradient H = J'*J
[ "Computes", "the", "d", "and", "H", "parameters", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/examples/src/org/ejml/example/LevenbergMarquardt.java#L217-L228
162,465
lessthanoptimal/ejml
main/ejml-core/src/org/ejml/data/DMatrixRMaj.java
DMatrixRMaj.wrap
public static DMatrixRMaj wrap(int numRows , int numCols , double []data ) { DMatrixRMaj s = new DMatrixRMaj(); s.data = data; s.numRows = numRows; s.numCols = numCols; return s; }
java
public static DMatrixRMaj wrap(int numRows , int numCols , double []data ) { DMatrixRMaj s = new DMatrixRMaj(); s.data = data; s.numRows = numRows; s.numCols = numCols; return s; }
[ "public", "static", "DMatrixRMaj", "wrap", "(", "int", "numRows", ",", "int", "numCols", ",", "double", "[", "]", "data", ")", "{", "DMatrixRMaj", "s", "=", "new", "DMatrixRMaj", "(", ")", ";", "s", ".", "data", "=", "data", ";", "s", ".", "numRows",...
Creates a new DMatrixRMaj around the provided data. The data must encode a row-major matrix. Any modification to the returned matrix will modify the provided data. @param numRows Number of rows in the matrix. @param numCols Number of columns in the matrix. @param data Data that is being wrapped. Referenced Saved. @r...
[ "Creates", "a", "new", "DMatrixRMaj", "around", "the", "provided", "data", ".", "The", "data", "must", "encode", "a", "row", "-", "major", "matrix", ".", "Any", "modification", "to", "the", "returned", "matrix", "will", "modify", "the", "provided", "data", ...
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-core/src/org/ejml/data/DMatrixRMaj.java#L175-L182
162,466
lessthanoptimal/ejml
main/ejml-core/src/org/ejml/data/DMatrixRMaj.java
DMatrixRMaj.add
public void add( int row , int col , double value ) { if( col < 0 || col >= numCols || row < 0 || row >= numRows ) { throw new IllegalArgumentException("Specified element is out of bounds"); } data[ row * numCols + col ] += value; }
java
public void add( int row , int col , double value ) { if( col < 0 || col >= numCols || row < 0 || row >= numRows ) { throw new IllegalArgumentException("Specified element is out of bounds"); } data[ row * numCols + col ] += value; }
[ "public", "void", "add", "(", "int", "row", ",", "int", "col", ",", "double", "value", ")", "{", "if", "(", "col", "<", "0", "||", "col", ">=", "numCols", "||", "row", "<", "0", "||", "row", ">=", "numRows", ")", "{", "throw", "new", "IllegalArgu...
todo move to commonops
[ "todo", "move", "to", "commonops" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-core/src/org/ejml/data/DMatrixRMaj.java#L238-L244
162,467
lessthanoptimal/ejml
main/ejml-core/src/org/ejml/data/DMatrixRMaj.java
DMatrixRMaj.get
@Override public double get( int row , int col ) { if( col < 0 || col >= numCols || row < 0 || row >= numRows ) { throw new IllegalArgumentException("Specified element is out of bounds: "+row+" "+col); } return data[ row * numCols + col ]; }
java
@Override public double get( int row , int col ) { if( col < 0 || col >= numCols || row < 0 || row >= numRows ) { throw new IllegalArgumentException("Specified element is out of bounds: "+row+" "+col); } return data[ row * numCols + col ]; }
[ "@", "Override", "public", "double", "get", "(", "int", "row", ",", "int", "col", ")", "{", "if", "(", "col", "<", "0", "||", "col", ">=", "numCols", "||", "row", "<", "0", "||", "row", ">=", "numRows", ")", "{", "throw", "new", "IllegalArgumentExc...
Returns the value of the specified matrix element. Performs a bounds check to make sure the requested element is part of the matrix. @param row The row of the element. @param col The column of the element. @return The value of the element.
[ "Returns", "the", "value", "of", "the", "specified", "matrix", "element", ".", "Performs", "a", "bounds", "check", "to", "make", "sure", "the", "requested", "element", "is", "part", "of", "the", "matrix", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-core/src/org/ejml/data/DMatrixRMaj.java#L254-L261
162,468
lessthanoptimal/ejml
main/ejml-core/src/org/ejml/data/DMatrixRMaj.java
DMatrixRMaj.set
public void set(int numRows, int numCols, boolean rowMajor, double ...data) { reshape(numRows,numCols); int length = numRows*numCols; if( length > this.data.length ) throw new IllegalArgumentException("The length of this matrix's data array is too small."); if( rowMajor...
java
public void set(int numRows, int numCols, boolean rowMajor, double ...data) { reshape(numRows,numCols); int length = numRows*numCols; if( length > this.data.length ) throw new IllegalArgumentException("The length of this matrix's data array is too small."); if( rowMajor...
[ "public", "void", "set", "(", "int", "numRows", ",", "int", "numCols", ",", "boolean", "rowMajor", ",", "double", "...", "data", ")", "{", "reshape", "(", "numRows", ",", "numCols", ")", ";", "int", "length", "=", "numRows", "*", "numCols", ";", "if", ...
Sets this matrix equal to the matrix encoded in the array. @param numRows The number of rows. @param numCols The number of columns. @param rowMajor If the array is encoded in a row-major or a column-major format. @param data The formatted 1D array. Not modified.
[ "Sets", "this", "matrix", "equal", "to", "the", "matrix", "encoded", "in", "the", "array", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-core/src/org/ejml/data/DMatrixRMaj.java#L303-L321
162,469
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/linsol/chol/LinearSolverChol_DDRB.java
LinearSolverChol_DDRB.solve
@Override public void solve(DMatrixRMaj B, DMatrixRMaj X) { blockB.reshape(B.numRows,B.numCols,false); MatrixOps_DDRB.convert(B,blockB); // since overwrite B is true X does not need to be passed in alg.solve(blockB,null); MatrixOps_DDRB.convert(blockB,X); }
java
@Override public void solve(DMatrixRMaj B, DMatrixRMaj X) { blockB.reshape(B.numRows,B.numCols,false); MatrixOps_DDRB.convert(B,blockB); // since overwrite B is true X does not need to be passed in alg.solve(blockB,null); MatrixOps_DDRB.convert(blockB,X); }
[ "@", "Override", "public", "void", "solve", "(", "DMatrixRMaj", "B", ",", "DMatrixRMaj", "X", ")", "{", "blockB", ".", "reshape", "(", "B", ".", "numRows", ",", "B", ".", "numCols", ",", "false", ")", ";", "MatrixOps_DDRB", ".", "convert", "(", "B", ...
Only converts the B matrix and passes that onto solve. Te result is then copied into the input 'X' matrix. @param B A matrix &real; <sup>m &times; p</sup>. Not modified. @param X A matrix &real; <sup>n &times; p</sup>, where the solution is written to. Modified.
[ "Only", "converts", "the", "B", "matrix", "and", "passes", "that", "onto", "solve", ".", "Te", "result", "is", "then", "copied", "into", "the", "input", "X", "matrix", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/linsol/chol/LinearSolverChol_DDRB.java#L47-L56
162,470
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/simple/SimpleEVD.java
SimpleEVD.getEigenvalues
public List<Complex_F64> getEigenvalues() { List<Complex_F64> ret = new ArrayList<Complex_F64>(); if( is64 ) { EigenDecomposition_F64 d = (EigenDecomposition_F64)eig; for (int i = 0; i < eig.getNumberOfEigenvalues(); i++) { ret.add(d.getEigenvalue(i)); ...
java
public List<Complex_F64> getEigenvalues() { List<Complex_F64> ret = new ArrayList<Complex_F64>(); if( is64 ) { EigenDecomposition_F64 d = (EigenDecomposition_F64)eig; for (int i = 0; i < eig.getNumberOfEigenvalues(); i++) { ret.add(d.getEigenvalue(i)); ...
[ "public", "List", "<", "Complex_F64", ">", "getEigenvalues", "(", ")", "{", "List", "<", "Complex_F64", ">", "ret", "=", "new", "ArrayList", "<", "Complex_F64", ">", "(", ")", ";", "if", "(", "is64", ")", "{", "EigenDecomposition_F64", "d", "=", "(", "...
Returns a list of all the eigenvalues
[ "Returns", "a", "list", "of", "all", "the", "eigenvalues" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/simple/SimpleEVD.java#L63-L80
162,471
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/simple/SimpleEVD.java
SimpleEVD.getIndexMax
public int getIndexMax() { int indexMax = 0; double max = getEigenvalue(0).getMagnitude2(); final int N = getNumberOfEigenvalues(); for( int i = 1; i < N; i++ ) { double m = getEigenvalue(i).getMagnitude2(); if( m > max ) { max = m; ...
java
public int getIndexMax() { int indexMax = 0; double max = getEigenvalue(0).getMagnitude2(); final int N = getNumberOfEigenvalues(); for( int i = 1; i < N; i++ ) { double m = getEigenvalue(i).getMagnitude2(); if( m > max ) { max = m; ...
[ "public", "int", "getIndexMax", "(", ")", "{", "int", "indexMax", "=", "0", ";", "double", "max", "=", "getEigenvalue", "(", "0", ")", ".", "getMagnitude2", "(", ")", ";", "final", "int", "N", "=", "getNumberOfEigenvalues", "(", ")", ";", "for", "(", ...
Returns the index of the eigenvalue which has the largest magnitude. @return index of the largest magnitude eigen value.
[ "Returns", "the", "index", "of", "the", "eigenvalue", "which", "has", "the", "largest", "magnitude", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/simple/SimpleEVD.java#L166-L180
162,472
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/simple/SimpleEVD.java
SimpleEVD.getIndexMin
public int getIndexMin() { int indexMin = 0; double min = getEigenvalue(0).getMagnitude2(); final int N = getNumberOfEigenvalues(); for( int i = 1; i < N; i++ ) { double m = getEigenvalue(i).getMagnitude2(); if( m < min ) { min = m; ...
java
public int getIndexMin() { int indexMin = 0; double min = getEigenvalue(0).getMagnitude2(); final int N = getNumberOfEigenvalues(); for( int i = 1; i < N; i++ ) { double m = getEigenvalue(i).getMagnitude2(); if( m < min ) { min = m; ...
[ "public", "int", "getIndexMin", "(", ")", "{", "int", "indexMin", "=", "0", ";", "double", "min", "=", "getEigenvalue", "(", "0", ")", ".", "getMagnitude2", "(", ")", ";", "final", "int", "N", "=", "getNumberOfEigenvalues", "(", ")", ";", "for", "(", ...
Returns the index of the eigenvalue which has the smallest magnitude. @return index of the smallest magnitude eigen value.
[ "Returns", "the", "index", "of", "the", "eigenvalue", "which", "has", "the", "smallest", "magnitude", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/simple/SimpleEVD.java#L187-L201
162,473
lessthanoptimal/ejml
main/ejml-dsparse/src/org/ejml/sparse/csc/decomposition/qr/QrStructuralCounts_DSCC.java
QrStructuralCounts_DSCC.process
public boolean process( DMatrixSparseCSC A ) { init(A); TriangularSolver_DSCC.eliminationTree(A,true,parent,gwork); countNonZeroInR(parent); countNonZeroInV(parent); // if more columns than rows it's possible that Q*R != A. That's because a householder // would need to...
java
public boolean process( DMatrixSparseCSC A ) { init(A); TriangularSolver_DSCC.eliminationTree(A,true,parent,gwork); countNonZeroInR(parent); countNonZeroInV(parent); // if more columns than rows it's possible that Q*R != A. That's because a householder // would need to...
[ "public", "boolean", "process", "(", "DMatrixSparseCSC", "A", ")", "{", "init", "(", "A", ")", ";", "TriangularSolver_DSCC", ".", "eliminationTree", "(", "A", ",", "true", ",", "parent", ",", "gwork", ")", ";", "countNonZeroInR", "(", "parent", ")", ";", ...
Examins the structure of A for QR decomposition @param A matrix which is to be decomposed @return true if the solution is valid or false if the decomposition can't be performed (i.e. requires column pivots)
[ "Examins", "the", "structure", "of", "A", "for", "QR", "decomposition" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-dsparse/src/org/ejml/sparse/csc/decomposition/qr/QrStructuralCounts_DSCC.java#L65-L84
162,474
lessthanoptimal/ejml
main/ejml-dsparse/src/org/ejml/sparse/csc/decomposition/qr/QrStructuralCounts_DSCC.java
QrStructuralCounts_DSCC.init
void init( DMatrixSparseCSC A ) { this.A = A; this.m = A.numRows; this.n = A.numCols; this.next = 0; this.head = m; this.tail = m + n; this.nque = m + 2*n; if( parent.length < n || leftmost.length < m) { parent = new int[n]; post ...
java
void init( DMatrixSparseCSC A ) { this.A = A; this.m = A.numRows; this.n = A.numCols; this.next = 0; this.head = m; this.tail = m + n; this.nque = m + 2*n; if( parent.length < n || leftmost.length < m) { parent = new int[n]; post ...
[ "void", "init", "(", "DMatrixSparseCSC", "A", ")", "{", "this", ".", "A", "=", "A", ";", "this", ".", "m", "=", "A", ".", "numRows", ";", "this", ".", "n", "=", "A", ".", "numCols", ";", "this", ".", "next", "=", "0", ";", "this", ".", "head"...
Initializes data structures
[ "Initializes", "data", "structures" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-dsparse/src/org/ejml/sparse/csc/decomposition/qr/QrStructuralCounts_DSCC.java#L89-L107
162,475
lessthanoptimal/ejml
main/ejml-dsparse/src/org/ejml/sparse/csc/decomposition/qr/QrStructuralCounts_DSCC.java
QrStructuralCounts_DSCC.countNonZeroInR
void countNonZeroInR( int[] parent ) { TriangularSolver_DSCC.postorder(parent,n,post,gwork); columnCounts.process(A,parent,post,countsR); nz_in_R = 0; for (int k = 0; k < n; k++) { nz_in_R += countsR[k]; } if( nz_in_R < 0) throw new RuntimeExceptio...
java
void countNonZeroInR( int[] parent ) { TriangularSolver_DSCC.postorder(parent,n,post,gwork); columnCounts.process(A,parent,post,countsR); nz_in_R = 0; for (int k = 0; k < n; k++) { nz_in_R += countsR[k]; } if( nz_in_R < 0) throw new RuntimeExceptio...
[ "void", "countNonZeroInR", "(", "int", "[", "]", "parent", ")", "{", "TriangularSolver_DSCC", ".", "postorder", "(", "parent", ",", "n", ",", "post", ",", "gwork", ")", ";", "columnCounts", ".", "process", "(", "A", ",", "parent", ",", "post", ",", "co...
Count the number of non-zero elements in R
[ "Count", "the", "number", "of", "non", "-", "zero", "elements", "in", "R" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-dsparse/src/org/ejml/sparse/csc/decomposition/qr/QrStructuralCounts_DSCC.java#L113-L122
162,476
lessthanoptimal/ejml
main/ejml-dsparse/src/org/ejml/sparse/csc/decomposition/qr/QrStructuralCounts_DSCC.java
QrStructuralCounts_DSCC.countNonZeroInV
void countNonZeroInV( int []parent ) { int []w = gwork.data; findMinElementIndexInRows(leftmost); createRowElementLinkedLists(leftmost,w); countNonZeroUsingLinkedList(parent,w); }
java
void countNonZeroInV( int []parent ) { int []w = gwork.data; findMinElementIndexInRows(leftmost); createRowElementLinkedLists(leftmost,w); countNonZeroUsingLinkedList(parent,w); }
[ "void", "countNonZeroInV", "(", "int", "[", "]", "parent", ")", "{", "int", "[", "]", "w", "=", "gwork", ".", "data", ";", "findMinElementIndexInRows", "(", "leftmost", ")", ";", "createRowElementLinkedLists", "(", "leftmost", ",", "w", ")", ";", "countNon...
Count the number of non-zero elements in V
[ "Count", "the", "number", "of", "non", "-", "zero", "elements", "in", "V" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-dsparse/src/org/ejml/sparse/csc/decomposition/qr/QrStructuralCounts_DSCC.java#L127-L132
162,477
lessthanoptimal/ejml
main/ejml-dsparse/src/org/ejml/sparse/csc/decomposition/qr/QrStructuralCounts_DSCC.java
QrStructuralCounts_DSCC.countNonZeroUsingLinkedList
void countNonZeroUsingLinkedList( int parent[] , int ll[] ) { Arrays.fill(pinv,0,m,-1); nz_in_V = 0; m2 = m; for (int k = 0; k < n; k++) { int i = ll[head+k]; // remove row i from queue k nz_in_V++; // count V(k,k) as nonzero ...
java
void countNonZeroUsingLinkedList( int parent[] , int ll[] ) { Arrays.fill(pinv,0,m,-1); nz_in_V = 0; m2 = m; for (int k = 0; k < n; k++) { int i = ll[head+k]; // remove row i from queue k nz_in_V++; // count V(k,k) as nonzero ...
[ "void", "countNonZeroUsingLinkedList", "(", "int", "parent", "[", "]", ",", "int", "ll", "[", "]", ")", "{", "Arrays", ".", "fill", "(", "pinv", ",", "0", ",", "m", ",", "-", "1", ")", ";", "nz_in_V", "=", "0", ";", "m2", "=", "m", ";", "for", ...
Non-zero counts of Householder vectors and computes a permutation matrix that ensures diagonal entires are all structurally nonzero. @param parent elimination tree @param ll linked list for each row that specifies elements that are not zero
[ "Non", "-", "zero", "counts", "of", "Householder", "vectors", "and", "computes", "a", "permutation", "matrix", "that", "ensures", "diagonal", "entires", "are", "all", "structurally", "nonzero", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-dsparse/src/org/ejml/sparse/csc/decomposition/qr/QrStructuralCounts_DSCC.java#L141-L172
162,478
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/Equation.java
Equation.alias
public void alias(DMatrixRMaj variable , String name ) { if( isReserved(name)) throw new RuntimeException("Reserved word or contains a reserved character"); VariableMatrix old = (VariableMatrix)variables.get(name); if( old == null ) { variables.put(name, new VariableMatri...
java
public void alias(DMatrixRMaj variable , String name ) { if( isReserved(name)) throw new RuntimeException("Reserved word or contains a reserved character"); VariableMatrix old = (VariableMatrix)variables.get(name); if( old == null ) { variables.put(name, new VariableMatri...
[ "public", "void", "alias", "(", "DMatrixRMaj", "variable", ",", "String", "name", ")", "{", "if", "(", "isReserved", "(", "name", ")", ")", "throw", "new", "RuntimeException", "(", "\"Reserved word or contains a reserved character\"", ")", ";", "VariableMatrix", "...
Adds a new Matrix variable. If one already has the same name it is written over. While more verbose for multiple variables, this function doesn't require new memory be declared each time it's called. @param variable Matrix which is to be assigned to name @param name The name of the variable
[ "Adds", "a", "new", "Matrix", "variable", ".", "If", "one", "already", "has", "the", "same", "name", "it", "is", "written", "over", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/Equation.java#L288-L297
162,479
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/Equation.java
Equation.alias
public void alias( double value , String name ) { if( isReserved(name)) throw new RuntimeException("Reserved word or contains a reserved character. '"+name+"'"); VariableDouble old = (VariableDouble)variables.get(name); if( old == null ) { variables.put(name, new Variabl...
java
public void alias( double value , String name ) { if( isReserved(name)) throw new RuntimeException("Reserved word or contains a reserved character. '"+name+"'"); VariableDouble old = (VariableDouble)variables.get(name); if( old == null ) { variables.put(name, new Variabl...
[ "public", "void", "alias", "(", "double", "value", ",", "String", "name", ")", "{", "if", "(", "isReserved", "(", "name", ")", ")", "throw", "new", "RuntimeException", "(", "\"Reserved word or contains a reserved character. '\"", "+", "name", "+", "\"'\"", ")", ...
Adds a new floating point variable. If one already has the same name it is written over. @param value Value of the number @param name Name in code
[ "Adds", "a", "new", "floating", "point", "variable", ".", "If", "one", "already", "has", "the", "same", "name", "it", "is", "written", "over", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/Equation.java#L320-L330
162,480
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/Equation.java
Equation.alias
public void alias( Object ...args ) { if( args.length % 2 == 1 ) throw new RuntimeException("Even number of arguments expected"); for (int i = 0; i < args.length; i += 2) { aliasGeneric( args[i], (String)args[i+1]); } }
java
public void alias( Object ...args ) { if( args.length % 2 == 1 ) throw new RuntimeException("Even number of arguments expected"); for (int i = 0; i < args.length; i += 2) { aliasGeneric( args[i], (String)args[i+1]); } }
[ "public", "void", "alias", "(", "Object", "...", "args", ")", "{", "if", "(", "args", ".", "length", "%", "2", "==", "1", ")", "throw", "new", "RuntimeException", "(", "\"Even number of arguments expected\"", ")", ";", "for", "(", "int", "i", "=", "0", ...
Creates multiple aliases at once.
[ "Creates", "multiple", "aliases", "at", "once", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/Equation.java#L364-L371
162,481
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/Equation.java
Equation.aliasGeneric
protected void aliasGeneric( Object variable , String name ) { if( variable.getClass() == Integer.class ) { alias(((Integer)variable).intValue(),name); } else if( variable.getClass() == Double.class ) { alias(((Double)variable).doubleValue(),name); } else if( variable.get...
java
protected void aliasGeneric( Object variable , String name ) { if( variable.getClass() == Integer.class ) { alias(((Integer)variable).intValue(),name); } else if( variable.getClass() == Double.class ) { alias(((Double)variable).doubleValue(),name); } else if( variable.get...
[ "protected", "void", "aliasGeneric", "(", "Object", "variable", ",", "String", "name", ")", "{", "if", "(", "variable", ".", "getClass", "(", ")", "==", "Integer", ".", "class", ")", "{", "alias", "(", "(", "(", "Integer", ")", "variable", ")", ".", ...
Aliases variables with an unknown type. @param variable The variable being aliased @param name Name of the variable
[ "Aliases", "variables", "with", "an", "unknown", "type", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/Equation.java#L378-L403
162,482
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/Equation.java
Equation.compile
public Sequence compile( String equation , boolean assignment, boolean debug ) { functions.setManagerTemp(managerTemp); Sequence sequence = new Sequence(); TokenList tokens = extractTokens(equation,managerTemp); if( tokens.size() < 3 ) throw new RuntimeException("Too few t...
java
public Sequence compile( String equation , boolean assignment, boolean debug ) { functions.setManagerTemp(managerTemp); Sequence sequence = new Sequence(); TokenList tokens = extractTokens(equation,managerTemp); if( tokens.size() < 3 ) throw new RuntimeException("Too few t...
[ "public", "Sequence", "compile", "(", "String", "equation", ",", "boolean", "assignment", ",", "boolean", "debug", ")", "{", "functions", ".", "setManagerTemp", "(", "managerTemp", ")", ";", "Sequence", "sequence", "=", "new", "Sequence", "(", ")", ";", "Tok...
Parses the equation and compiles it into a sequence which can be executed later on @param equation String in simple equation format. @param assignment if true an assignment is expected and an exception if thrown if there is non @param debug if true it will print out debugging information @return Sequence of operations ...
[ "Parses", "the", "equation", "and", "compiles", "it", "into", "a", "sequence", "which", "can", "be", "executed", "later", "on" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/Equation.java#L416-L466
162,483
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/Equation.java
Equation.parseMacro
private void parseMacro( TokenList tokens , Sequence sequence ) { Macro macro = new Macro(); TokenList.Token t = tokens.getFirst().next; if( t.word == null ) { throw new ParseError("Expected the macro's name after "+tokens.getFirst().word); } List<TokenList.Token> v...
java
private void parseMacro( TokenList tokens , Sequence sequence ) { Macro macro = new Macro(); TokenList.Token t = tokens.getFirst().next; if( t.word == null ) { throw new ParseError("Expected the macro's name after "+tokens.getFirst().word); } List<TokenList.Token> v...
[ "private", "void", "parseMacro", "(", "TokenList", "tokens", ",", "Sequence", "sequence", ")", "{", "Macro", "macro", "=", "new", "Macro", "(", ")", ";", "TokenList", ".", "Token", "t", "=", "tokens", ".", "getFirst", "(", ")", ".", "next", ";", "if", ...
Parse a macro defintion. "macro NAME( var0 , var1 ) = 5+var0+var1'
[ "Parse", "a", "macro", "defintion", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/Equation.java#L518-L542
162,484
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/Equation.java
Equation.checkForUnknownVariables
private void checkForUnknownVariables(TokenList tokens) { TokenList.Token t = tokens.getFirst(); while( t != null ) { if( t.getType() == Type.WORD ) throw new ParseError("Unknown variable on right side. "+t.getWord()); t = t.next; } }
java
private void checkForUnknownVariables(TokenList tokens) { TokenList.Token t = tokens.getFirst(); while( t != null ) { if( t.getType() == Type.WORD ) throw new ParseError("Unknown variable on right side. "+t.getWord()); t = t.next; } }
[ "private", "void", "checkForUnknownVariables", "(", "TokenList", "tokens", ")", "{", "TokenList", ".", "Token", "t", "=", "tokens", ".", "getFirst", "(", ")", ";", "while", "(", "t", "!=", "null", ")", "{", "if", "(", "t", ".", "getType", "(", ")", "...
Examines the list of variables for any unknown variables and throws an exception if one is found
[ "Examines", "the", "list", "of", "variables", "for", "any", "unknown", "variables", "and", "throws", "an", "exception", "if", "one", "is", "found" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/Equation.java#L571-L578
162,485
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/Equation.java
Equation.createVariableInferred
private Variable createVariableInferred(TokenList.Token t0, Variable variableRight) { Variable result; if( t0.getType() == Type.WORD ) { switch( variableRight.getType()) { case MATRIX: alias(new DMatrixRMaj(1,1),t0.getWord()); break; ...
java
private Variable createVariableInferred(TokenList.Token t0, Variable variableRight) { Variable result; if( t0.getType() == Type.WORD ) { switch( variableRight.getType()) { case MATRIX: alias(new DMatrixRMaj(1,1),t0.getWord()); break; ...
[ "private", "Variable", "createVariableInferred", "(", "TokenList", ".", "Token", "t0", ",", "Variable", "variableRight", ")", "{", "Variable", "result", ";", "if", "(", "t0", ".", "getType", "(", ")", "==", "Type", ".", "WORD", ")", "{", "switch", "(", "...
Infer the type of and create a new output variable using the results from the right side of the equation. If the type is already known just return that.
[ "Infer", "the", "type", "of", "and", "create", "a", "new", "output", "variable", "using", "the", "results", "from", "the", "right", "side", "of", "the", "equation", ".", "If", "the", "type", "is", "already", "known", "just", "return", "that", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/Equation.java#L584-L614
162,486
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/Equation.java
Equation.parseAssignRange
private List<Variable> parseAssignRange(Sequence sequence, TokenList tokens, TokenList.Token t0) { // find assignment symbol TokenList.Token tokenAssign = t0.next; while( tokenAssign != null && tokenAssign.symbol != Symbol.ASSIGN ) { tokenAssign = tokenAssign.next; } ...
java
private List<Variable> parseAssignRange(Sequence sequence, TokenList tokens, TokenList.Token t0) { // find assignment symbol TokenList.Token tokenAssign = t0.next; while( tokenAssign != null && tokenAssign.symbol != Symbol.ASSIGN ) { tokenAssign = tokenAssign.next; } ...
[ "private", "List", "<", "Variable", ">", "parseAssignRange", "(", "Sequence", "sequence", ",", "TokenList", "tokens", ",", "TokenList", ".", "Token", "t0", ")", "{", "// find assignment symbol", "TokenList", ".", "Token", "tokenAssign", "=", "t0", ".", "next", ...
See if a range for assignment is specified. If so return the range, otherwise return null Example of assign range: a(0:3,4:5) = blah a((0+2):3,4:5) = blah
[ "See", "if", "a", "range", "for", "assignment", "is", "specified", ".", "If", "so", "return", "the", "range", "otherwise", "return", "null" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/Equation.java#L623-L659
162,487
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/Equation.java
Equation.handleParentheses
protected void handleParentheses( TokenList tokens, Sequence sequence ) { // have a list to handle embedded parentheses, e.g. (((((a))))) List<TokenList.Token> left = new ArrayList<TokenList.Token>(); // find all of them TokenList.Token t = tokens.first; while( t != null ) { ...
java
protected void handleParentheses( TokenList tokens, Sequence sequence ) { // have a list to handle embedded parentheses, e.g. (((((a))))) List<TokenList.Token> left = new ArrayList<TokenList.Token>(); // find all of them TokenList.Token t = tokens.first; while( t != null ) { ...
[ "protected", "void", "handleParentheses", "(", "TokenList", "tokens", ",", "Sequence", "sequence", ")", "{", "// have a list to handle embedded parentheses, e.g. (((((a)))))", "List", "<", "TokenList", ".", "Token", ">", "left", "=", "new", "ArrayList", "<", "TokenList"...
Searches for pairs of parentheses and processes blocks inside of them. Embedded parentheses are handled with no problem. On output only a single token should be in tokens. @param tokens List of parsed tokens @param sequence Sequence of operators
[ "Searches", "for", "pairs", "of", "parentheses", "and", "processes", "blocks", "inside", "of", "them", ".", "Embedded", "parentheses", "are", "handled", "with", "no", "problem", ".", "On", "output", "only", "a", "single", "token", "should", "be", "in", "toke...
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/Equation.java#L667-L720
162,488
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/Equation.java
Equation.parseParameterCommaBlock
protected List<TokenList.Token> parseParameterCommaBlock( TokenList tokens, Sequence sequence ) { // find all the comma tokens List<TokenList.Token> commas = new ArrayList<TokenList.Token>(); TokenList.Token token = tokens.first; int numBracket = 0; while( token != null ) { ...
java
protected List<TokenList.Token> parseParameterCommaBlock( TokenList tokens, Sequence sequence ) { // find all the comma tokens List<TokenList.Token> commas = new ArrayList<TokenList.Token>(); TokenList.Token token = tokens.first; int numBracket = 0; while( token != null ) { ...
[ "protected", "List", "<", "TokenList", ".", "Token", ">", "parseParameterCommaBlock", "(", "TokenList", "tokens", ",", "Sequence", "sequence", ")", "{", "// find all the comma tokens", "List", "<", "TokenList", ".", "Token", ">", "commas", "=", "new", "ArrayList",...
Searches for commas in the set of tokens. Used for inputs to functions. Ignore comma's which are inside a [ ] block @return List of output tokens between the commas
[ "Searches", "for", "commas", "in", "the", "set", "of", "tokens", ".", "Used", "for", "inputs", "to", "functions", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/Equation.java#L729-L776
162,489
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/Equation.java
Equation.parseSubmatrixToExtract
protected TokenList.Token parseSubmatrixToExtract(TokenList.Token variableTarget, TokenList tokens, Sequence sequence) { List<TokenList.Token> inputs = parseParameterCommaBlock(tokens, sequence); List<Variable> variables = new ArrayList<Variable>(...
java
protected TokenList.Token parseSubmatrixToExtract(TokenList.Token variableTarget, TokenList tokens, Sequence sequence) { List<TokenList.Token> inputs = parseParameterCommaBlock(tokens, sequence); List<Variable> variables = new ArrayList<Variable>(...
[ "protected", "TokenList", ".", "Token", "parseSubmatrixToExtract", "(", "TokenList", ".", "Token", "variableTarget", ",", "TokenList", "tokens", ",", "Sequence", "sequence", ")", "{", "List", "<", "TokenList", ".", "Token", ">", "inputs", "=", "parseParameterComma...
Converts a submatrix into an extract matrix operation. @param variableTarget The variable in which the submatrix is extracted from
[ "Converts", "a", "submatrix", "into", "an", "extract", "matrix", "operation", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/Equation.java#L782-L826
162,490
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/Equation.java
Equation.addSubMatrixVariables
private void addSubMatrixVariables(List<TokenList.Token> inputs, List<Variable> variables) { for (int i = 0; i < inputs.size(); i++) { TokenList.Token t = inputs.get(i); if( t.getType() != Type.VARIABLE ) throw new ParseError("Expected variables only in sub-matrix input, ...
java
private void addSubMatrixVariables(List<TokenList.Token> inputs, List<Variable> variables) { for (int i = 0; i < inputs.size(); i++) { TokenList.Token t = inputs.get(i); if( t.getType() != Type.VARIABLE ) throw new ParseError("Expected variables only in sub-matrix input, ...
[ "private", "void", "addSubMatrixVariables", "(", "List", "<", "TokenList", ".", "Token", ">", "inputs", ",", "List", "<", "Variable", ">", "variables", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "inputs", ".", "size", "(", ")", ";", ...
Goes through the token lists and adds all the variables which can be used to define a sub-matrix. If anything else is found an excpetion is thrown
[ "Goes", "through", "the", "token", "lists", "and", "adds", "all", "the", "variables", "which", "can", "be", "used", "to", "define", "a", "sub", "-", "matrix", ".", "If", "anything", "else", "is", "found", "an", "excpetion", "is", "thrown" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/Equation.java#L832-L844
162,491
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/Equation.java
Equation.parseBlockNoParentheses
protected TokenList.Token parseBlockNoParentheses(TokenList tokens, Sequence sequence, boolean insideMatrixConstructor) { // search for matrix bracket operations if( !insideMatrixConstructor ) { parseBracketCreateMatrix(tokens, sequence); } // First create sequences from an...
java
protected TokenList.Token parseBlockNoParentheses(TokenList tokens, Sequence sequence, boolean insideMatrixConstructor) { // search for matrix bracket operations if( !insideMatrixConstructor ) { parseBracketCreateMatrix(tokens, sequence); } // First create sequences from an...
[ "protected", "TokenList", ".", "Token", "parseBlockNoParentheses", "(", "TokenList", "tokens", ",", "Sequence", "sequence", ",", "boolean", "insideMatrixConstructor", ")", "{", "// search for matrix bracket operations", "if", "(", "!", "insideMatrixConstructor", ")", "{",...
Parses a code block with no parentheses and no commas. After it is done there should be a single token left, which is returned.
[ "Parses", "a", "code", "block", "with", "no", "parentheses", "and", "no", "commas", ".", "After", "it", "is", "done", "there", "should", "be", "a", "single", "token", "left", "which", "is", "returned", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/Equation.java#L850-L889
162,492
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/Equation.java
Equation.stripCommas
private void stripCommas(TokenList tokens) { TokenList.Token t = tokens.getFirst(); while( t != null ) { TokenList.Token next = t.next; if( t.getSymbol() == Symbol.COMMA ) { tokens.remove(t); } t = next; } }
java
private void stripCommas(TokenList tokens) { TokenList.Token t = tokens.getFirst(); while( t != null ) { TokenList.Token next = t.next; if( t.getSymbol() == Symbol.COMMA ) { tokens.remove(t); } t = next; } }
[ "private", "void", "stripCommas", "(", "TokenList", "tokens", ")", "{", "TokenList", ".", "Token", "t", "=", "tokens", ".", "getFirst", "(", ")", ";", "while", "(", "t", "!=", "null", ")", "{", "TokenList", ".", "Token", "next", "=", "t", ".", "next"...
Removes all commas from the token list
[ "Removes", "all", "commas", "from", "the", "token", "list" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/Equation.java#L894-L904
162,493
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/Equation.java
Equation.parseSequencesWithColons
protected void parseSequencesWithColons(TokenList tokens , Sequence sequence ) { TokenList.Token t = tokens.getFirst(); if( t == null ) return; int state = 0; TokenList.Token start = null; TokenList.Token middle = null; TokenList.Token prev = t; bo...
java
protected void parseSequencesWithColons(TokenList tokens , Sequence sequence ) { TokenList.Token t = tokens.getFirst(); if( t == null ) return; int state = 0; TokenList.Token start = null; TokenList.Token middle = null; TokenList.Token prev = t; bo...
[ "protected", "void", "parseSequencesWithColons", "(", "TokenList", "tokens", ",", "Sequence", "sequence", ")", "{", "TokenList", ".", "Token", "t", "=", "tokens", ".", "getFirst", "(", ")", ";", "if", "(", "t", "==", "null", ")", "return", ";", "int", "s...
Searches for descriptions of integer sequences and array ranges that have a colon character in them Examples of integer sequences: 1:6 2:4:20 : Examples of array range 2: 2:4:
[ "Searches", "for", "descriptions", "of", "integer", "sequences", "and", "array", "ranges", "that", "have", "a", "colon", "character", "in", "them" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/Equation.java#L918-L996
162,494
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/Equation.java
Equation.parseIntegerLists
protected void parseIntegerLists(TokenList tokens) { TokenList.Token t = tokens.getFirst(); if( t == null || t.next == null ) return; int state = 0; TokenList.Token start = null; TokenList.Token prev = t; boolean last = false; while( true ) { ...
java
protected void parseIntegerLists(TokenList tokens) { TokenList.Token t = tokens.getFirst(); if( t == null || t.next == null ) return; int state = 0; TokenList.Token start = null; TokenList.Token prev = t; boolean last = false; while( true ) { ...
[ "protected", "void", "parseIntegerLists", "(", "TokenList", "tokens", ")", "{", "TokenList", ".", "Token", "t", "=", "tokens", ".", "getFirst", "(", ")", ";", "if", "(", "t", "==", "null", "||", "t", ".", "next", "==", "null", ")", "return", ";", "in...
Searches for a sequence of integers example: 1 2 3 4 6 7 -3
[ "Searches", "for", "a", "sequence", "of", "integers" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/Equation.java#L1005-L1049
162,495
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/Equation.java
Equation.parseCombineIntegerLists
protected void parseCombineIntegerLists(TokenList tokens) { TokenList.Token t = tokens.getFirst(); if( t == null || t.next == null ) return; int numFound = 0; TokenList.Token start = null; TokenList.Token end = null; while( t != null ) { if( t.g...
java
protected void parseCombineIntegerLists(TokenList tokens) { TokenList.Token t = tokens.getFirst(); if( t == null || t.next == null ) return; int numFound = 0; TokenList.Token start = null; TokenList.Token end = null; while( t != null ) { if( t.g...
[ "protected", "void", "parseCombineIntegerLists", "(", "TokenList", "tokens", ")", "{", "TokenList", ".", "Token", "t", "=", "tokens", ".", "getFirst", "(", ")", ";", "if", "(", "t", "==", "null", "||", "t", ".", "next", "==", "null", ")", "return", ";"...
Looks for sequences of integer lists and combine them into one big sequence
[ "Looks", "for", "sequences", "of", "integer", "lists", "and", "combine", "them", "into", "one", "big", "sequence" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/Equation.java#L1054-L1090
162,496
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/Equation.java
Equation.isVariableInteger
private static boolean isVariableInteger(TokenList.Token t) { if( t == null ) return false; return t.getScalarType() == VariableScalar.Type.INTEGER; }
java
private static boolean isVariableInteger(TokenList.Token t) { if( t == null ) return false; return t.getScalarType() == VariableScalar.Type.INTEGER; }
[ "private", "static", "boolean", "isVariableInteger", "(", "TokenList", ".", "Token", "t", ")", "{", "if", "(", "t", "==", "null", ")", "return", "false", ";", "return", "t", ".", "getScalarType", "(", ")", "==", "VariableScalar", ".", "Type", ".", "INTEG...
Checks to see if the token is an integer scalar @return true if integer or false if not
[ "Checks", "to", "see", "if", "the", "token", "is", "an", "integer", "scalar" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/Equation.java#L1104-L1109
162,497
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/Equation.java
Equation.parseBracketCreateMatrix
protected void parseBracketCreateMatrix(TokenList tokens, Sequence sequence) { List<TokenList.Token> left = new ArrayList<TokenList.Token>(); TokenList.Token t = tokens.getFirst(); while( t != null ) { TokenList.Token next = t.next; if( t.getSymbol() == Symbol.BRACKET_L...
java
protected void parseBracketCreateMatrix(TokenList tokens, Sequence sequence) { List<TokenList.Token> left = new ArrayList<TokenList.Token>(); TokenList.Token t = tokens.getFirst(); while( t != null ) { TokenList.Token next = t.next; if( t.getSymbol() == Symbol.BRACKET_L...
[ "protected", "void", "parseBracketCreateMatrix", "(", "TokenList", "tokens", ",", "Sequence", "sequence", ")", "{", "List", "<", "TokenList", ".", "Token", ">", "left", "=", "new", "ArrayList", "<", "TokenList", ".", "Token", ">", "(", ")", ";", "TokenList",...
Searches for brackets which are only used to construct new matrices by concatenating 1 or more matrices together
[ "Searches", "for", "brackets", "which", "are", "only", "used", "to", "construct", "new", "matrices", "by", "concatenating", "1", "or", "more", "matrices", "together" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/Equation.java#L1115-L1152
162,498
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/Equation.java
Equation.parseNegOp
protected void parseNegOp(TokenList tokens, Sequence sequence) { if( tokens.size == 0 ) return; TokenList.Token token = tokens.first; while( token != null ) { TokenList.Token next = token.next; escape: if( token.getSymbol() == Symbol.MINUS ) { ...
java
protected void parseNegOp(TokenList tokens, Sequence sequence) { if( tokens.size == 0 ) return; TokenList.Token token = tokens.first; while( token != null ) { TokenList.Token next = token.next; escape: if( token.getSymbol() == Symbol.MINUS ) { ...
[ "protected", "void", "parseNegOp", "(", "TokenList", "tokens", ",", "Sequence", "sequence", ")", "{", "if", "(", "tokens", ".", "size", "==", "0", ")", "return", ";", "TokenList", ".", "Token", "token", "=", "tokens", ".", "first", ";", "while", "(", "...
Searches for cases where a minus sign means negative operator. That happens when there is a minus sign with a variable to its right and no variable to its left Example: a = - b * c
[ "Searches", "for", "cases", "where", "a", "minus", "sign", "means", "negative", "operator", ".", "That", "happens", "when", "there", "is", "a", "minus", "sign", "with", "a", "variable", "to", "its", "right", "and", "no", "variable", "to", "its", "left" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/Equation.java#L1183-L1217
162,499
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/equation/Equation.java
Equation.parseOperationsL
protected void parseOperationsL(TokenList tokens, Sequence sequence) { if( tokens.size == 0 ) return; TokenList.Token token = tokens.first; if( token.getType() != Type.VARIABLE ) throw new ParseError("The first token in an equation needs to be a variable and not "+toke...
java
protected void parseOperationsL(TokenList tokens, Sequence sequence) { if( tokens.size == 0 ) return; TokenList.Token token = tokens.first; if( token.getType() != Type.VARIABLE ) throw new ParseError("The first token in an equation needs to be a variable and not "+toke...
[ "protected", "void", "parseOperationsL", "(", "TokenList", "tokens", ",", "Sequence", "sequence", ")", "{", "if", "(", "tokens", ".", "size", "==", "0", ")", "return", ";", "TokenList", ".", "Token", "token", "=", "tokens", ".", "first", ";", "if", "(", ...
Parses operations where the input comes from variables to its left only. Hard coded to only look for transpose for now @param tokens List of all the tokens @param sequence List of operation sequence
[ "Parses", "operations", "where", "the", "input", "comes", "from", "variables", "to", "its", "left", "only", ".", "Hard", "coded", "to", "only", "look", "for", "transpose", "for", "now" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/Equation.java#L1227-L1248