Defines | Typedefs | Enumerations | Functions

ne_std.h File Reference

Standard library of common functions and structures used throughout NetEvo. More...

Go to the source code of this file.

Defines

#define NE_HUGE_NUMBER   99999999

Typedefs

typedef int ne_int_t
 Integer type.
typedef double ne_real_t
 Real type.

Enumerations

enum  ne_bool_t { FALSE = 0, TRUE = 1 }
 

Boolean type.

More...
enum  ne_err_code_t {
  NE_SUCCESS = 0, NE_FAILURE = 1, NE_MEM_ALLOC_ERROR = 2, NE_RANGE_ERROR = 3,
  NE_NULL_ERROR = 4
}
 

Return values for NetEvo functions.

More...

Functions

void ne_init (unsigned int rngSeed)
 Initialises common NetEvo components.
void ne_finalise (void)
 Frees common resources used by NetEvo.
void ne_error (const char *fmt,...)
 Reports an error.
void ne_log (const char *fmt,...)
 Logs information.

Detailed Description

Standard library of common functions and structures used throughout NetEvo.

These are mostly related to initialisation and finalisation of built-in components and error logging.

Author:
T.E. Gorochowski

Definition in file ne_std.h.


Typedef Documentation

typedef int ne_int_t

Integer type.

Definition at line 33 of file ne_std.h.

typedef double ne_real_t

Real type.

Definition at line 36 of file ne_std.h.


Enumeration Type Documentation

enum ne_bool_t

Boolean type.

Definition at line 39 of file ne_std.h.

Return values for NetEvo functions.

Enumerator:
NE_SUCCESS 

Function completed successfully.

NE_FAILURE 

Function did NOT complete successfully.

NE_MEM_ALLOC_ERROR 

Could not allocate memory.

NE_RANGE_ERROR 

Accessing outside range of data structure.

NE_NULL_ERROR 

Function given NULL input.

Definition at line 45 of file ne_std.h.


Function Documentation

void ne_error ( const char *  fmt,
  ... 
)

Reports an error.

Generates a formatted error string and outputs to the stderr stream. No newline character is required.

Definition at line 71 of file ne_std.c.

void ne_finalise ( void   ) 

Frees common resources used by NetEvo.

Should be called when finished with NetEvo to ensure any shared resources that allocated memory are freed.

Definition at line 57 of file ne_std.c.

void ne_init ( unsigned int  rngSeed  ) 

Initialises common NetEvo components.

Should be called before using any NetEvo functions or structures. It is responsible for initialising the random number generator and other shared resources.

Definition at line 40 of file ne_std.c.

void ne_log ( const char *  fmt,
  ... 
)

Logs information.

Generates a formatted output string and outputs to the stdout stream. No newline character is required.

Definition at line 83 of file ne_std.c.