01 /*
02 * $Id: UnitMatrixSample.java,v 1.10 2008/03/03 07:18:10 koga Exp $
03 *
04 * Copyright (C) 2004 Koga Laboratory. All rights reserved.
05 *
06 */
07 package matxbook.chap07;
08
09 import org.mklab.nfc.matrix.DoubleComplexMatrix;
10 import org.mklab.nfc.matrix.DoubleMatrix;
11 import org.mklab.nfc.matrix.Matrix;
12 import org.mklab.nfc.matrix.PolynomialMatrix;
13
14
15 /**
16 * 単位行列のサンプルです。
17 * @author koga
18 * @version $Revision: 1.10 $, 2004/04/14
19 */
20 public class UnitMatrixSample {
21
22 /**
23 * メインメソッド
24 *
25 * @param args コマンドライン引数
26 */
27 @SuppressWarnings("nls")
28 public static void main(String[] args) {
29 Matrix a = DoubleMatrix.unit(2, 3);
30 a.print("I(2,3)");
31
32 Matrix b = DoubleComplexMatrix.unit(2, 3);
33 b.print("I(2,3)");
34
35 Matrix c = PolynomialMatrix.unit(2, 2);
36 c.print("I(2,2)");
37 }
38 }
|