ch.unizh.ini.jaer.projects.hopfield.matrix
Class IntMatrix
java.lang.Object
ch.unizh.ini.jaer.projects.hopfield.matrix.IntMatrix
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
public class IntMatrix
- extends java.lang.Object
- implements java.lang.Cloneable, java.io.Serializable
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IntMatrix
public IntMatrix(boolean[][] sourceMatrix)
IntMatrix
public IntMatrix(int[][] sourceMatrix)
IntMatrix
public IntMatrix(int rows,
int cols)
createColumnMatrix
public static IntMatrix createColumnMatrix(int[] input)
createRowMatrix
public static IntMatrix createRowMatrix(int[] input)
add
public void add(int row,
int col,
int value)
clear
public void clear()
clone
public IntMatrix clone()
- Overrides:
clone
in class java.lang.Object
equals
public boolean equals(IntMatrix matrix)
equals
public boolean equals(IntMatrix matrix,
int precision)
fromPackedArray
public int fromPackedArray(java.lang.Integer[] array,
int index)
- Parameters:
array
- index
-
- Returns:
- The new index after this matrix has been read.
get
public int get(int row,
int col)
getCol
public IntMatrix getCol(int col)
getCols
public int getCols()
getRow
public IntMatrix getRow(int row)
getRows
public int getRows()
isVector
public boolean isVector()
isZero
public boolean isZero()
ramdomize
public void ramdomize(int min,
int max)
set
public void set(int row,
int col,
int value)
size
public int size()
sum
public int sum()
toPackedArray
public java.lang.Integer[] toPackedArray()