Subversion Repositories gelsvn

Rev

Rev 630 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 630 Rev 636
1
/* ----------------------------------------------------------------------- *
1
/* ----------------------------------------------------------------------- *
2
 * This file is part of GEL, http://www.imm.dtu.dk/GEL
2
 * This file is part of GEL, http://www.imm.dtu.dk/GEL
3
 * Copyright (C) the authors and DTU Informatics
3
 * Copyright (C) the authors and DTU Informatics
4
 * For license and list of authors, see ../../doc/intro.pdf
4
 * For license and list of authors, see ../../doc/intro.pdf
5
 * ----------------------------------------------------------------------- */
5
 * ----------------------------------------------------------------------- */
6
 
6
 
7
/*!
7
/*!
8
\file LinAlgIO.h
8
\file LinAlgIO.h
9
\brief I/O functions for the LinAlg types
9
\brief I/O functions for the LinAlg types
10
*/
10
*/
11
#if !defined(LINALGIO_H__HAA_AGUST_2001)
11
#ifndef LINALGIO_H__HAA_AGUST_2001
12
#define LINALGIO_H__HAA_AGUST_2001
12
#define LINALGIO_H__HAA_AGUST_2001
13
 
13
 
14
#include "Matrix.h"
14
#include "Matrix.h"
15
#include <iostream>
15
#include <iostream>
16
 
16
 
17
namespace LinAlg
17
namespace LinAlg
18
{
18
{
19
 
19
 
20
/*!
20
/*!
21
\name I/O from MatLab
21
\name I/O from MatLab
22
Reads or writes the type to or from a m-file with a somwhat 
22
Reads or writes the type to or from a m-file with a somwhat 
23
strict format. MatLab can 'load' the matrix by running the m-file
23
strict format. MatLab can 'load' the matrix by running the m-file
24
in question, and write to the format via the 'LinAlg.m' function.
24
in question, and write to the format via the 'LinAlg.m' function.
25
 
25
 
26
Since MatLab uses double as the working percision, this is the only 
26
Since MatLab uses double as the working percision, this is the only 
27
value of T where this interface to MatLab works. For other types, 
27
value of T where this interface to MatLab works. For other types, 
28
this functionality is good for loading, saving and debuging.
28
this functionality is good for loading, saving and debuging.
29
 
29
 
30
\todo write the LinAlg.m fuction.
30
\todo write the LinAlg.m fuction.
31
\todo make a template overloading, of these functions.
31
\todo make a template overloading, of these functions.
32
\author Henrik Aanæs
32
\author Henrik Aanæs
33
\version Aug 2001
33
\version Aug 2001
34
*/
34
*/
35
//@{
35
//@{
36
void ToMatlab(const CMatrix& M,const std::string& VarName,const std::string& FileName="c:\\test.m",const bool append=true,const std::string& Comment = "");
36
void ToMatlab(const CMatrix& M,const std::string& VarName,const std::string& FileName="c:\\test.m",const bool append=true,const std::string& Comment = "");
37
void FromMatlab(CMatrix& M,const std::string& VarName,const std::string& FileName="c:\\test.m");
37
void FromMatlab(CMatrix& M,const std::string& VarName,const std::string& FileName="c:\\test.m");
38
//@}
38
//@}
39
 
39
 
40
 
40
 
41
 
41
 
42
 
42
 
43
 
43
 
44
 
44
 
45
}
45
}
46
#endif // !defined(LINALGIO_H__HAA_AGUST_2001)
46
#endif // !defined(LINALGIO_H__HAA_AGUST_2001)
47
 
47