Package com.nr.example

Source Code of com.nr.example.QRdcmp_Ex

/*
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* <hwh@gddsn.org.cn> wrote this file. As long as you retain this notice you
* can do whatever you want with this stuff. If we meet some day, and you think
* this stuff is worth it, you can buy me a beer in return. Huang Wen Hui
* ----------------------------------------------------------------------------
*
*/

package com.nr.example;

import com.nr.NRUtil;
import com.nr.la.QRdcmp;

public class QRdcmp_Ex {

 
  public static void main(String[] args) {
    double[] a = new double[]{1.0, 0.51.0,
        0.5, 2.2, -1.0,
        1.0,-1.05.0};
    double[][] aa = NRUtil.buildMatrix(3,3, a);
    double[] b = new double[]{2.0, 4.0,1.0};
    double[] x = new double[3];

    QRdcmp qr = new QRdcmp(aa);
    qr.solve(b, x);
    System.out.println(NRUtil.toString(x));
  }
}
TOP

Related Classes of com.nr.example.QRdcmp_Ex

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.