ISerializer& JsonOutputStreamSerializer::operator()(int32_t& value, const std::string& name) {
  int64_t v = static_cast<int64_t>(value);
  return operator()(v, name);
}
Exemplo n.º 2
0
Arquivo: vector.cpp Projeto: LLNL/mfem
const double &Vector::Elem(int i) const
{
   return operator()(i);
}
Exemplo n.º 3
0
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));
}
Exemplo n.º 4
0
 PosibErr<char *> operator() (MutableString str)
 {
   return operator()(str.str, str.size);
 }
Exemplo n.º 5
0
 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;
}
Exemplo n.º 7
0
JSValue JSFunction::operator()(const JSArgs& args) {
  return operator()(JSGlobalObject(), args);
}
Exemplo n.º 8
0
 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;
 }
Exemplo n.º 9
0
void shared_occs::operator()(expr * t) {
    SASSERT(m_stack.empty());
    shared_occs_mark visited;
    reset();
    operator()(t, visited);
}
Exemplo n.º 10
0
 double BinnedSumAgreeingIntensities::operator()(const BinnedSpectrum & spec) const
 {
   return operator()(spec, spec);
 }
Exemplo n.º 11
0
 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);
 }
Exemplo n.º 12
0
 //! 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));
 }
Exemplo n.º 13
0
 T log(const Eigen::EigenBase<Derived>& x) const {
   return std::log(operator()(x));
 }
Exemplo n.º 14
0
uint16_t& Terrain::operator()(glm::vec2 vec)
{
	return operator()(floor(vec[0]), floor(vec[1]));
}
Exemplo n.º 15
0
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;
}
Exemplo n.º 16
0
// 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()();
}
Exemplo n.º 17
0
SqlMassInsert& SqlMassInsert::operator()(const ValueMap& data)
{
	for(int i = 0; i < data.GetCount(); i++)
		operator()((String)data.GetKey(i), data.GetValue(i));
	return *this;
}
Exemplo n.º 18
0
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);
    }
}
Exemplo n.º 20
0
 T2 convert(const T1& i) const
 {
     T2 o { };
     assert(operator()(i, o));
     return o;
 }
Exemplo n.º 21
0
 char * operator() (MutableString str)
 {
   return operator()(str.str, str.size);
 }
Exemplo n.º 22
0
 INLINE void operator() (First first, Rest... rest) {
   enabled[first] = true;
   operator() (rest...);
 }
Exemplo n.º 23
0
 PosibErr<const char *> operator() (char c)
 {
   char buf2[2] = {c, 0};
   return operator()(ParmString(buf2,1));
 }
Exemplo n.º 24
0
 self& operator()(const direction_type val)
 {
     return operator()(static_cast<uint8_t>(val));
 }
Exemplo n.º 25
0
Arquivo: vector.cpp Projeto: LLNL/mfem
double &Vector::Elem(int i)
{
   return operator()(i);
}
Exemplo n.º 26
0
 t get()
 {
     t tmp;
     operator()(tmp);
     return tmp;
 }
Exemplo n.º 27
0
 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);
 }
Exemplo n.º 28
0
 void operator()(std::nullptr_t)
 {
   operator()(static_cast<Pointee *>(nullptr));
 }
Exemplo n.º 29
0
//---------------------------------------------------------------------------
// Quote
void ZtringListList::Quote_Set (const Ztring &NewQuote)
{
    Quote=NewQuote;
    for (size_type Pos0=0; Pos0<size(); Pos0++)
        operator () (Pos0).Quote_Set(Quote);
}
Exemplo n.º 30
0
 //--------------------------------------------------------------------------
 Distribution LossDistHomogeneous::operator()(const vector<Real>& nominals,
                                 const vector<Real>& probabilities) const {
 //--------------------------------------------------------------------------
     return operator()(nominals[0], probabilities);
 }