The CyMeAlg Software (Release 0.01)
Files | Functions | Variables
Test

Files

file  cymealgtest.cpp
 This is a simple program for testing selected algorithms for the computation of the minimum cycle mean of a directed graph.
 

Functions

void cymealgTest (const char *filename, bool runKarp, bool runKarpRnd, bool runMem, bool runMemRnd, bool runOld, bool runOldRnd)
 
int main (int argc, char *argv [])
 The main procedure of the program. More...
 

Variables

const char * title
 The title of the program and licensing information. More...
 
const char * helpinfo
 Brief help information on the program's usage. More...
 

Detailed Description

Function Documentation

◆ cymealgTest()

void cymealgTest ( const char *  filename,
bool  runKarp,
bool  runKarpRnd,
bool  runMem,
bool  runMemRnd,
bool  runOld,
bool  runOldRnd 
)

Definition at line 88 of file cymealgtest.cpp.

References cymealg::minMeanCycleWeight(), cymealg::minMeanCycleWeightMem(), and cymealg::read().

Referenced by main().

◆ main()

int main ( int  argc,
char *  argv[] 
)

The main procedure of the program.

Returns: 0 = Ok, -1 = Error, 1 = Help displayed, 2 = Wrong arguments.

Definition at line 217 of file cymealgtest.cpp.

References cymealgTest(), helpinfo, and title.

Variable Documentation

◆ helpinfo

const char* helpinfo
Initial value:
= "\
This is a simple program for testing selected algorithms\n\
for the computation of the minimum cycle mean of a directed graph.\n\
It reads the definition of a weighted graph from a text input file\n\
and measures the time of the computation of the minimum cycle mean\n\
using different algorithms. The algorithms must be selected with the\n\
additional switches (see below); assumes '-m' if none provided.\n\
Call with:\n\
filename.txt - the name of a file that contains the definition of the graph.\n\
Switches and additional arguments:\n\
-k - run the classical Karp's algorithm,\n\
-kr - run the Karp's algorithm with correct rounding,\n\
-m - run the memory efficient algorithm,\n\
-mr - run the memory efficient algorithm with correct rounding,\n\
--log filename - save the output to a file (without progress indicators),\n\
--quiet - suppress data output to the screen (whcih can be still logged),\n\
--help - display this brief help information only and exit.\n\
For more information please consult the accompanying documentation\n\
or ask the program's author at http://www.PawelPilarczyk.com/."

Brief help information on the program's usage.

Definition at line 60 of file cymealgtest.cpp.

Referenced by main().

◆ title

const char* title
Initial value:
= "\
CyMeAlg Test 1.0. January 26, 2020. (C) 1997-2020 by Pawel Pilarczyk.\n\
This is free software. No warranty. Consult 'license.txt' for details."

The title of the program and licensing information.

Definition at line 55 of file cymealgtest.cpp.

Referenced by main().