Package com.nr.inv

Examples of com.nr.inv.Wwghts.weights()


    // Test Wwghts
    System.out.println("Testing Wwghts");

    Quad quad =new Quad();
    Wwghts weight2 = new Wwghts(1.0,2,quad);
    w2=weight2.weights();
//    for (i=0;i<2;i++) System.out.printf(w2[i] << " ";
//    System.out.printf(endl;

    sum=0.0;
    for (i=0;i<2;i++) sum += w2[i];
View Full Code Here


      fail("*** Wwghts: 2-point weights fail on linear function");
     
    }

    Wwghts weight3 = new Wwghts(1.0/2.0,3,quad);
    w3=weight3.weights();
//    for (i=0;i<3;i++) System.out.printf(w3[i] << " ";
//    System.out.printf(endl;

    sum=0.0;
    for (i=0;i<3;i++) sum += w3[i];
View Full Code Here

      fail("*** Wwghts: 3-point weights fail on quadratic function");
     
    }

    Wwghts weight4 = new Wwghts(1.0/3.0,4,quad);
    w4=weight4.weights();
//    for (i=0;i<4;i++) System.out.printf(w4[i] << " ";
//    System.out.printf(endl;

    sum=0.0;
    for (i=0;i<4;i++) sum += w4[i];
View Full Code Here

      fail("*** Wwghts: 4-point weights fail on cubic polynomial");
     
    }

    Wwghts weight5=new Wwghts(1.0/4.0,5,quad);
    w5=weight5.weights();
//    for (i=0;i<5;i++) System.out.printf(w5[i] << " ";
//    System.out.printf(endl;

    sum=0.0;
    for (i=0;i<5;i++) sum += w5[i];
View Full Code Here

      fail("*** Wwghts: 5-point weights fail on cubic polynomial");
     
    }

    Wwghts weight6=new Wwghts(1.0/5.0,6,quad);
    w6=weight6.weights();
//    for (i=0;i<6;i++) System.out.printf(w6[i] << " ";
//    System.out.printf(endl;

    sum=0.0;
    for (i=0;i<6;i++) sum += w6[i];
View Full Code Here

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.