EMAN2
Namespaces | Macros | Functions
analyzer.cpp File Reference
#include <ctime>
#include <memory>
#include "emdata.h"
#include "analyzer.h"
#include "sparx/analyzer_sparx.h"
#include "util.h"
#include "cmp.h"
#include "sparx/lapackblas.h"
#include "sparx/varimax.h"
Include dependency graph for analyzer.cpp:

Go to the source code of this file.

Namespaces

namespace  EMAN
 E2Exception class.
 

Macros

#define covmat(i, j)   covmat[ ((j)-1)*nx + (i)-1 ]
 
#define imgdata(i)   imgdata[ (i)-1 ]
 
#define eigvec(i, j)   eigvec[(j)*ncov + (i)]
 
#define qmat(i, j)   qmat[((j)-1)*kstep + (i) -1]
 
#define diag(i)   diag[(i)-1]
 
#define rdata(i)   rdata[(i)-1]
 
#define eigvec(i, j)   eigvec[((j)-1)*ncov + (i)-1]
 
#define eigval(i)   eigval[(i)-1]
 
#define TOL   1e-7
 
#define V(i, j)   V[((j)-1)*imgsize + (i) - 1]
 
#define v0(i)   v0[(i)-1]
 
#define Av(i)   Av[(i)-1]
 
#define subdiag(i)   subdiag[(i)-1]
 
#define diag(i)   diag[(i)-1]
 
#define hvec(i)   hvec[(i)-1]
 
#define eigvec(i, j)   eigvec[(j)*ncov + (i)]
 

Functions

float qsqcmp (EMData *a, EMData *b)
 

Macro Definition Documentation

◆ Av

#define Av (   i)    Av[(i)-1]

Definition at line 699 of file analyzer.cpp.

◆ covmat

#define covmat (   i,
 
)    covmat[ ((j)-1)*nx + (i)-1 ]

Definition at line 452 of file analyzer.cpp.

◆ diag [1/2]

#define diag (   i)    diag[(i)-1]

Definition at line 701 of file analyzer.cpp.

◆ diag [2/2]

#define diag (   i)    diag[(i)-1]

Definition at line 701 of file analyzer.cpp.

◆ eigval

#define eigval (   i)    eigval[(i)-1]

Definition at line 594 of file analyzer.cpp.

◆ eigvec [1/3]

#define eigvec (   i,
 
)    eigvec[(j)*ncov + (i)]

Definition at line 958 of file analyzer.cpp.

◆ eigvec [2/3]

#define eigvec (   i,
 
)    eigvec[((j)-1)*ncov + (i)-1]

Definition at line 958 of file analyzer.cpp.

◆ eigvec [3/3]

#define eigvec (   i,
 
)    eigvec[(j)*ncov + (i)]

Definition at line 958 of file analyzer.cpp.

◆ hvec

#define hvec (   i)    hvec[(i)-1]

Definition at line 702 of file analyzer.cpp.

◆ imgdata

#define imgdata (   i)    imgdata[ (i)-1 ]

Definition at line 453 of file analyzer.cpp.

◆ qmat

#define qmat (   i,
 
)    qmat[((j)-1)*kstep + (i) -1]

Definition at line 590 of file analyzer.cpp.

◆ rdata

#define rdata (   i)    rdata[(i)-1]

Definition at line 592 of file analyzer.cpp.

◆ subdiag

#define subdiag (   i)    subdiag[(i)-1]

Definition at line 700 of file analyzer.cpp.

◆ TOL

#define TOL   1e-7

Definition at line 696 of file analyzer.cpp.

◆ V

#define V (   i,
 
)    V[((j)-1)*imgsize + (i) - 1]

Definition at line 697 of file analyzer.cpp.

◆ v0

#define v0 (   i)    v0[(i)-1]

Definition at line 698 of file analyzer.cpp.

Function Documentation

◆ qsqcmp()

float qsqcmp ( EMData a,
EMData b 
)

Definition at line 388 of file analyzer.cpp.

388 {
389 size_t n = a->get_size();
390 float *d1=a->get_data();
391 float *d2=b->get_data();
392
393 double ret=0.0;
394 for (size_t i=0; i<n; i++) ret+=pow(d1[i]-d2[i],2);
395
396 return (float)ret;
397}

Referenced by EMAN::KMeansAnalyzer::reclassify(), and EMAN::KMeansAnalyzer::resort().