linear_alg.cpp
00001 /******************************************************************************
00002 
00003  Copyright 2008 Departamento de Realidad Virtual
00004  y Unidad de Cómputo Aplicado DGSGA, UNAM.
00005 
00006 
00007  This file is part of RBF++.
00008 
00009  RBF++ is free software: you can redistribute it and/or modify
00010  it under the terms of the GNU General Public License as published by
00011  the Free Software Foundation, either version 3 of the License, or
00012  (at your option) any later version.
00013 
00014  RBF++ is distributed in the hope that it will be useful,
00015  but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00017  GNU General Public License for more details.
00018 
00019  You should have received a copy of the GNU General Public License
00020  along with RBF++. If not, see .
00021 
00022 
00023 *******************************************************************************/
00024 
00025 /* 
00026  Author: Daniel Cervantes Cabrera.
00027  Project: RBF++
00028  Institution: DGSCA, UNAM.
00029  Date: 3/05/08
00030  Description: Linear algebra namespace example.
00031  */
00032 
00033 
00034 
00035 #include 
00036 #include 
00037 #include 
00038 #include 
00039 #include 
00040 
00041 int main(){
00042 
00043   int N = 10;
00044 
00045   LA::Point2dd pt1(3,5),pt2(5,6),pt3(4,5);
00046   LA::Matrixd M(10,10);
00047 
00048   srand(time(0));
00049   for(int i=0; i< N; i++)
00050     for(int j=0; j < N; j++)
00051       M(i,j) = rand()%100;
00052 
00053   
00054   std::cout << M << std::endl;
00055 
00056   pt3 = pt1 + pt2 + pt1;
00057 
00058   std::cout << pt3 << std::endl;
00059 
00060   return 0;
00061 }