#include <GLUtils.h>
Public Member Functions | |
GLUtils () | |
virtual | ~GLUtils () |
Static Public Member Functions | |
static void | assertEvaluated (const GLBaseOrganism *organism, const string &message="") |
template<class sourceOrg , class targetOrg > | |
static void | makeHardCopy (const vector< sourceOrg * > &source, vector< targetOrg * > &target) |
static void | printVectorOfOrganisms (ostream &out, const TGLVectorOfOrganisms &organisms) |
static void | printVectorOfOrganisms (ostream &out, const TGLVectorOfOrganismsConst &organisms) |
Definition at line 11 of file GLUtils.h.
virtual GLUtils::~GLUtils | ( | ) | [inline, virtual] |
void GLUtils::assertEvaluated | ( | const GLBaseOrganism * | organism, | |
const string & | message = "" | |||
) | [static] |
organisms is not evaluated throws GLLogicError exception.
organism | pointer to be asserted. | |
message | useful information, e.g. name of the pointer and/or calling function. |
Definition at line 17 of file GLUtils.cpp.
static void GLUtils::makeHardCopy | ( | const vector< sourceOrg * > & | source, | |
vector< targetOrg * > & | target | |||
) | [inline, static] |
Makes the hard copy of organisms in the vector (templated to allow for processing constant and not-constant pointers to the organisms).
source | vector of organisms to copy from. | |
target | vector of organisms to copy to. All the previous content will be deleted and memory for organisms previously stored there will be freed. |
void GLUtils::printVectorOfOrganisms | ( | ostream & | out, | |
const TGLVectorOfOrganismsConst & | organisms | |||
) | [static] |
Prints the vector of organisms pointers with their fitness value, if present.
out | output stream. | |
organisms |
Definition at line 64 of file GLUtils.cpp.
void GLUtils::printVectorOfOrganisms | ( | ostream & | out, | |
const TGLVectorOfOrganisms & | organisms | |||
) | [static] |
Prints the vector of organisms pointers with their fitness value, if present.
out | output stream. | |
organisms |
Definition at line 38 of file GLUtils.cpp.