RLP  1.5
main.h File Reference

Definition of functions used by main. More...

Go to the source code of this file.

Functions

double * loadMatrix (Prob prob, int varc, int condc, int eqc, int type)
 From the info collected by the parser, creates a matrix representing the problem to solve, according to the format required by function simplex. More...
 
void printRes (Array vars, double *tab, const char *varob, int varc, int condc, int type)
 Prints the result. More...
 
int opt (int argc, char **argv, char **in, char **out)
 Checks the options specified by the user. More...
 

Detailed Description

Definition of functions used by main.

Author
Rui Carlos Gonçalves
Version
1.5
Date
08/2015

Definition in file main.h.

Function Documentation

double* loadMatrix ( Prob  prob,
int  varc,
int  condc,
int  eqc,
int  type 
)

From the info collected by the parser, creates a matrix representing the problem to solve, according to the format required by function simplex.

Parameters
probinfo about the problem.
varcnumber of variables.
condcnumber of conditions.
eqcnumber of conditions with an equality operator.
typedetermines whether we have a maximization or minimization problem (max.: -1, min.: 1).
Returns
the matrix created.

Definition at line 30 of file main.c.

int opt ( int  argc,
char **  argv,
char **  in,
char **  out 
)

Checks the options specified by the user.

Parameters
argcnumber of options.
argvvalue of the options.
inaddress for the input option.
outaddress for the output option.
Returns
1 if the tables option was set; 0 otherwise.

Definition at line 155 of file main.c.

void printRes ( Array  vars,
double *  tab,
const char *  varob,
int  varc,
int  condc,
int  type 
)

Prints the result.

Parameters
varsname of the variables of each position of the table.
tabtable resulting from applying the Simplex algorithm.
varobvariable to maximize/minimize.
varcnumber of variables.
condcnumber of conditions
typedetermines whether we have a maximization or minimization problem (max.: -1, min.: 1).

Definition at line 103 of file main.c.

RLP © 2006, 2009, 2015   Rui Carlos Gonçalves