#include <sys/resource.h>
#include <cassert>
#include <iomanip>
#include <iostream>
#include <fstream>
#include <vector>
#include <map>
#include <list>
#include <set>
Include dependency graph for tools.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Classes | |
class | Pointer< Type > |
A Smartpointer with reference counter. More... | |
class | Timer |
A class to stop processor time. More... | |
Defines | |
#define | rtol 1e-10 |
#define | MIN(a, b) ((a) <= (b) ? (a) : (b)) |
#define | MAX(a, b) ((a) >= (b) ? (a) : (b)) |
#define | INFINITY 1e99 |
#define | INF 65535 |
#define | out_out if (out_out_p) (*out_out_p) |
#define | out_log if (out_log_p) (*out_log_p) |
#define | out_err if (out_err_p) (*out_err_p) |
Functions | |
void | print_all_Pointer (ostream &out) |
Prints all registered pointers and the number of Pointers to each of them. | |
int | random (int lb, int ub) |
Gives a random integer. | |
double | random (double lb, double ub) |
Gives a random double. | |
unsigned int | get_mem () |
int | start_process (const char *name, char *const *const args, int timelimit=0, const char *envvarname=NULL, const char *envvarvalue=NULL) |
Variables | |
map< const void *, int > | refcount |
The (global) counters for the objects, we point to and want to delete. | |
Pointer< ostream > | out_out_p |
Pointer< ostream > | out_log_p |
Pointer< ostream > | out_err_p |
#define rtol 1e-10 |
Definition at line 29 of file tools.h.
Referenced by SparseMatrix::AddElement(), SparseMatrix::AddToElement(), SparseVector< double >::operator=(), SparseVector< double >::operator==(), SparseVector< double >::operator>=(), SparseVector< double >::set(), SparseVector< double >::SetElement(), and SparseVector< double >::SparseVector().
#define MIN | ( | a, | |||
b | ) | ((a) <= (b) ? (a) : (b)) |
Definition at line 223 of file tools.h.
Referenced by amplCon::eval(), amplObj::eval(), amplCon::grad(), and amplObj::grad().
Definition at line 226 of file tools.h.
Referenced by ampl::ampl(), MinlpPenaltyFunc::get_curvature(), Monom::get_curvature(), DualFunc::get_curvature(), ParamTree::ParamTree(), MinlpPenaltyFunc::set_curvature(), Monom::set_curvature(), DualFunc::set_curvature(), and Func::valgrad().
void print_all_Pointer | ( | ostream & | out | ) |
Prints all registered pointers and the number of Pointers to each of them.
out | The ostream to print to. |
int random | ( | int | lb, | |
int | ub | |||
) |
Gives a random integer.
lb | The lower bound. | |
ub | The upper bound. |
Referenced by UserVector< double >::set_random().
double random | ( | double | lb, | |
double | ub | |||
) |
Gives a random double.
lb | The lower bound. | |
ub | The upper bound. |
unsigned int get_mem | ( | ) |
int start_process | ( | const char * | name, | |
char *const *const | args, | |||
int | timelimit = 0 , |
|||
const char * | envvarname = NULL , |
|||
const char * | envvarvalue = NULL | |||
) |
map<const void*, int> refcount |
The (global) counters for the objects, we point to and want to delete.
Referenced by Pointer< LevelCutHandler >::count(), Pointer< LevelCutHandler >::dec_count(), and Pointer< LevelCutHandler >::inc_count().