34 inline bool isnan(
double const &x) {
return _isnan(x) != 0; }
35 inline bool isinf(
double const &x) {
return !(_finite(x) || _isnan(x)); }
40 #include "libvpsc/assertions.h" 52 enum NonOverlapConstraintsMode { None, Horizontal, Both };
56 FixedList(
const unsigned n) : array(
std::valarray<bool>(n)),allFixed(false)
60 void set(
const unsigned i,
const bool value=
true) {
61 COLA_ASSERT(i<array.size());
64 bool check(
const unsigned i)
const {
65 if(allFixed||i>=array.size()) {
73 void fixAll(
bool val) {
77 std::valarray<bool> array;
87 void operator()(T *ptr){
delete ptr;}
94 template <
class InputIterator,
class T,
class Operation >
95 T sum_over(InputIterator beg, InputIterator end, T init, Operation op)
97 for ( ; beg != end; ++beg)
98 init = init + op(*beg);
libcola: Force-directed network layout subject to separation constraints library. ...
Definition: box.cpp:25