void operator()(void*, Blackbox *V) const { BlackboxTable::iterator it = blackbox_hashtable.find(key); if ( it == blackbox_hashtable.end()) throw lb_runtime_error("LinBox ERROR: invalid blackbox (set random value impossible)"); BlackboxAtRandomFunctorSpec<Blackbox> Fct(V); DomainFunction::call(it->second->getDomainKey(), Fct); }
void operator() (void*, Polynomial *P) const { VectorTable::iterator it = vector_hashtable.find(key); if ( it == vector_hashtable.end()) throw lb_runtime_error("LinBox ERROR: invalid polynomial (writing impossible)"); WritePolynomialSpecFunctor<Polynomial> Fct(os,P); DomainFunction::call(it->second->getDomainKey(), Fct); }
inline boost::asynchronous::detail::callback_continuation<Fct,Job> update_selection_map(Geometry1 geometry1, Geometry2 geometry2, RingTurnInfoMap turn_info_per_ring, std::shared_ptr<RingPropertyMap> map_with_all, long cutoff) { typedef decltype(boost::begin(*map_with_all)) Iterator; //TODO name + prio return boost::asynchronous::parallel_for_each<Iterator,Fct,Job> (boost::begin(*map_with_all),boost::end(*map_with_all), Fct(std::move(geometry1),std::move(geometry2),std::move(turn_info_per_ring),map_with_all), cutoff,"geometry::update_selection_map",0); }
void fct(const LCC& lcc) { vertex_range vr(vertices(lcc)); std::cout << "new for loop" << std::endl; for(vertex_descriptor vd : vr){ std::cout << vd->point() << std::endl; } std::cout << "boost::tie + std::for_each" << std::endl; vertex_iterator vb, ve; boost::tie(vb,ve) = vertices_range(lcc); std::for_each(vb,ve, Fct()); }
void deleteElement(const EltKey &key){ EltTable::iterator it = element_hashtable.find(key); if ( it == element_hashtable.end()){ #ifndef __LINBOX_NO_GC_EXCEPTION throw lb_runtime_error("LinBox ERROR: invalid element (freeing impossible)"); #endif } else { DeleteElementFunctor Fct(it->second); #ifdef __LINBOX_NO_GC_EXCEPTION try { #endif DomainFunction::call(it->second->getDomainKey(), Fct); #ifdef __LINBOX_NO_GC_EXCEPTION } catch(lb_runtime_error &t){std::cout<<"LinBox exception catched\n"; exit(0);} #endif element_hashtable.erase(it); } }
void writeBlackbox (const BlackboxKey &key, std::ostream &os){ WriteBlackboxFunctor Fct(os); BlackboxFunction::call(key, Fct); }
void setBlackboxAtRandom(const BlackboxKey &k){ BlackboxAtRandomFunctor Fct(k); BlackboxFunction::call(k, Fct); }
void SerializePolynomial (SerialPolynomial &s, const PolynomialKey &key) { SerializePolynomialFunctor Fct(key); VectorFunction::call(s, key, Fct); }
void writePolynomial (const PolynomialKey &key, std::ostream &os){ WritePolynomialFunctor Fct(os, key); VectorFunction::call(key, Fct); }