01 /*
02 * $Id: ComplexPolynomialMatrix.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.chap17;
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.scalar.DoubleComplexNumber;
13 import org.mklab.nfc.scalar.Polynomial;
14
15
16 /**
17 * 複素行列を係数とする多項式のサンプルです。
18 * @author koga
19 * @version $Revision: 1.10 $, 2004/04/16
20 */
21 public class ComplexPolynomialMatrix {
22
23 /**
24 * メインメソッド
25 *
26 * @param args コマンドライン引数
27 */
28 @SuppressWarnings("nls")
29 public static void main(String[] args) {
30 Polynomial s = new Polynomial("s");
31 Matrix c1 = new DoubleComplexMatrix(DoubleMatrix.ones(2), DoubleMatrix.ones(2));
32 Matrix c0 = new DoubleComplexMatrix(new DoubleComplexNumber[][] { {new DoubleComplexNumber(1, 5), new DoubleComplexNumber(2, 6)}, {new DoubleComplexNumber(3, 7), new DoubleComplexNumber(4, 8)}});
33 Matrix a = c1.multiply(s).add(c0);
34 a.print("a");
35 }
36 }
|