libatomprobe
Library for Atom Probe Tomography (APT) computation
Namespaces | Enumerations | Functions
misc.h File Reference
#include "gsl/gsl_matrix.h"
#include <numeric>
#include <vector>
#include <limits>
#include <cmath>
#include "atomprobe/primitives/point3D.h"
Include dependency graph for misc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 AtomProbe
 

Enumerations

enum  AtomProbe::PointDir { AtomProbe::POINTDIR_TOGETHER =0, AtomProbe::POINTDIR_IN_COMMON, AtomProbe::POINTDIR_APART }
 

Functions

void AtomProbe::gsl_matrix_mult (const gsl_matrix *A, const gsl_matrix *B, gsl_matrix *&res, bool alloc=false)
 
unsigned int AtomProbe::estimateRank (const gsl_matrix *m, float tolerance=sqrt(std::numeric_limits< float >::epsilon()))
 Estimate the rank of the given matrix. More...
 
bool AtomProbe::solveLeastSquares (gsl_matrix *m, gsl_vector *b, gsl_vector *&x)
 Use an SVD based least-squares solver to solve Mx=b (for x). More...
 
template<class T >
AtomProbe::weightedMean (const std::vector< T > &values, const std::vector< T > &weight)
 
template<typename T >
void AtomProbe::meanAndStdev (const std::vector< T > &f, float &meanVal, float &stdevVal, bool normalCorrection=true)
 
unsigned int AtomProbe::vectorPointDir (const Point3D &pA, const Point3D &pB, const Point3D &vC, const Point3D &vD)
 Check which way vectors attached to two 3D points "point",. More...
 
float AtomProbe::distanceToSegment (const Point3D &fA, const Point3D &fB, const Point3D &p)
 
float AtomProbe::signedDistanceToFacet (const Point3D &fA, const Point3D &fB, const Point3D &fC, const Point3D &normal, const Point3D &p)
 Find the distance between a point, and a triangular facet – may be positive or negative. More...
 
float AtomProbe::distanceToFacet (const Point3D &fA, const Point3D &fB, const Point3D &fC, const Point3D &normal, const Point3D &p)
 
float AtomProbe::dotProduct (float a1, float a2, float a3, float b1, float b2, float b3)
 Inline func for calculating a(dot)b. More...
 
double AtomProbe::det3by3 (const double *ptArray)
 
double AtomProbe::pyramidVol (const Point3D *planarPts, const Point3D &apex)
 
bool AtomProbe::triIsDegenerate (const Point3D &fA, const Point3D &fB, const Point3D &fC)