EMAN2
Functions | Variables
emutil.cpp File Reference
#include "all_imageio.h"
#include "portable_fileio.h"
#include "emcache.h"
#include "emdata.h"
#include "ctf.h"
#include "emassert.h"
#include "exception.h"
#include "hdf_filecache.h"
#include <boost/shared_ptr.hpp>
#include <sys/param.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

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

Definition at line 1262 of file emutil.cpp.

References Assert.

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

{
        Assert(imgscore1 != 0);
        Assert(imgscore2 != 0);

        float c = ((ImageScore *)imgscore1)->score - ((ImageScore *)imgscore2)->score;

        if (c<0) {
                return 1;
        }
        else if (c>0) {
                return -1;
        }

        return 0;
}

Variable Documentation

const int ATTR_NAME_LEN = 128 [static]

Definition at line 61 of file emutil.cpp.