#include <ios>
#include <iostream>
#include <complex>
#include <cstring>
#include "vnl_matlab_read.h"
#include <vnl/vnl_c_vector.h>
#include <vnl/vnl_vector.h>
#include <vnl/vnl_matrix.h>
Go to the source code of this file.
|
| template<class T > |
| void | vcl_destroy (T *p) |
| |
| template<class U , class V > |
| void | vcl_construct (U *p, V const &value) |
| |
| void | vnl_read_bytes (std::istream &s, void *p, unsigned bytes) |
| |
| template<> |
| void | vnl_matlab_read_data (std::istream &s, float *p, unsigned n) |
| |
| template<> |
| void | vnl_matlab_read_data (std::istream &s, double *p, unsigned n) |
| |
| | implement_read_complex_data (float) implement_read_complex_data(double) vnl_matlab_readhdr |
| |
| | fsm_define_methods (float) |
| |
| | fsm_define_methods (double) |
| |
| | fsm_define_methods (std::complex< float >) |
| |
| | fsm_define_methods (std::complex< double >) |
| |
| template<class T > |
| bool | vnl_matlab_read_or_die (std::istream &s, vnl_vector< T > &v, char const *name) |
| | Attempt to read vector or matrix. More...
|
| |
| template<class T > |
| bool | vnl_matlab_read_or_die (std::istream &s, vnl_matrix< T > &M, char const *name) |
| |
| | inst (double) |
| |
| | inst (float) |
| |
- Author
- fsm
Definition in file vnl_matlab_read.cxx.
◆ fsm_define_methods
| #define fsm_define_methods |
( |
|
T | ) |
|
◆ implement_read_complex_data
| #define implement_read_complex_data |
( |
|
T | ) |
|
Value:template <> \
for (unsigned i=0; i<n; ++i) \
ptr[i] = std::complex<T >(re[i], im[i]);
\}
static void deallocate(T **, const std::size_t n_when_allocated)
void vnl_read_bytes(std::istream &s, void *p, unsigned bytes)
static T * allocate_T(const std::size_t n)
void vnl_matlab_read_data(std::istream &s, float *p, unsigned n)
Definition at line 37 of file vnl_matlab_read.cxx.
◆ inst
Value:bool vnl_matlab_read_or_die(std::istream &s, vnl_vector< T > &v, char const *name)
Attempt to read vector or matrix.
An ordinary mathematical matrix.
Mathematical vector class, templated by type of element.
Definition at line 282 of file vnl_matlab_read.cxx.
◆ fsm_define_methods() [1/4]
| fsm_define_methods |
( |
float |
| ) |
|
◆ fsm_define_methods() [2/4]
| fsm_define_methods |
( |
double |
| ) |
|
◆ fsm_define_methods() [3/4]
| fsm_define_methods |
( |
std::complex< float > |
| ) |
|
◆ fsm_define_methods() [4/4]
| fsm_define_methods |
( |
std::complex< double > |
| ) |
|
◆ implement_read_complex_data()
| implement_read_complex_data |
( |
float |
| ) |
|
◆ inst() [1/2]
◆ inst() [2/2]
◆ vcl_construct()
template<class U , class V >
| void vcl_construct |
( |
U * |
p, |
|
|
V const & |
value |
|
) |
| |
|
inline |
◆ vcl_destroy()
template<class T >
| void vcl_destroy |
( |
T * |
p | ) |
|
|
inline |
◆ vnl_matlab_read_data() [1/2]
template<>
| void vnl_matlab_read_data |
( |
std::istream & |
s, |
|
|
float * |
p, |
|
|
unsigned |
n |
|
) |
| |
◆ vnl_matlab_read_data() [2/2]
template<>
| void vnl_matlab_read_data |
( |
std::istream & |
s, |
|
|
double * |
p, |
|
|
unsigned |
n |
|
) |
| |
◆ vnl_matlab_read_or_die() [1/2]
template<class T >
| bool vnl_matlab_read_or_die |
( |
std::istream & |
, |
|
|
vnl_vector< T > & |
, |
|
|
char const * |
name = nullptr |
|
) |
| |
Attempt to read vector or matrix.
If the MATLAB header cannot be read, return false. Else, if a name is given, and it doesn't match what's in the file, abort(). If the data in the file cannot reasonably be read into the destination, abort().
The vector/matrix will be resized if necessary.
Definition at line 231 of file vnl_matlab_read.cxx.
◆ vnl_matlab_read_or_die() [2/2]
template<class T >
| bool vnl_matlab_read_or_die |
( |
std::istream & |
s, |
|
|
vnl_matrix< T > & |
M, |
|
|
char const * |
name |
|
) |
| |
◆ vnl_read_bytes()
| void vnl_read_bytes |
( |
std::istream & |
s, |
|
|
void * |
p, |
|
|
unsigned |
bytes |
|
) |
| |