#include <matrix_source.h>
Public Methods | |
| matrix matrix void | copy (const matrix#typeext#&other) |
| template<class oclass> void | copy (const oclass &other) |
| template<class oclass> matrix matrix ~matrix size_t | get_rows () const |
| size_t | get_cols () const |
| size_t | size1 () const |
| size_t | size2 () const |
| void | dimensions (size_t *num_rows, size_t *num_cols) const |
| const void | set_element (size_t row, size_t col, const#type#&v) |
| void | set_elements (const#type#&new_value) |
| void | set_all (const#type#&new_value) |
| void | set_zero () |
| void | set_dimensions (size_t new_rows, size_t new_cols) |
| void | load (const char *filename) |
| void | save (const char *filename) const |
| int | fwrite (FILE *stream) const |
| int | fread (FILE *stream) |
| void | load_binary (const char *filename) |
| void | save_binary (const char *filename) const |
| bool | operator== (const matrix#typeext#&other) const |
| bool | operator!= (const matrix#typeext#&other) const |
| double | LU_lndet () const |
| vector const vector vector const vector matrix matrix matrix matrix double | trace () const |
| int | cholesky_decomp (matrix#typeext#&a) const |
| matrix bool | is_square () const |
| void | set_diagonal (#type#f) |
| void | identity (size_t k) |
| double | norm (double n) const |
| template<class oclass> void | copy (const oclass &other) |
| void | copy (const vector#typeext#&other) |
| size_t | size () const |
| const const void | set_all (#type#x) |
| void | set_zero () |
| int | set_basis (size_t i) |
| int | fwrite (FILE *stream) const |
| int | fread (FILE *stream) |
| int | fprintf (FILE *stream, const char *format) const |
| int | fscanf (FILE *stream) |
| vector const vector vector int | swap_elements (size_t i, size_t j) |
| int | reverse () |
| int | operator+= (const vector#typeext#&other) |
| int | operator-= (const vector#typeext#&other) |
| int | operator *= (const vector#typeext#&other) |
| int | operator/= (const vector#typeext#&other) |
| int | operator *= (#type#x) |
| int | operator+= (#type#x) |
| int | operator/= (#type#x) |
| bool | operator== (const vector#typeext#&other) const |
| bool | operator!= (const vector#typeext#&other) const |
| double | norm2 () const |
Static Public Methods | |
| gsl_vector const gsl_vector vector void | set (size_t i,#type#x) |
Protected Methods | |
| gsl_vector void | free () |
| void | alloc (size_t n) |
| void | calloc (size_t n) |
Friends | |
| class | matrix_float |
| class | matrix_int |
| ostream& | operator<< (ostream &os, const matrix#typeext#&m) |
|
|
returns logarithm of the determinant of the matrix. |
|
|
Definition at line 37 of file vector_source.h. 00037 {gsldata=gsl_vector#typeext#_alloc(n);}
|
|
|
Definition at line 38 of file vector_source.h. 00038 {gsldata=gsl_vector#typeext#_calloc(n);}
|
|
|
calculates cholesky decomposition of the matrix, returning success if matrix is positive definite. |
|
|
|
|
||||
|
Definition at line 59 of file vector_source.h. 00060 {
00061 resize(other.size());
00062 for (size_t i=0;i<size();i++)
00063 {
00064 gsl_vector#typeext#_set(gsldata, i, (#type#)other[i]);
00065 }
00066 }
|
|
||||
|
Definition at line 63 of file matrix_source.h. 00064 {
00065 set_dimensions( other.get_rows(), other.get_cols() );
00066 for ( size_t i = 0; i < get_rows(); i++ )
00067 {
00068 for ( size_t j = 0; j < get_cols(); j++ )
00069 {
00070 gsl_matrix#typeext#_set( m, i, j, (#type#)other(i,j));
00071 }
00072 }
00073 }
|
|
|
Definition at line 57 of file matrix_source.h. 00058 {
00059 set_dimensions(other.size1(),other.size2());
00060 gsl_matrix#typeext#_memcpy( m, other.m );
00061 }
|
|
|
|
|
|
Definition at line 122 of file vector_source.h. 00122 {return gsl_vector#typeext#_fprintf (stream, gsldata,format) ;}
|
|
|
Definition at line 119 of file vector_source.h. 00119 {return gsl_vector#typeext#_fread (stream, gsldata);}
|
|
|
Definition at line 117 of file matrix_source.h. 00117 {return gsl_matrix#typeext#_fread (stream, m);}
|
|
|
Definition at line 36 of file vector_source.h. 00036 {if(gsldata) gsl_vector#typeext#_free(gsldata);gsldata=NULL;}
|
|
|
Definition at line 125 of file vector_source.h. 00125 {return gsl_vector#typeext#_fscanf (stream, gsldata); }
|
|
|
Definition at line 116 of file vector_source.h. 00116 {return gsl_vector#typeext#_fwrite (stream, gsldata);}
|
|
|
Definition at line 114 of file matrix_source.h. 00114 {return gsl_matrix#typeext#_fwrite (stream, m);}
|
|
|
Definition at line 86 of file matrix_source.h. Referenced by copy().
00086 {return m->size2;}
|
|
||||
|
Definition at line 84 of file matrix_source.h. Referenced by copy().
00084 {return m->size1;}
|
|
|
|
returns 1 if matrix is square, 0 otherwise. |
|
|
|
|
|
|
|
|
returns sum of nth power of all elements. |
|
|
returns sum of all the vector elements. |
|
|
Definition at line 281 of file vector_source.h. 00281 {return gsl_vector#typeext#_scale (gsldata, x);}
|
|
|
Definition at line 275 of file vector_source.h. 00275 {return gsl_vector#typeext#_mul (gsldata, other.gsldata);}
|
|
|
Definition at line 292 of file vector_source.h. 00292 { return (!((*this)==other));}
|
|
|
Definition at line 125 of file matrix_source.h. 00125 {return !((*this)==other);}
|
|
|
Definition at line 285 of file vector_source.h. 00285 {return gsl_vector#typeext#_add_constant (gsldata,x);}
|
|
|
Definition at line 268 of file vector_source.h. 00268 {return gsl_vector#typeext#_add (gsldata, other.gsldata);}
|
|
|
Definition at line 271 of file vector_source.h. 00271 {return gsl_vector#typeext#_sub (gsldata, other.gsldata);}
|
|
|
Definition at line 288 of file vector_source.h. 00288 {return gsl_vector#typeext#_scale (gsldata, 1/x);}
|
|
|
Definition at line 278 of file vector_source.h. 00278 {return gsl_vector#typeext#_div (gsldata, other.gsldata);}
|
|
|
|
|
|
|
|
|
Definition at line 261 of file vector_source.h. 00261 {return gsl_vector#typeext#_reverse (gsldata) ;}
|
|
|
|
|
|
|
|
|
for interfacing with gsl c Definition at line 89 of file vector_source.h. 00089 {gsl_vector#typeext#_set(gsldata,i,x);}
|
|
|
Definition at line 103 of file vector_source.h. 00103 {gsl_vector#typeext#_set_all (gsldata,x);}
|
|
|
Definition at line 103 of file matrix_source.h. 00103 {gsl_matrix#typeext#_set_all ( m, new_value );}
|
|
|
Definition at line 108 of file vector_source.h. 00108 {return gsl_vector#typeext#_set_basis (gsldata,i);}
|
|
|
set diagonal elements of a square matrix to f. |
|
|
Referenced by copy().
|
|
|
Definition at line 100 of file matrix_source.h. 00100 { gsl_matrix#typeext#_set( m, row, col, v );}
|
|
|
|
|
|
Definition at line 105 of file vector_source.h. 00105 {gsl_vector#typeext#_set_zero (gsldata);}
|
|
|
Definition at line 104 of file matrix_source.h. 00104 {gsl_matrix#typeext#_set_zero( m );}
|
|
|
Definition at line 70 of file vector_source.h. Referenced by copy().
00070 {if (!gsldata) {cout << "vector#typeext#::size vector not initialized" << endl; exit(-1);}return gsldata->size;}
|
|
|
Definition at line 88 of file matrix_source.h. 00088 {return m->size1;}
|
|
|
Definition at line 90 of file matrix_source.h. 00090 {return m->size2;}
|
|
|
Definition at line 257 of file vector_source.h. 00257 {return gsl_vector#typeext#_swap_elements (gsldata, i,j);}
|
|
|
returns trace (diagonal sum) of a square matrix. |
|
|
Definition at line 48 of file matrix_source.h. |
|
|
Definition at line 49 of file matrix_source.h. |
|
|
|
1.2.8.1 written by Dimitri van Heesch,
© 1997-2001