org.ujmp.core.intmatrix.calculation
Class Magic

java.lang.Object
  extended by org.ujmp.core.calculation.AbstractCalculation
      extended by org.ujmp.core.intmatrix.calculation.AbstractIntCalculation
          extended by 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

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.ujmp.core.calculation.Calculation
Calculation.Ret
 
Field Summary
 
Fields inherited from interface org.ujmp.core.calculation.Calculation
ALL, COLUMN, LINK, NEW, NONE, ORIG, ROW
 
Constructor Summary
Magic(Matrix matrix, int size)
           
 
Method Summary
 int getInt(long... coordinates)
           
static Matrix magic(int n)
           
 
Methods inherited from class org.ujmp.core.intmatrix.calculation.AbstractIntCalculation
calcLink, calcNew, calcOrig, getValueType, setInt
 
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
 

Constructor Detail

Magic

public Magic(Matrix matrix,
             int size)
Method Detail

getInt

public int getInt(long... coordinates)
           throws MatrixException
Throws:
MatrixException

magic

public static Matrix magic(int n)


Copyright © 2010. All Rights Reserved.