01 /*
02 * $Id: PolynomialMatrixShift.java,v 1.4 2006/08/10 03:20:30 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.Matrix;
10 import org.mklab.nfc.matrix.PolynomialMatrix;
11 import org.mklab.nfc.scalar.Polynomial;
12
13
14 /**
15 * 多項式行列の係数のシフトのサンプルです。
16 * @author koga
17 * @version $Revision: 1.4 $, 2004/04/20
18 */
19 public class PolynomialMatrixShift {
20
21 /**
22 * メインメソッド
23 *
24 * @param args コマンドライン引数
25 */
26 @SuppressWarnings("nls")
27 public static void main(String[] args) {
28 Polynomial s = new Polynomial("s");
29 PolynomialMatrix a = new PolynomialMatrix(new Polynomial[][] { {s.power(2).add(s.multiply(2)).add(1), s.add(1)}, {s, s.power(3).add(1)}});
30 Matrix b = a.shiftHigher();
31 b.print("b");
32 Matrix c = a.shiftHigher(2);
33 c.print("c");
34 Matrix d = ((PolynomialMatrix)c).shiftLower();
35 d.print("d");
36 }
37 }
|