EMAN2
Functions | Variables
emutil.cpp File Reference
#include <sys/param.h>
#include <utility>
#include "io/all_imageio.h"
#include "portable_fileio.h"
#include "emcache.h"
#include "emdata.h"
#include "ctf.h"
#include "emassert.h"
#include "exception.h"
Include dependency graph for emutil.cpp:

Go to the source code of this file.

Functions

static int imgscore_cmp (const void *imgscore1, const void *imgscore2)
 

Variables

static const int ATTR_NAME_LEN = 128
 

Function Documentation

◆ imgscore_cmp()

static int imgscore_cmp ( const void *  imgscore1,
const void *  imgscore2 
)
static

Definition at line 1305 of file emutil.cpp.

1306{
1307 Assert(imgscore1 != 0);
1308 Assert(imgscore2 != 0);
1309
1310 float c = ((ImageScore *)imgscore1)->score - ((ImageScore *)imgscore2)->score;
1311
1312 if (c<0) {
1313 return 1;
1314 }
1315 else if (c>0) {
1316 return -1;
1317 }
1318
1319 return 0;
1320}
#define Assert(s)
Define Assert() function that is effective only when -DDEBUG is used.
Definition: emassert.h:42

References Assert.

Referenced by EMAN::ImageSort::sort().

Variable Documentation

◆ ATTR_NAME_LEN

const int ATTR_NAME_LEN = 128
static

Definition at line 56 of file emutil.cpp.