C# Class DotNetMatrix.examples.MagicSquareExample

Example of use of GeneralMatrix Class, featuring magic squares. *
显示文件 Open project: xieguigang/VisualBasic_AppFramework

Public Methods

Method Description
fixedWidthDoubletoString ( double x, int w, int d ) : System.String

Format double with Fw.d. *

fixedWidthIntegertoString ( int n, int w ) : System.String

Format integer with Iw. *

magic ( int n ) : DotNetMatrix.GeneralMatrix

Generate magic square test matrix. *

Private Methods

Method Description
Main ( System argv ) : void
print ( System s ) : void

Shorten spelling of print. *

Method Details

fixedWidthDoubletoString() public static method

Format double with Fw.d. *
public static fixedWidthDoubletoString ( double x, int w, int d ) : System.String
x double
w int
d int
return System.String

fixedWidthIntegertoString() public static method

Format integer with Iw. *
public static fixedWidthIntegertoString ( int n, int w ) : System.String
n int
w int
return System.String

magic() public static method

Generate magic square test matrix. *
public static magic ( int n ) : DotNetMatrix.GeneralMatrix
n int
return DotNetMatrix.GeneralMatrix