ComposedMatrixSample.java
01 /*
02  * $Id: ComposedMatrixSample.java,v 1.5 2008/02/02 03:06:24 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.DoubleMatrix;
10 
11 
12 /**
13  @author koga
14  @version $Revision: 1.5 $, 2004/04/14
15  */
16 public class ComposedMatrixSample {
17 
18   /**
19    * メインメソッド
20    
21    @param args コマンドライン引数
22    */
23   @SuppressWarnings("nls")
24   public static void main(String[] args) {
25     DoubleMatrix a = new DoubleMatrix(new double[][] { {12}{34}});
26     DoubleMatrix b = new DoubleMatrix(new double[] {56}).transpose();
27     DoubleMatrix c = new DoubleMatrix(new double[][] { {10}{01}});
28     DoubleMatrix d = new DoubleMatrix(new double[] {1});
29     DoubleMatrix a11 = a;
30     DoubleMatrix a12 = b.unaryMinus().multiply(d.inverse()).multiply(b.conjugateTranspose());
31     DoubleMatrix a21 = c.unaryMinus();
32     DoubleMatrix a22 = a.unaryMinus().conjugateTranspose();
33     DoubleMatrix aa1 = a11.appendRight(a12);
34     DoubleMatrix aa2 = a21.appendRight(a22);
35     DoubleMatrix e = aa1.appendDown(aa2);
36     e.print("e");
37   }
38 }