PolynomialMatrixShift.java
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  @author koga
16  @version $Revision: 1.4 $, 2004/04/20
17  */
18 public class PolynomialMatrixShift {
19 
20   /**
21    * メインメソッド
22    
23    @param args コマンドライン引数
24    */
25   @SuppressWarnings("nls")
26   public static void main(String[] args) {
27     Polynomial s = new Polynomial("s");
28     PolynomialMatrix a = new PolynomialMatrix(new Polynomial[][] { {s.power(2).add(s.multiply(2)).add(1), s.add(1)}{s, s.power(3).add(1)}});
29     Matrix b = a.shiftHigher();
30     b.print("b");
31     Matrix c = a.shiftHigher(2);
32     c.print("c");
33     Matrix d = ((PolynomialMatrix)c).shiftLower();
34     d.print("d");
35   }
36 }