ISerializer& JsonOutputStreamSerializer::operator()(int32_t& value, const std::string& name) { int64_t v = static_cast<int64_t>(value); return operator()(v, name); }
const double &Vector::Elem(int i) const { return operator()(i); }
void ZtringListList::Swap1 (size_type Pos1_A, size_type Pos1_B) { for (size_type Pos0=0; Pos0<size(); Pos0++) operator () (Pos0, Pos1_A).swap(operator () (Pos0, Pos1_B)); }
PosibErr<char *> operator() (MutableString str) { return operator()(str.str, str.size); }
unsigned operator()(const char * str, unsigned byte_size) { return operator()(str, str + byte_size);}
R1_R1::operator Real() { if (!xSet) Throw(SolutionException("Value of X not set")); Real y = operator()(); return y; }
JSValue JSFunction::operator()(const JSArgs& args) { return operator()(JSGlobalObject(), args); }
measured_type operator()(const value_type* lo, const value_type* hi) const { measured_type m = algebra_type::identity(); for (auto p = lo; p < hi; p++) m = algebra_type::combine(m, operator()(*p)); return m; }
void shared_occs::operator()(expr * t) { SASSERT(m_stack.empty()); shared_occs_mark visited; reset(); operator()(t, visited); }
double BinnedSumAgreeingIntensities::operator()(const BinnedSpectrum & spec) const { return operator()(spec, spec); }
self_type& operator()(const char* pattern, const char* substitution, const bool insensitive=false, const bool subst_all=false) { return operator()(std::string(pattern), std::string(substitution), insensitive, subst_all); }
//! Returns the log-value for a sparse feature vector with unit values. T log(const std::vector<std::size_t>& x) const { return std::log(operator()(x)); }
T log(const Eigen::EigenBase<Derived>& x) const { return std::log(operator()(x)); }
uint16_t& Terrain::operator()(glm::vec2 vec) { return operator()(floor(vec[0]), floor(vec[1])); }
std::wstring Writer::operator ()(const Formula &formula, const Dictionary &dictionary, SymbolType *symbolType) const { SymbolType localSymbolType; SymbolType &type = symbolType ? *symbolType : localSymbolType; std::wstring result; type = formula.type(); switch (type) { case NONE_SYMBOL: return symbolic.noneSymbol; break; case FALSE_SYMBOL: return symbolic.falseSymbol; break; case TRUE_SYMBOL: return symbolic.trueSymbol; break; case EQUALITY: if (formula.terms().size()<=1) { return symbolic.trueSymbol; } result += operator ()(formula.terms()[0], dictionary); for (size_t i = 1; i < formula.terms().size(); ++i) { result += symbolic.equalitySymbol; result += operator ()(formula.terms()[i], dictionary); } break; case NONEQUALITY: if (formula.terms().size()<=1) { return symbolic.trueSymbol; } if (formula.terms().size()==2) { result += (*this)(formula.terms()[0], dictionary); result += symbolic.nonequalitySymbol; result += (*this)(formula.terms()[1], dictionary); } else { result += symbolic.nonequalitySymbol+symbolic.leftRelationBracket; for (size_t i = 0; i<formula.terms().size(); ++i) { if (i!=0) { result += symbolic.relationSeparatorSymbol; result += (*this)(formula.terms()[i], dictionary); } } result += symbolic.rightRelationBracket; } break; case RELATION: result = dictionary(formula.symbol()); if (result.empty()) { result = relationName(formula.symbol().id); } result += symbolic.leftRelationBracket; if (formula.terms().empty() == false) { result += operator ()(formula.terms()[0], dictionary); for (size_t i = 1; i < formula.terms().size(); ++i) { result += symbolic.relationSeparatorSymbol; result += operator ()(formula.terms()[i], dictionary); } } result += symbolic.rightRelationBracket; break; case NEGATION: result = operator ()(formula.formulas()[0], dictionary, &type); insertBracketsIfNeeded(formula.type(), type, result); type = formula.type(); result = symbolic.negationSymbol+result; break; case CONJUNCTION: case DISJUNCTION: switch (formula.formulas().size()) { case 0: if (type == CONJUNCTION) { result = symbolic.trueSymbol; type = TRUE_SYMBOL; } else { result = symbolic.falseSymbol; type = FALSE_SYMBOL; } break; case 1: result = operator ()(formula.formulas()[0], dictionary); break; default: result = operator ()(formula.formulas()[0], dictionary, &type); insertBracketsIfNeeded(formula.type(), type, result); for (size_t i = 1; i < formula.formulas().size(); ++i) { result += formula.type() == CONJUNCTION ? symbolic.conjunctionSymbol : symbolic.disjunctionSymbol; std::wstring tmp = operator ()(formula.formulas()[i], dictionary, &type); insertBracketsIfNeeded(formula.type(), type, tmp); result += tmp; } break; } type = formula.type(); break; case IMPLICATION: case EQUIVALENCE: if (formula.formulas().size() <= 1) { result = symbolic.trueSymbol; } else { result = operator ()(formula.formulas()[0], dictionary, &type); insertBracketsIfNeeded(formula.type(), type, result); for (size_t i = 1; i < formula.formulas().size(); ++i) { result += formula.type() == IMPLICATION ? symbolic.implicationSymbol : symbolic.equivalenceSymbol; std::wstring tmp = operator ()(formula.formulas()[i], dictionary, &type); insertBracketsIfNeeded(formula.type(), type, tmp); result += tmp; } } type = formula.type(); break; case UNIVERSAL: case EXISTENTIAL: if (formula.variables().empty()) { result = operator ()(formula.formulas()[0], dictionary, &type); } else { result = symbolic.leftQuantifierBracket; result += type == UNIVERSAL ? symbolic.universalQuantifier : symbolic.existentialQuantifier; result += operator ()(formula.variables()[0], dictionary); for (size_t i = 1; i < formula.variables().size(); ++i) { result += symbolic.variableSeparatorSymbol; result += operator ()(formula.variables()[i], dictionary); } result += symbolic.rightQuantifierBracket; std::wstring tmp = operator ()(formula.formulas()[0], dictionary, &type); insertBracketsIfNeeded(formula.type(), type, tmp); result += tmp; } type = formula.type(); break; default: throw(1); break; } return result; }
// if ELM is the next thing to return, then forget about it and advance the // iterator to the next element. This is a useful method to call when we are // deleting elements from a set while iterating them at the same time. void sdfsetPrevElmtIterator::skip(sdfsetElmt* elm) { if (currentelmt == elm) operator()(); }
SqlMassInsert& SqlMassInsert::operator()(const ValueMap& data) { for(int i = 0; i < data.GetCount(); i++) operator()((String)data.GetKey(i), data.GetValue(i)); return *this; }
ssize_t Reader::operator()(int fd, const iovec* iov, int count, off_t offset) { EXPECT_EQ(offset_, offset); return operator()(fd, iov, count); }
quat::quat(quat&& q) { for (int i=0; i < 4; i++) { operator()(i) = q(i); } }
T2 convert(const T1& i) const { T2 o { }; assert(operator()(i, o)); return o; }
char * operator() (MutableString str) { return operator()(str.str, str.size); }
INLINE void operator() (First first, Rest... rest) { enabled[first] = true; operator() (rest...); }
PosibErr<const char *> operator() (char c) { char buf2[2] = {c, 0}; return operator()(ParmString(buf2,1)); }
self& operator()(const direction_type val) { return operator()(static_cast<uint8_t>(val)); }
double &Vector::Elem(int i) { return operator()(i); }
t get() { t tmp; operator()(tmp); return tmp; }
void operator()(CmplxIter1 dstBegin, SrcIter srcBegin, CmplxIter2, const Twiddler<typename CmplxIter1::value_type::value_type>& twiddler, size_t N, size_t dstStride, size_t srcStride, size_t) { operator()(dstBegin, srcBegin, twiddler, N, dstStride, srcStride); }
void operator()(std::nullptr_t) { operator()(static_cast<Pointee *>(nullptr)); }
//--------------------------------------------------------------------------- // Quote void ZtringListList::Quote_Set (const Ztring &NewQuote) { Quote=NewQuote; for (size_type Pos0=0; Pos0<size(); Pos0++) operator () (Pos0).Quote_Set(Quote); }
//-------------------------------------------------------------------------- Distribution LossDistHomogeneous::operator()(const vector<Real>& nominals, const vector<Real>& probabilities) const { //-------------------------------------------------------------------------- return operator()(nominals[0], probabilities); }