Xmipp  v3.23.11-Nereus
Functions
grids.cpp File Reference
#include "grids.h"
#include "numerical_tools.h"
#include <stdio.h>
#include <string.h>
Include dependency graph for grids.cpp:

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &o, const SimpleGrid &grid)
 
SimpleGrid Create_CC_grid (double relative_size, const Matrix1D< double > &corner1, const Matrix1D< double > &corner2, const Matrix1D< double > &origin)
 
Grid Create_CC_grid (double relative_size, const Matrix1D< double > &corner1, const Matrix1D< double > &corner2)
 
Grid Create_CC_grid (double relative_size, int Zdim, int Ydim, int Xdim)
 
Grid Create_BCC_grid (double relative_size, const Matrix1D< double > &corner1, const Matrix1D< double > &corner2)
 
Grid Create_FCC_grid (double relative_size, const Matrix1D< double > &corner1, const Matrix1D< double > &corner2)
 
SimpleGrid Create_grid_within_sphere (double relative_size, const Matrix1D< double > &origin, const Matrix1D< double > &X, const Matrix1D< double > &Y, const Matrix1D< double > &Z, double R2)
 
Grid Create_CC_grid (double relative_size, double R)
 
Grid Create_BCC_grid (double relative_size, double R)
 
Grid Create_FCC_grid (double relative_size, double R)
 

Function Documentation

◆ operator<<()

std::ostream& operator<< ( std::ostream &  o,
const SimpleGrid grid 
)

Show a Simple grid. Shows all information about the simple grid. \Ex: std::cout << sg;

Definition at line 47 of file grids.cpp.

48 {
49  o << " Simple Grid -----" << std::endl;
50  Matrix1D<double> aux;
51  (grid.basis).getCol(0,aux); o << " Vector 1: " << aux.transpose() << std::endl;
52  (grid.basis).getCol(1,aux); o << " Vector 2: " << aux.transpose() << std::endl;
53  (grid.basis).getCol(2,aux); o << " Vector 3: " << aux.transpose() << std::endl;
54  o << " Relative size: " << grid.relative_size << std::endl;
55  o << " Interest radius: " << grid.R2 << std::endl;
56  o << " Origin (univ.coords) " << grid.origin.transpose() << std::endl;
57  o << " Highest (grid. coord) " << grid.highest.transpose() << std::endl;
58  o << " Lowest (grid. coord) " << grid.lowest.transpose() << std::endl;
59  return o;
60 }
Matrix1D< double > highest
Definition: grids.h:161
Matrix1D< double > lowest
Definition: grids.h:158
Matrix2D< double > basis
Definition: grids.h:148
Matrix1D< T > transpose() const
Definition: matrix1d.cpp:644
double R2
Definition: grids.h:170
double relative_size
Measuring unit in the grid coordinate system.
Definition: grids.h:163
Matrix1D< double > origin
Origin of the grid in the Universal coordinate system.
Definition: grids.h:165