org.ujmp.core.intmatrix.calculation
Class Magic
java.lang.Object
org.ujmp.core.calculation.AbstractCalculation
org.ujmp.core.intmatrix.calculation.AbstractIntCalculation
org.ujmp.core.intmatrix.calculation.Magic
- All Implemented Interfaces:
- Serializable, Calculation, IntCalculation
public class Magic
- extends AbstractIntCalculation
Creates a magic square matrix. The sums of all rows and columns are equal.
This code is taken from JAMA.
- See Also:
- Serialized Form
Methods inherited from class org.ujmp.core.calculation.AbstractCalculation |
allCoordinates, availableCoordinates, calc, calcMulti, contains, getAnnotation, getDimension, getSize, getSource, getSources, getStorageType, getValueCount, isSparse, setAnnotation, setDimension, setSources |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.ujmp.core.calculation.Calculation |
allCoordinates, availableCoordinates, calc, calcMulti, contains, getAnnotation, getDimension, getSize, getSource, getSources, getStorageType, getValueCount, isSparse, setAnnotation, setDimension, setSources |
Magic
public Magic(Matrix matrix,
int size)
getInt
public int getInt(long... coordinates)
throws MatrixException
- Throws:
MatrixException
magic
public static Matrix magic(int n)
Copyright © 2010. All Rights Reserved.