Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

test2.cc File Reference

#include <iostream.h>
#include <gslwrap/matrix_float.h>

Go to the source code of this file.

Functions

 main ()


Function Documentation

main ( )
 

Definition at line 4 of file test/test2.cc.

00005 {
00006    gsl::matrix_float a( 3, 3 );
00007    gsl::matrix_float b( 3, 3 );
00008    srand48(10);
00009 
00010    int i, j;
00011    for( i = 0; i < a.size1(); i++ )
00012       for(j = 0; j < a.size2(); j++ )
00013          a( i, j ) = drand48();
00014    for( i = 0; i < b.size1(); i++ )
00015       for( j = 0; j < b.size2(); j++ )
00016          b( i, j ) = drand48();
00017 
00018    cout << "a + b:" << endl << a + b << endl;
00019    cout << "a - b:" << endl << a - b << endl;
00020    cout << "a + 1.0:" << endl << a + 1.0 << endl;
00021    cout << "1.0 - a:" << endl << 1.0 - a << endl;
00022    cout << "a * 10.0:" << endl << a * 10.0 << endl;
00023    cout << "10.0 * a:" << endl << 10.0 * a << endl;
00024    cout << "a / 10.0:" << endl << a / 10.0 << endl;
00025    cout << "a * b:" << endl << a * b << endl;
00026    cout << "a.LU_decomp():" << endl << a.LU_decomp() << endl;
00027    cout << "a.LU_invert():" << endl << a.LU_invert() << endl;
00028    cout << "a.LU_invert() * a:" << endl << a.LU_invert() * a << endl;
00029 }


Generated at Sun Dec 16 23:44:44 2001 for gslwrap by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001