Xmipp
v3.23.11-Nereus
|
#include <iostream>
#include <string>
#include <vector>
#include "xmipp_error.h"
#include "xmipp_macros.h"
Go to the source code of this file.
Classes | |
class | Matrix2D< T > |
class | Matrix1D< T > |
Macros | |
Vectors speed up macros | |
This macros are defined to allow high speed in critical parts of your program. They shouldn't be used systematically as usually there is no checking on the correctness of the operation you are performing. Speed comes from three facts: first, they are macros and no function call is performed (although most of the critical functions are inline functions), there is no checking on the correctness of the operation (it could be wrong and you are not warned of it), and destination vectors are not returned saving time in the copy constructor and in the creation/destruction of temporary vectors. | |
#define | MATRIX1D_ARRAY(v) ((v).vdata) |
#define | FOR_ALL_ELEMENTS_IN_MATRIX1D(v) for (size_t i=0; i<v.vdim; i++) |
#define | VEC_XSIZE(m) ((m).vdim) |
#define | XX(v) (v).vdata[0] |
#define | YY(v) (v).vdata[1] |
#define | ZZ(v) (v).vdata[2] |
#define | VECTOR_R2(v, x, y) |
#define | VECTOR_R3(v, x, y, z) |
#define | V2_PLUS_V2(a, b, c) |
#define | V2_MINUS_V2(a, b, c) |
#define | V2_PLUS_CT(a, b, k) |
#define | V2_BY_CT(a, b, k) |
#define | V3_PLUS_V3(a, b, c) |
#define | V3_MINUS_V3(a, b, c) |
#define | V3_PLUS_CT(a, b, c) |
#define | V3_BY_CT(a, b, c) |
#define | VEC_ELEM(v, i) ((v).vdata[(i)]) |
#define | dMi(v, i) ((v).vdata[(i)]) |
#define | VEC_SWAP(v, i, j, aux) {aux = dMi(v, i); dMi(v, i) = dMi(v, j); dMi(v, j) = aux; } |
Typedefs | |
typedef Matrix1D< double > | DVector |
typedef Matrix1D< int > | IVector |
Functions | |
Vector Related functions | |
These functions are not methods of Matrix1D | |
Matrix1D< double > | vectorR2 (double x, double y) |
Matrix1D< double > | vectorR3 (double x, double y, double z) |
Matrix1D< int > | vectorR3 (int x, int y, int z) |
template<typename T > | |
T | dotProduct (const Matrix1D< T > &v1, const Matrix1D< T > &v2) |
template<typename T > | |
Matrix1D< T > | vectorProduct (const Matrix1D< T > &v1, const Matrix1D< T > &v2) |
template<typename T > | |
void | vectorProduct (const Matrix1D< T > &v1, const Matrix1D< T > &v2, Matrix1D< T > &result) |
template<typename T > | |
void | sortTwoVectors (Matrix1D< T > &v1, Matrix1D< T > &v2) |
template<typename T1 , typename T2 > | |
void | typeCast (const Matrix1D< T1 > &v1, Matrix1D< T2 > &v2) |
template<typename T1 > | |
void | typeCast (const Matrix1D< T1 > &v1, Matrix1D< T1 > &v2) |