Scippy

SCIP

Solving Constraint Integer Programs

polyscip::global Namespace Reference

Namespaces

 impl_own_stl
 

Functions

template<typename T , typename ... Args>
std::unique_ptr< T > make_unique (Args &&... args)
 
template<typename Container >
void print (const Container &container, const std::string &prefix="", const std::string &suffix="", std::ostream &os=std::cout, bool negate=false, int prec=6)
 
template<typename Target , typename Source >
Target narrow_cast (Source v)
 

Function Documentation

◆ make_unique()

template<typename T , typename ... Args>
std::unique_ptr<T> polyscip::global::make_unique ( Args &&...  args)

std::make_unique did not get into the C++11 standard, so we provide it ourselves until installed compiler can be expected to fully support C++14

Template Parameters
T
Args
Parameters
args
Returns

Definition at line 80 of file global_functions.h.

◆ print()

template<typename Container >
void polyscip::global::print ( const Container &  container,
const std::string &  prefix = "",
const std::string &  suffix = "",
std::ostream &  os = std::cout,
bool  negate = false,
int  prec = 6 
)

Print function

Parameters
containerContainer to be printed
prefixString printed before Container
suffixString printed after Container
osOutput stream to write to
negateIndicates whether elements in Container shall be negated
precUsed precision for output stream

Definition at line 95 of file global_functions.h.

References negate().

Referenced by polyscip::Polyscip::numberofUnboundedResults(), polyscip::doubledescription::V_RepT::print(), polyscip::WeightSpaceVertex::print(), polyscip::Polyscip::printResults(), SCIPexprCreateUser(), SCIPexprgraphCreateNodeUser(), and SCIPprobdataCreate().

◆ narrow_cast()

template<typename Target , typename Source >
Target polyscip::global::narrow_cast ( Source  v)

For conversion between two scalar numeric types where a value might be narrowed. Taken from Stroustroup - "The C++ programming language" 4th edition, page 299

Parameters
vValue to convert
Returns
Value in narrowed type

Definition at line 119 of file global_functions.h.

References r.

Referenced by polyscip::Polyscip::printResults().