basix_doc 0.1
|
typedef char* char_ptr |
Definition at line 60 of file defaults.hpp.
typedef const char* const_charp |
typedef unsigned int nat |
Definition at line 49 of file fast_new.hpp.
Definition at line 1254 of file operators.hpp.
typedef unsigned char uchar |
Definition at line 50 of file fast_new.hpp.
typedef unsigned int uint |
Definition at line 52 of file fast_new.hpp.
typedef unsigned long ulong |
Definition at line 53 of file fast_new.hpp.
typedef generic(* unary_generic)(const generic &) |
typedef unsigned short ushort |
Definition at line 51 of file fast_new.hpp.
typedef routine* vec_routine |
Definition at line 477 of file generic.hpp.
typedef void* void_ptr |
Definition at line 59 of file defaults.hpp.
typedef long int xint |
Definition at line 59 of file fast_new.hpp.
typedef unsigned long int xnat |
Definition at line 60 of file fast_new.hpp.
enum mmx_rounding |
Definition at line 826 of file type_props.hpp.
enum print_controls |
enum print_controls |
Definition at line 188 of file cpp_printer.cpp.
enum print_format |
Special objects that affect output when printed.
sparse_vector<C,T,V> mmx::_mul_add | ( | const sparse_vector< C, T, V > & | v1, |
const sparse_vector< C, T, V > & | v2, | ||
const C & | x | ||
) |
Definition at line 308 of file sparse_vector.hpp.
References C, is_exact_zero(), n, N(), Pair, and Sparse_vector.
{ // v1 + x * v2 typedef typename V::val_op Eq; typedef typename V::l_op Less; if (is_exact_zero (x)) return v1; nat i1, i2, n1= N(v1), n2= N(v2), j, n= n1 + n2; Pair* r= mmx_new<Pair > (n); for (i1= i2= j= 0; i1 < n1 && i2 < n2; ) { if (Less::op (v1[i1].x1, v2[i2].x1)) { r[j++]= v1[i1]; i1++; } else if (Less::op (v2[i2].x1, v1[i1].x1)) { r[j++]= Pair (v2[i2].x1, Mul::op (x, v2[i2].x2)); i2++; } else { Pair e (v2[i2].x1, v1[i1].x2 + Mul::op (x, v2[i2].x2)); i1++; i2++; if (Eq::not_op (e.x2, C (0))) r[j++]= e; } } while (i1 < n1) { r[j++]= Pair (v1[i1].x1, v1[i1].x2); i1++; } while (i2 < n2) { r[j++]= Pair (v2[i2].x1, Mul::op (x, v2[i2].x2)); i2++; } return Sparse_vector (r, j, n); }
C mmx::abs | ( | const C & | x | ) | [inline] |
Definition at line 492 of file defaults.hpp.
Referenced by abs_down(), abs_op::Abs_type(), abs_up(), additive_error(), atan2(), bit_size(), GLUE_18(), GLUE_27(), abs_as_op::op(), abs_op::op(), pow(), rounding_error(), abs_as_op::set_op(), and abs_op::set_op().
{ return x>=0? x: -x; }
Definition at line 729 of file generic.cpp.
References current_ev, and GEN_ABS.
{ return current_ev->apply (GEN_ABS, x1); }
unsigned char mmx::abs | ( | const unsigned char & | x | ) | [inline] |
Definition at line 495 of file defaults.hpp.
{ return x; }
short unsigned int mmx::abs | ( | const short unsigned int & | x | ) | [inline] |
Definition at line 498 of file defaults.hpp.
{ return x; }
Definition at line 1153 of file vector.hpp.
{ return unary_map<abs_op> (v); }
unsigned int mmx::abs | ( | const unsigned int & | x | ) | [inline] |
Definition at line 501 of file defaults.hpp.
{ return x; }
long unsigned int mmx::abs | ( | const long unsigned int & | x | ) | [inline] |
Definition at line 504 of file defaults.hpp.
{ return x; }
long long unsigned int mmx::abs | ( | const long long unsigned int & | x | ) | [inline] |
Definition at line 507 of file defaults.hpp.
{ return x; }
unary_return_type_helper<abs_op, C >::RET mmx::abs_down | ( | const C & | x | ) | [inline] |
unary_return_type_helper<abs_op, C >::RET mmx::abs_up | ( | const C & | x | ) | [inline] |
Definition at line 283 of file vector.hpp.
{
return as<vector<generic> > (conc->make_abstract_vector ());
}
void mmx::accelerate | ( | const generic & | name, |
C(*)(const C &) | f | ||
) |
Definition at line 83 of file glue.hpp.
References ACC_ACOS, ACC_ACOSH, ACC_ASIN, ACC_ASINH, ACC_ATAN, ACC_ATANH, ACC_COS, ACC_COSH, ACC_DERIVE, ACC_EXP, ACC_INTEGRATE, ACC_INVERT, ACC_LOG, ACC_NEGATE, ACC_SIN, ACC_SINH, ACC_SQRT, ACC_SQUARE, ACC_TAN, ACC_TANH, GEN_ARCCOS, GEN_ARCSIN, GEN_ARCTAN, GEN_ARGCH, GEN_ARGSH, GEN_ARGTH, GEN_CH, GEN_COS, GEN_DERIVE, GEN_EXP, GEN_INTEGRATE, GEN_INVERT, GEN_LOG, GEN_MINUS, GEN_SH, GEN_SIN, GEN_SQRT, GEN_SQUARE, GEN_TAN, GEN_TH, and unary_routine().
{ routine fun= unary_routine (name, f); if (name == GEN_MINUS) Acc::set_apply (ACC_NEGATE, fun); else if (name == GEN_SQUARE) Acc::set_apply (ACC_SQUARE, fun); else if (name == GEN_INVERT) Acc::set_apply (ACC_INVERT, fun); else if (name == GEN_SQRT) Acc::set_apply (ACC_SQRT, fun); else if (name == GEN_EXP) Acc::set_apply (ACC_EXP, fun); else if (name == GEN_LOG) Acc::set_apply (ACC_LOG, fun); else if (name == GEN_COS) Acc::set_apply (ACC_COS, fun); else if (name == GEN_SIN) Acc::set_apply (ACC_SIN, fun); else if (name == GEN_TAN) Acc::set_apply (ACC_TAN, fun); else if (name == GEN_CH) Acc::set_apply (ACC_COSH, fun); else if (name == GEN_SH) Acc::set_apply (ACC_SINH, fun); else if (name == GEN_TH) Acc::set_apply (ACC_TANH, fun); else if (name == GEN_ARCCOS) Acc::set_apply (ACC_ACOS, fun); else if (name == GEN_ARCSIN) Acc::set_apply (ACC_ASIN, fun); else if (name == GEN_ARCTAN) Acc::set_apply (ACC_ATAN, fun); else if (name == GEN_ARGCH) Acc::set_apply (ACC_ACOSH, fun); else if (name == GEN_ARGSH) Acc::set_apply (ACC_ASINH, fun); else if (name == GEN_ARGTH) Acc::set_apply (ACC_ATANH, fun); else if (name == GEN_DERIVE) Acc::set_apply (ACC_DERIVE, fun); else if (name == GEN_INTEGRATE) Acc::set_apply (ACC_INTEGRATE, fun); }
void mmx::accelerate | ( | const generic & | , |
C(*)(const S1 &, const S2 &) | |||
) | [inline] |
void mmx::accelerate | ( | const generic & | name, |
C(*)(const C &, const C &) | f | ||
) |
Definition at line 131 of file glue.hpp.
References ACC_ADD, ACC_ATAN2, ACC_DIV, ACC_HYPOT, ACC_MUL, ACC_POW, ACC_SUB, binary_routine(), GEN_ARCTAN2, GEN_HYPOT, GEN_MINUS, GEN_OVER, GEN_PLUS, GEN_POWER, and GEN_TIMES.
{ routine fun= binary_routine (name, f); if (name == GEN_PLUS) Acc::set_apply (ACC_ADD, fun); else if (name == GEN_MINUS) Acc::set_apply (ACC_SUB, fun); else if (name == GEN_TIMES) Acc::set_apply (ACC_MUL, fun); else if (name == GEN_OVER) Acc::set_apply (ACC_DIV, fun); else if (name == GEN_HYPOT) Acc::set_apply (ACC_HYPOT, fun); else if (name == GEN_ARCTAN2) Acc::set_apply (ACC_ATAN2, fun); else if (name == GEN_POWER) Acc::set_apply (ACC_POW, fun); }
void mmx::accelerate | ( | const generic & | name, |
bool(*)(const C &, const C &) | f | ||
) |
Definition at line 150 of file glue.hpp.
References ACC_GTR, ACC_GTREQ, ACC_LESS, ACC_LESSEQ, binary_routine(), GEN_GTR, GEN_GTREQ, GEN_LESS, and GEN_LESSEQ.
{ routine fun= binary_routine (name, f); if (name == GEN_LESS) Acc::set_apply (ACC_LESS, fun); else if (name == GEN_LESSEQ) Acc::set_apply (ACC_LESSEQ, fun); else if (name == GEN_GTR) Acc::set_apply (ACC_GTR, fun); else if (name == GEN_GTREQ) Acc::set_apply (ACC_GTREQ, fun); }
void mmx::accelerate | ( | const generic & | , |
bool(*)(const bool &, const bool &) | |||
) | [inline] |
void mmx::accelerate | ( | const generic & | name, |
C(*)(const S1 &) | f | ||
) | [inline] |
Definition at line 77 of file glue.hpp.
References accelerate_converter(), and GEN_CAST.
Referenced by define().
{ if (name == GEN_CAST) accelerate_converter (name, f); }
void mmx::accelerate_converter | ( | const generic & | name, |
C(*)(const S1 &) | f | ||
) |
Definition at line 56 of file glue.hpp.
References gen(), GEN_INTO, and unary_routine().
Referenced by accelerate(), and define_converter().
{ (void) name; accelerate_initialize<C> (); accelerate_initialize<S1> (); generic con= gen (GEN_INTO, type_name<S1> (), type_name<C> ()); routine fun= unary_routine (con, f); Acc::set_construct (accelerator<S1>::id, fun); }
void mmx::accelerate_converter | ( | const generic & | , |
int(*)(const generic_alias< S > &) | |||
) | [inline] |
void mmx::accelerate_converter | ( | const generic & | , |
C(*)(const generic_alias< S > &) | |||
) | [inline] |
void mmx::accelerate_converter | ( | const generic & | , |
int(*)(const S &) | |||
) | [inline] |
void mmx::accelerate_initialize | ( | ) |
Definition at line 50 of file glue.hpp.
References accelerate_number().
{ if (Acc::id == ((nat) (-1))) Acc::id= accelerate_number (); }
nat accelerate_number | ( | ) |
Definition at line 99 of file glue.cpp.
Referenced by accelerate_initialize().
{ static nat nr_ids= 0; return nr_ids++; }
port mmx::accept | ( | const port & | p | ) | [inline] |
Definition at line 481 of file syntactic.cpp.
References GEN_ACCESS, and syn().
{ return syn (GEN_ACCESS, g, i); }
Definition at line 483 of file syntactic.cpp.
References GEN_ACCESS, and syn().
{ return syn (GEN_ACCESS, g, i, j); }
Definition at line 181 of file generic.cpp.
References gen(), and GEN_ACCESS.
Referenced by trig_op::diff_op(), and binary_helper< generic >::disassemble().
{ return gen (GEN_ACCESS, g, x); }
Definition at line 183 of file generic.cpp.
References gen(), and GEN_ACCESS.
{ return gen (GEN_ACCESS, g, x, y); }
Definition at line 185 of file generic.cpp.
References append(), GEN_ACCESS, and vector_to_compound().
{ vector<generic> v= vec<generic> (generic (GEN_ACCESS), g); return vector_to_compound (append (v, args)); }
C mmx::accuracy_cst | ( | ) | [inline] |
Definition at line 753 of file type_props.hpp.
References C, and set_accuracy().
{ C r; set_accuracy (r); return r; }
double acos | ( | const double & | x | ) | [inline] |
Definition at line 54 of file double.hpp.
Referenced by GLUE_40(), acos_op::op(), and acos_op::set_op().
{ return std::acos (x); }
Definition at line 407 of file syntactic.cpp.
References GEN_ARCCOS, and syn().
{ return syn (GEN_ARCCOS, g); }
Definition at line 462 of file generic.cpp.
References ACC_ACOS, ACC_UNARY, current_ev, and GEN_ARCCOS.
{ ACC_UNARY (ACC_ACOS, x1); return current_ev->apply (GEN_ARCCOS, x1); }
Definition at line 1088 of file vector.hpp.
{ return unary_map<acos_op> (v); }
Definition at line 805 of file generic.cpp.
References current_ev.
Referenced by acos_op::op_init().
{ return current_ev->apply ("acos_init", x1, x2); }
C mmx::acosh | ( | const C & | x | ) | [inline] |
Definition at line 593 of file defaults.hpp.
References log(), promote(), sqrt(), and square().
Referenced by acosh_op::op(), and acosh_op::set_op().
void mmx::add | ( | R & | x, |
const C1 & | y1, | ||
const C2 & | y2 | ||
) | [inline] |
Definition at line 52 of file operators.hpp.
Referenced by ladd_op::set_op(), radd_op::set_op(), and add_op::set_op().
{ x= y1 + y2; }
Definition at line 597 of file string.cpp.
References ASSERT, min(), N(), recompose(), repeated(), s, and tokenize().
Referenced by source_string_unindented().
{ if (delta == 0) return s; vector<string> v= tokenize (s, "\n"); for (nat i=0; i<N(v); i++) if (delta > 0) v[i]= repeated (" ", delta) * v[i]; else { int l= min (-delta, (int) N(v[i])); ASSERT (v[i] (0, l) == repeated (" ", l), "insufficient indentation"); v[i]= v[i] (l, N(v[i])); } return recompose (v, "\n", N(s) != 0 && s[N(s) - 1] == '\n'); }
Definition at line 77 of file mmx_texmacs.cpp.
References compound_to_vector(), copy(), is_func(), N(), and vector_to_compound().
Referenced by add_modes(), as_texmacs_scheme(), and as_texmacs_snippet().
{ // mmerr << as_lisp (g) << ", " << mode << "\n"; if (!is<compound> (g) || !is<literal> (g[0])) return g; if (is_func (g, "$math", 1)) return add_modes (g[1], mode, 1); if (is_func (g, "$text", 1)) return add_modes (g[1], mode, 2); if (is_func (g, "$inmath", 1)) return add_modes (g[1], 1); if (is_func (g, "$intext", 1)) return add_modes (g[1], 2); vector<generic> v= copy (compound_to_vector (g)); for (nat i=1; i<N(v); i++) v[i]= add_modes (v[i], mode); return vector_to_compound (v); }
Definition at line 64 of file mmx_texmacs.cpp.
References add_modes(), gen(), and is_func().
{ // mmerr << as_lisp (g) << ", " << mode << ", " << new_mode << "\n"; generic r= add_modes (g, new_mode); if (is_func (r, "$concat", 1)) r= r[1]; if (mode == new_mode) return r; else if (is_func (r, "$math", 1)) return r; else if (is_func (r, "$text", 1)) return r; else if (new_mode == 1) return gen ("$math", r); else if (new_mode == 2) return gen ("$text", r); else return r; }
T mmx::add_operator | ( | const T & | x, |
const T & | y | ||
) |
Definition at line 29 of file operators.hpp.
{ return x+y; }
double mmx::additive_error | ( | const double & | x | ) | [inline] |
Definition at line 87 of file double.hpp.
References abs().
Referenced by additive_error_op::Abs_type(), GLUE_46(), and additive_error_op::set_op().
{ return ldexp (abs (x), -50); }
Definition at line 773 of file generic.cpp.
References current_ev, and GEN_ADDITIVE_ERROR.
{ return current_ev->apply (GEN_ADDITIVE_ERROR, x); }
unary_return_type_helper<abs_op, C >::RET mmx::additive_error | ( | const C & | x | ) | [inline] |
Definition at line 868 of file type_props.hpp.
References rounding_error().
{ return rounding_error (x); }
Definition at line 241 of file alias.hpp.
{ return new alias_unary_access_rep<C,R,A> (r, a); }
Definition at line 260 of file alias.hpp.
{ return new alias_binary_access_rep<C,R,A,B> (r, a, b); }
Definition at line 68 of file alias.cpp.
References is_nil(), and read().
Referenced by define_type_helper< C >::def_type(), define_user_type(), and get_alias().
{ static table<routine,nat> t; if (is_nil (r)) r= read (t, id); else t[id]= r; }
void mmx::alias_glue | ( | const alias< R > & | r, |
const A & | a, | ||
const B & | b | ||
) | [inline] |
void mmx::alias_reset | ( | const alias< R > & | r, |
const A & | a | ||
) | [inline] |
Definition at line 82 of file alias.cpp.
References is_nil(), and read().
Referenced by define_type_helper< C >::def_type(), define_user_type(), and set_alias().
{ static table<routine,nat> t; if (is_nil (r)) r= read (t, id); else t[id]= r; }
Definition at line 53 of file alias.cpp.
References is_nil(), and read().
Referenced by define_type_helper< C >::def_type(), define_user_type(), and specialize_alias().
{ static table<routine,nat> t; if (is_nil (r)) r= read (t, id); else t[id]= r; }
Definition at line 189 of file alias.hpp.
References alias_type_info().
{ int mode= 0; alias_type_info (id, mode); return id; }
void alias_type_info | ( | nat & | id, |
int & | mode | ||
) |
Definition at line 19 of file alias.cpp.
References ERROR, new_type_id(), and read().
Referenced by alias_to_scalar(), is_alias_type(), new_alias_type_id(), new_generic_alias_type_id(), and scalar_to_alias().
{ static table<nat,nat> t (0); static table<nat,nat> u (0); static table<nat,nat> v (0); if (mode == 0) { mode= t->contains (id)? 1: 0; id= read (t, id); } else if (mode == 1) { mode= u->contains (id)? 1: 0; id= read (u, id); } else if (mode == 2) { if (u->contains (id)) id= u[id]; else { nat new_id= new_type_id (); t[new_id]= id; u[id]= new_id; id= new_id; } } else if (mode == 3) { if (v->contains (id)) id= v[id]; else { nat new_id= new_type_id (); t[new_id]= id; v[id]= new_id; id= new_id; } } else ERROR ("wrong mode"); }
nat mmx::aligned_size | ( | nat | n | ) | [inline] |
Definition at line 70 of file vector_naive.hpp.
References n.
{ typedef implementation<vector_allocate,V> Vec; return Vec::template vec_aligned_size<C> (n); }
Definition at line 59 of file glue.cpp.
References as(), current_ev, gen(), and GEN_ALL_TYPES.
Referenced by define_type_sub().
{ generic ret; if (current_ev->get (gen (GEN_ALL_TYPES), ret)) return as<vector<generic> > (ret); return vec<generic> (); }
bool mmx::always_false | ( | const C & | x | ) | [inline] |
Definition at line 741 of file defaults.hpp.
{ (void) x; return false; }
bool mmx::always_true | ( | const C & | x | ) | [inline] |
Definition at line 746 of file defaults.hpp.
{ (void) x; return true; }
Definition at line 621 of file vector.hpp.
References ASSERT, C, CF(), copy(), is_non_scalar(), N(), n, seg(), and Vector.
{ typedef implementation<vector_linear,V> Vec; ASSERT (is_non_scalar (v) && is_non_scalar (w), "non-scalar vectors expected"); nat n= N(v), p= N(w); nat l= aligned_size<C,V> (n+p); C* a= mmx_formatted_new<C> (l, CF(v)); Vec::copy (a, seg (v), n); Vec::copy (a+n, seg (w), p); return Vector (a, n+p, l, CF(v)); }
Definition at line 29 of file generic_utils.cpp.
References compound_to_vector(), and vector_to_compound().
Referenced by access(), append(), cons(), detach(), GLUE_10(), GLUE_9(), insert(), append_op::op(), operator*(), vector< C, V >::operator<<(), and append_op::set_op().
{ return vector_to_compound (append (compound_to_vector (g1), compound_to_vector (g2))); }
Definition at line 29 of file syntactic.cpp.
References as_string(), as_syntactic(), N(), pow(), s, vector_to_compound(), and VERIFY.
{ VERIFY (N(v) != 0, "non-empty vector expected"); if (is<literal> (*v[0])) { string s= as_string (as<literal> (*v[0])); if (N(s) == 1) { if (s[0] == '-' && N(v) == 2) return -v[1]; if (s[0] == '+' && N(v) == 3) return v[1] + v[2]; if (s[0] == '-' && N(v) == 3) return v[1] - v[2]; if (s[0] == '*' && N(v) == 3) return v[1] * v[2]; if (s[0] == '/' && N(v) == 3) return v[1] / v[2]; if (s[0] == '^' && N(v) == 3) return pow (v[1], v[2]); } } return as_syntactic (vector_to_compound (*((vector<generic>*) (void*) &v))); }
syntactic mmx::apply | ( | const char * | f | ) | [inline] |
syntactic mmx::apply | ( | const char * | f, |
const syntactic & | a1 | ||
) | [inline] |
Definition at line 164 of file syntactic.hpp.
References apply().
{ return apply (syntactic (f), a1); }
syntactic mmx::apply | ( | const char * | f, |
const syntactic & | a1, | ||
const syntactic & | a2 | ||
) | [inline] |
Definition at line 166 of file syntactic.hpp.
References apply().
{ return apply (syntactic (f), a1, a2); }
syntactic mmx::apply | ( | const char * | f, |
const syntactic & | a1, | ||
const syntactic & | a2, | ||
const syntactic & | a3 | ||
) | [inline] |
Definition at line 169 of file syntactic.hpp.
References apply().
{ return apply (syntactic (f), a1, a2, a3); }
syntactic mmx::apply | ( | const char * | f, |
const syntactic & | a1, | ||
const syntactic & | a2, | ||
const syntactic & | a3, | ||
const syntactic & | a4 | ||
) | [inline] |
Definition at line 172 of file syntactic.hpp.
References apply().
{ return apply (syntactic (f), a1, a2, a3, a4); }
syntactic mmx::apply | ( | const char * | f, |
const syntactic & | a1, | ||
const syntactic & | a2, | ||
const syntactic & | a3, | ||
const syntactic & | a4, | ||
const syntactic & | a5 | ||
) | [inline] |
Definition at line 176 of file syntactic.hpp.
References apply().
{ return apply (syntactic (f), a1, a2, a3, a4, a5); }
syntactic mmx::apply | ( | const char * | f, |
const syntactic & | a1, | ||
const syntactic & | a2, | ||
const syntactic & | a3, | ||
const syntactic & | a4, | ||
const syntactic & | a5, | ||
const syntactic & | a6 | ||
) | [inline] |
Definition at line 181 of file syntactic.hpp.
References apply().
{ return apply (syntactic (f), a1, a2, a3, a4, a5, a6); }
syntactic mmx::apply | ( | const char * | f, |
const vector< syntactic > & | a | ||
) | [inline] |
Definition at line 186 of file syntactic.hpp.
References apply().
{ return apply (syntactic (f), a); }
syntactic mmx::apply | ( | const generic & | f | ) | [inline] |
Definition at line 189 of file syntactic.hpp.
References apply(), and as_syntactic().
{ return apply (as_syntactic (f)); }
syntactic mmx::apply | ( | const generic & | f, |
const syntactic & | a1 | ||
) | [inline] |
Definition at line 191 of file syntactic.hpp.
References apply(), and as_syntactic().
{ return apply (as_syntactic (f), a1); }
syntactic mmx::apply | ( | const generic & | f, |
const syntactic & | a1, | ||
const syntactic & | a2 | ||
) | [inline] |
Definition at line 193 of file syntactic.hpp.
References apply(), and as_syntactic().
{ return apply (as_syntactic (f), a1, a2); }
syntactic mmx::apply | ( | const generic & | f, |
const syntactic & | a1, | ||
const syntactic & | a2, | ||
const syntactic & | a3 | ||
) | [inline] |
Definition at line 196 of file syntactic.hpp.
References apply(), and as_syntactic().
{ return apply (as_syntactic (f), a1, a2, a3); }
syntactic mmx::apply | ( | const generic & | f, |
const syntactic & | a1, | ||
const syntactic & | a2, | ||
const syntactic & | a3, | ||
const syntactic & | a4 | ||
) | [inline] |
Definition at line 199 of file syntactic.hpp.
References apply(), and as_syntactic().
{ return apply (as_syntactic (f), a1, a2, a3, a4); }
syntactic mmx::apply | ( | const generic & | f, |
const syntactic & | a1, | ||
const syntactic & | a2, | ||
const syntactic & | a3, | ||
const syntactic & | a4, | ||
const syntactic & | a5 | ||
) | [inline] |
Definition at line 203 of file syntactic.hpp.
References apply(), and as_syntactic().
{ return apply (as_syntactic (f), a1, a2, a3, a4, a5); }
syntactic mmx::apply | ( | const generic & | f, |
const syntactic & | a1, | ||
const syntactic & | a2, | ||
const syntactic & | a3, | ||
const syntactic & | a4, | ||
const syntactic & | a5, | ||
const syntactic & | a6 | ||
) | [inline] |
Definition at line 208 of file syntactic.hpp.
References apply(), and as_syntactic().
{ return apply (as_syntactic (f), a1, a2, a3, a4, a5, a6); }
syntactic mmx::apply | ( | const generic & | f, |
const vector< syntactic > & | a | ||
) | [inline] |
Definition at line 213 of file syntactic.hpp.
References apply(), and as_syntactic().
{ return apply (as_syntactic (f), a); }
Definition at line 266 of file generic.cpp.
References current_ev.
Referenced by generic_concrete_rep< C >::acc_apply(), composed_routine_rep::apply(), identity_routine_rep::apply(), apply(), binary_routine_rep< void, S1, S2 >::apply(), binary_routine_rep< D, S1, S2 >::apply(), unary_routine_rep< void, S1 >::apply(), unary_routine_rep< D, S1 >::apply(), nullary_routine_rep< void >::apply(), flatten(), object_flatten(), sign_op::op(), gtreq_op::op(), gtr_op::op(), lesseq_op::op(), less_op::op(), unequal_op::op(), equal_op::op(), exact_neq_op::op(), exact_eq_op::op(), hard_neq_op::op(), hard_eq_op::op(), in_place_op< Op >::op(), rebuild(), and accelerator< C >::set_apply().
{ return current_ev->apply (g, x); }
Definition at line 270 of file generic.cpp.
References current_ev, and vec().
{ return current_ev->apply (g, vec (x, y, z)); }
Definition at line 268 of file generic.cpp.
References current_ev.
{ return current_ev->apply (g, x, y); }
Definition at line 273 of file generic.cpp.
References current_ev.
{ return current_ev->apply (g, args); }
Definition at line 178 of file dynamic.cpp.
{ vector<generic> a= fill<generic> (N (args)); for (nat i= 0; i<N(a); i++) a[i]= args[i]->val; generic r= fun->apply (a); return r; }
Definition at line 731 of file generic.cpp.
References current_ev, and GEN_ARG.
Referenced by INDIRECT_IMPL(), arg_op::op(), arg_op::Real_type(), arg_op::set_op(), and vector_map_n().
{ return current_ev->apply (GEN_ARG, x1); }
double mmx::ARG_HYPER_SUGAR | ( | double | ) | const |
Definition at line 70 of file double.hpp.
{ return std::isfinite (x); }
observer mmx::argument_observer | ( | dynamic_rep * | arg, |
const updater & | u | ||
) |
Definition at line 152 of file dynamic.cpp.
References observer.
{ return observer (new argument_observer_rep (arg, u)); }
Definition at line 93 of file syntactic.cpp.
References cdr(), and components().
{ return cdr (components (g)); }
T as | ( | const F & | x | ) | [inline] |
Definition at line 618 of file type_props.hpp.
Referenced by all_type_names(), default_routine(), generic_object_rep::expression(), object_get_alias(), object_set_alias(), specialize_alias(), and vector_size().
{
return as_helper<T,F>::cv (x);
}
bool mmx::as_bool | ( | const generic & | g | ) | [inline] |
Definition at line 292 of file generic.cpp.
Referenced by operator<(), operator<=(), operator==(), operator>(), and operator>=().
{
return is<bool> (g) && as<bool> (g); }
char * as_charp | ( | const string & | s | ) |
Return a pointer to a copy of s. The allocated memory must be freed with free_charp.
Definition at line 74 of file string.cpp.
References mmx_malloc(), n, and N().
Referenced by dl_link(), file_exists(), file_is_script(), follow_link(), get_env(), input_file_port(), input_output_file_port(), load_directory(), output_file_port(), socket_client_port(), system(), and var_mkdir().
{ nat i, n= N(s); char* r= (char*) mmx_malloc (n+1); for (i=0; i<n; i++) r[i]= s[i]; r[i]= '\0'; return r; }
Definition at line 1218 of file cpp_printer.cpp.
References inside(), N(), and cpp_printer::pp().
Referenced by flatten_as_cpp().
Definition at line 47 of file document.hpp.
Referenced by as_documents(), binary_helper< document >::assemble(), make_document(), make_math(), make_row(), make_texmacs(), make_text(), and binary_helper< document >::read().
{ return document (g); }
Definition at line 38 of file document.cpp.
References as_document(), and N().
Referenced by make_document().
{ vector<document> r= fill<document> (N(v)); for (nat i=0; i<N(v); i++) r[i]= as_document (v[i]); return r; }
double as_double | ( | const string & | s | ) |
double mmx::as_double | ( | const double & | x | ) | [inline] |
generic mmx::as_generic | ( | const syntactic & | g | ) | [inline] |
Definition at line 49 of file syntactic.hpp.
{ return *g; }
Definition at line 46 of file document.hpp.
Referenced by as_generics(), as_lisp(), as_math(), flatten(), flatten_as_cpp(), flatten_as_lisp(), flatten_as_math(), flatten_as_mmx(), flatten_as_texmacs_scheme(), flatten_as_tm(), GLUE_2(), GLUE_3(), different< T1, T2 >::lazy_value(), make_document(), make_math(), make_text(), object_flatten(), object_generalize_alias(), object_get_alias(), object_set_alias(), product_less_op::op(), sum_less_op::op(), trig_op::op(), output_as_mmx(), texmacs_dynamic_event(), and var_flatten().
{ return *g; }
generic mmx::as_generic | ( | const C & | c | ) |
Definition at line 558 of file generic.hpp.
References construct().
{ return construct (new generic_concrete_rep<C> (c)); }
Definition at line 210 of file generic_object.cpp.
References ASSERT, and type().
{ ASSERT (type (g) == tp_id, "type mismatch"); return ((generic_object_rep*) inspect (g)) -> rep; };
Definition at line 216 of file generic_object.cpp.
References ASSERT, and type().
{ ASSERT (type (g) == get_user_type (tp), "type mismatch"); return ((generic_object_rep*) inspect (g)) -> rep; };
Definition at line 31 of file document.cpp.
References as_generic(), and N().
Referenced by make_row(), and make_texmacs().
{ vector<generic> r= fill<generic> (N(v)); for (nat i=0; i<N(v); i++) r[i]= as_generic (v[i]); return r; }
nat mmx::as_hash | ( | const C * | p | ) | [inline] |
Definition at line 157 of file basix.hpp.
References uintptr_t.
Referenced by exact_hash(), hard_hash(), and hash().
int as_int | ( | const string & | s | ) |
int mmx::as_int | ( | const double & | x | ) | [inline] |
Definition at line 119 of file double.hpp.
Referenced by GLUE_2(), and GLUE_3().
{ return (int) x; }
static void mmx::as_lisp | ( | string & | out, |
const generic & | g, | ||
bool | quote_flag, | ||
bool | fun_flag | ||
) | [static] |
Definition at line 19 of file lisp_printer.cpp.
References as_generic(), as_lisp(), flatten(), literal_to_string(), N(), n, and quote().
{ if (is<literal> (g)) { if (quote_flag && !fun_flag) out << quote (literal_to_string (g)); else out << literal_to_string (g); } else if (is<compound> (g)) { nat i, n= N (g); out << "("; if (n>0) as_lisp (out, g[0], quote_flag, true); for (i=1; i<n; i++) { out << " "; as_lisp (out, g[i], quote_flag, false); } out << ")"; } else { generic f= as_generic (flatten (g)); as_lisp (out, f, quote_flag, fun_flag); } }
Definition at line 41 of file lisp_printer.cpp.
Referenced by as_lisp(), and flatten_as_lisp().
{ string out; as_lisp (out, g, quote_flag, false); return out; }
Definition at line 134 of file math_printer.cpp.
References as_generic(), as_math(), exact_eq(), flatten(), GEN_ROW, GEN_SQTUPLE, literal_to_string(), math_symbol_table(), n, N(), and s.
{ static table<string, string, exact_eq_table> t (math_symbol_table ()); if (is<literal> (g)) { string tmp; string s (literal_to_string (g)); if (t->get (s, tmp)) out << tmp; else if (N(s) > 0 && s[0]>='0' && s[0] <= '9') out << "\"" << s << "\""; else out << s; } else if (is<compound> (g)) { nat i, n= N (g); out << "("; if (n>0) { if (exact_eq (g[0], GEN_SQTUPLE) && n>1 && is<compound> (g[1]) && exact_eq (g[1][0], GEN_ROW)) out << "matrix"; else as_math (out, g[0]); } for (i=1; i<n; i++) { out << " "; as_math (out, g[i]); } out << ")"; } else { generic f= as_generic (flatten (g)); as_math (out, f); } }
Definition at line 168 of file math_printer.cpp.
Referenced by as_math(), and flatten_as_math().
{ string out; as_math (out, g); return out; }
Definition at line 905 of file mmx_printer.cpp.
References print_mmx(), and serialize().
Referenced by flatten_as_mmx(), and output_as_mmx().
Definition at line 200 of file generic_object.cpp.
Referenced by generic_object_rep::duplicate_me(), generic_object_rep::expression(), object_alias(), and object_specialize_alias().
{ return new generic_object_rep (g, tp_id); };
Definition at line 205 of file generic_object.cpp.
{ return new generic_object_rep (g, get_user_type (tp)); };
Definition at line 577 of file mmx_texmacs.cpp.
References as_texmacs(), print_mmx(), replace_lf(), and texmacs_to_scheme().
Referenced by flatten_as_tm().
{ string r= ""; generic h= print_mmx (g); generic m= h;//add_modes (h, 0, 1); generic t= as_texmacs (m); generic l= replace_lf (t); texmacs_to_scheme (r, l); return r; }
string as_string | ( | int | i | ) |
Definition at line 95 of file string.cpp.
Referenced by apply(), composed_routine_rep::apply(), as_string(), composite_port(), flatten(), GLUE_3(), GLUE_5(), hard_eq(), hard_hash(), hard_neq(), literal_to_string(), make_literal(), make_texmacs(), product_less_op::op(), sum_less_op::op(), serialize(), signed_decompose(), socket_client_port(), source_begin(), source_end(), source_error(), source_file(), unique_identifier(), and binary_helper< literal >::write().
{ char buffer[100]; sprintf (buffer, "%d", i); return string (buffer); }
string as_string | ( | unsigned int | i | ) |
Definition at line 102 of file string.cpp.
{ char buffer[100]; sprintf (buffer, "%u", i); return string (buffer); }
string as_string | ( | void * | ptr | ) |
Definition at line 88 of file string.cpp.
{ char buffer[100]; sprintf (buffer, "0x%lx", (unsigned long) ptr); return string (buffer); }
string mmx::as_string | ( | short int | i | ) | [inline] |
string mmx::as_string | ( | short unsigned int | i | ) | [inline] |
Definition at line 124 of file string.hpp.
References as_string().
{ return as_string ((unsigned int) i); }
string mmx::as_string | ( | signed char | i | ) | [inline] |
string mmx::as_string | ( | unsigned char | i | ) | [inline] |
Definition at line 128 of file string.hpp.
References as_string().
{ return as_string ((unsigned int) i); }
string as_string | ( | long int | i | ) |
Definition at line 109 of file string.cpp.
{ char buffer[100]; sprintf (buffer, "%ld", i); return string (buffer); }
string as_string | ( | long unsigned int | i | ) |
Definition at line 116 of file string.cpp.
{ char buffer[100]; sprintf (buffer, "%lu", i); return string (buffer); }
string as_string | ( | long long int | i | ) |
Definition at line 123 of file string.cpp.
{ char buffer[100]; sprintf (buffer, "%lld", i); return string (buffer); }
string as_string | ( | long long unsigned int | i | ) |
Definition at line 130 of file string.cpp.
{ char buffer[100]; sprintf (buffer, "%llu", i); return string (buffer); }
string as_string | ( | float | x | ) |
Definition at line 153 of file string.cpp.
{ if (x == 0.0) return "0"; char buffer[32]; sprintf (buffer, "%1.3e", x); return string (buffer); }
string as_string | ( | double | x | ) |
Definition at line 163 of file string.cpp.
References as_string_hook.
{ if (as_string_hook != NULL) return as_string_hook (x); if (x == 0.0) return "0"; char buffer[32]; sprintf (buffer, "%1.12g", x); return string (buffer); }
string as_string | ( | long double | x | ) |
Definition at line 173 of file string.cpp.
{ char buffer[64]; sprintf (buffer, "%Lf", x); return string (buffer); }
Definition at line 26 of file syntactic.cpp.
References literal_to_string().
{ return literal_to_string (*g); }
string mmx::as_string_hexa | ( | int | i | ) | [inline] |
Definition at line 138 of file string.hpp.
Referenced by GLUE_4().
{ static char buf[16]; sprintf (buf, "%x", i); return buf; }
syntactic mmx::as_syntactic | ( | const generic & | g | ) | [inline] |
Definition at line 50 of file syntactic.hpp.
Referenced by apply(), binary_helper< syntactic >::assemble(), flatten(), flatten_type(), trig_op::op(), binary_helper< syntactic >::read(), set_accuracy(), set_catalan(), set_euler(), set_fuzz(), set_imaginary(), set_infinity(), set_largest(), set_log2(), set_maximal(), set_minimal(), set_nan(), set_pi(), set_smallest(), syn(), and WRAP_INDIRECT_IMPL().
{ return syntactic (g); }
Definition at line 242 of file mmx_texmacs.cpp.
References cdr(), compound_to_vector(), concat_append(), contains(), ERROR, gen(), GEN_MINUS, GEN_PLUS, is_alpha(), is_func(), literal_to_string(), N(), s, starts(), texmacs_symbol_table(), unbracket(), and vec().
Referenced by as_snippet(), as_texmacs_scheme(), and as_texmacs_snippet().
{ if (is<literal> (g)) { if (g == "$lf") return gen ("$lf"); if (g == "$cr") return gen ("$cr"); if (g == "$spc") return gen (" "); static table<generic,generic> t= texmacs_symbol_table (); generic h= g; if (contains (t, h)) h= t[h]; if (!is<literal> (h)) return h; string s= literal_to_string (h); if (starts (s, "tm$")) return generic ("<" * s (3, N(s)) * ">"); string r; for (nat i=0; i<N(s); i++) if (s[i] == '<') r << "<less>"; else if (s[i] == '>') r << "<gtr>"; else r << s[i]; return r; } else if (is_func (g, "$concat")) { vector<generic> v; for (nat i=1; i<N(g); i++) concat_append (v, as_texmacs (g[i])); if (N(v) == 0) return generic (""); else if (N(v) == 1) return v[0]; else return gen ("$concat", v); } else if (is_func (g, "$keyword", 1)) return as_texmacs (gen ("$strong", g[1])); else if (is_func (g, "$keyword", 2)) return as_texmacs (gen ("$concat", gen ("$strong", g[1]), "$spc", g[2])); else if (is_func (g, "$bracket", 3)) return as_texmacs (gen ("$around*", g[1], g[2], g[3])); else if (is_func (g, "$prefix", 2)) { if (g[1] == "'" || g[1] == "`") return as_texmacs (gen ("$concat", gen ("$lprime", g[1]), g[2])); else return as_texmacs (gen ("$concat", g[1], g[2])); } else if (is_func (g, "$postfix", 2)) { if (g[2] == "'" || g[2] == "`") return as_texmacs (gen ("$concat", g[1], gen ("$lprime", g[2]))); else return as_texmacs (gen ("$concat", g[1], g[2])); } else if (is_func (g, "$infix", 3)) { if (g[2] == "/") return as_texmacs (gen ("$frac", unbracket (g[1]), unbracket (g[3]))); else if (g[2] == "^") return as_texmacs (gen ("$concat", g[1], gen ("$rsup", unbracket (g[3])))); else if (g[2] == "|" || g[2] == "||") return as_texmacs (gen ("$concat", g[1], gen ("$mid", g[2]), g[3])); else { generic op= as_texmacs (g[2]); if (is_alpha (op)) op= gen ("$concat", "$spc", gen ("$strong", op), "$spc"); return as_texmacs (gen ("$concat", g[1], g[2], g[3])); } } else if (is_func (g, "$bigop") && N(g) >= 3) { vector<generic> v; if (g[1] == GEN_PLUS && is_func (g[2], GEN_MINUS, 1)) v << generic ("-") << g[2][1]; else v << g[2]; for (nat i=3; i<N(g); i++) { if (g[1] == GEN_PLUS && is_func (g[i], GEN_MINUS, 1)) v << generic ("-") << g[i][1]; else v << g[1] << g[i]; } return as_texmacs (gen ("$concat", v)); } else if (is_func (g, "$operate", 2)) { if (is_func (g[2], "$bracket", 3) && g[2][1] == "[") return as_texmacs (gen ("$concat", g[1], gen ("$rsub", unbracket (g[2])))); else return as_texmacs (gen ("$concat", g[1], g[2])); } else if (is_func (g, "$hlist")) { if (N(g) == 1) return generic (""); vector<generic> v= vec (g[1]); for (nat i=2; i<N(g); i++) v << generic (",") << g[i]; return as_texmacs (gen ("$concat", v)); } else if (is_func (g, "$vlist")) { vector<generic> v; for (nat i=1; i<N(g); i++) if (is_func (g[i], "$hlist")) v << gen ("$row", cdr (compound_to_vector (g[i]))); if (N(v) == 0) return generic (""); return as_texmacs (gen ("$tabular*", gen ("$table", v))); } else if (is_func (g, "$indent")) { vector<generic> v; for (nat i=1; i<N(g); i++) concat_append (v, as_texmacs (g[i])); return gen ("$concat", gen ("$indent", gen ("$concat", v)), gen ("$lf")); } else if (is_func (g, "$text", 1)) return gen ("$text", as_texmacs (g[1])); else if (is_func (g, "$math", 1)) return gen ("$math", as_texmacs (g[1])); else if (is_func (g, "$dynamic")) return gen ("$locus", gen ("$id", as_texmacs (g[1])), as_texmacs (g[2])); else if (is<compound> (g)) { vector<generic> v; for (nat i=1; i<N(g); i++) v << as_texmacs (g[i]); return gen (g[0], v); } else ERROR ("not implemented"); }
Definition at line 476 of file mmx_texmacs.cpp.
References add_modes(), as_texmacs(), print_mmx(), replace_lf(), and texmacs_to_scheme().
Referenced by flatten_as_texmacs_scheme().
{ string r= "(document "; generic h= print_mmx (g); generic m= add_modes (h, 0, 1); generic t= as_texmacs (m); generic l= replace_lf (t); texmacs_to_scheme (r, l); r << ")"; return r; }
Definition at line 465 of file mmx_texmacs.cpp.
References add_modes(), as_texmacs(), print_mmx(), replace_lf(), and texmacs_to_scheme().
Referenced by texmacs_dynamic_event().
{ string r= ""; generic h= print_mmx (g); generic m= add_modes (h, 0, 1); generic t= as_texmacs (m); generic l= replace_lf (t); texmacs_to_scheme (r, l); return r; }
Definition at line 69 of file row_tuple.hpp.
Referenced by inspector< compound >::access(), compound_to_vector(), solve_vector_lde_op::diff_op(), flatten(), GLUE_1(), GLUE_10(), GLUE_11(), GLUE_12(), GLUE_13(), GLUE_14(), GLUE_2(), GLUE_3(), GLUE_4(), GLUE_5(), GLUE_6(), GLUE_7(), GLUE_9(), hard_eq(), hard_hash(), hard_neq(), iterate(), and inspector< compound >::length().
Definition at line 468 of file generic.cpp.
References ACC_ASIN, ACC_UNARY, current_ev, and GEN_ARCSIN.
{ ACC_UNARY (ACC_ASIN, x1); return current_ev->apply (GEN_ARCSIN, x1); }
double asin | ( | const double & | x | ) | [inline] |
Definition at line 55 of file double.hpp.
Referenced by GLUE_41(), asin_op::op(), and asin_op::set_op().
{ return std::asin (x); }
Definition at line 408 of file syntactic.cpp.
References GEN_ARCSIN, and syn().
{ return syn (GEN_ARCSIN, g); }
Definition at line 1089 of file vector.hpp.
{ return unary_map<asin_op> (v); }
Definition at line 807 of file generic.cpp.
References current_ev.
Referenced by asin_op::op_init().
{ return current_ev->apply ("asin_init", x1, x2); }
C mmx::asinh | ( | const C & | x | ) | [inline] |
Definition at line 595 of file defaults.hpp.
References log(), promote(), sqrt(), and square().
Referenced by asinh_op::op(), and asinh_op::set_op().
Definition at line 474 of file generic.cpp.
References ACC_ATAN, ACC_UNARY, current_ev, and GEN_ARCTAN.
{ ACC_UNARY (ACC_ATAN, x1); return current_ev->apply (GEN_ARCTAN, x1); }
double atan | ( | const double & | x | ) | [inline] |
Definition at line 56 of file double.hpp.
Referenced by atan2(), GLUE_42(), atan_op::op(), atan_op::set_op(), and set_pi().
{ return std::atan (x); }
Definition at line 409 of file syntactic.cpp.
References GEN_ARCTAN, and syn().
{ return syn (GEN_ARCTAN, g); }
Definition at line 1090 of file vector.hpp.
{ return unary_map<atan_op> (v); }
Definition at line 522 of file generic.cpp.
References abs(), ACC_ATAN2, ACC_BINARY, atan(), and sign().
double atan2 | ( | const double & | y, |
const double & | x | ||
) | [inline] |
Definition at line 421 of file syntactic.cpp.
References GEN_ARCTAN2, and syn().
{ return syn (GEN_ARCTAN2, g1, g2); }
C mmx::atan2 | ( | const C & | y, |
const C & | x | ||
) |
Definition at line 575 of file defaults.hpp.
References abs(), atan(), promote(), and sign().
Referenced by atan2(), atan2_op::op(), and atan2_op::set_op().
{ if (x > promote (0, x)) return atan (y/x); else if (y == promote (0, x)) return x == promote (0, x)? promote (0, x): promote (-4, x) * atan (promote (1, x)); else if (x == promote (0, x)) return promote (2 * sign (y), x) * atan (promote (1, x)); else return promote (sign (y), x) * (promote (4, x) * atan (promote (1, x)) - atan (abs (y/x))); }
Definition at line 809 of file generic.cpp.
References current_ev.
Referenced by atan_op::op_init().
{ return current_ev->apply ("atan_init", x1, x2); }
C mmx::atanh | ( | const C & | x | ) | [inline] |
Definition at line 597 of file defaults.hpp.
References log(), and promote().
Referenced by atanh_op::op(), and atanh_op::set_op().
Definition at line 47 of file dynamic.cpp.
References inside().
Referenced by flatten().
{ inside (d) -> obs << o; }
void attach_generic_binary_assembler | ( | const generic & | tp, |
unary_generic | r | ||
) |
Definition at line 72 of file generic.cpp.
References current_ev, gen(), and unary_routine().
Referenced by attach_generic_binary_assembler().
{ if (!is<string> (tp) || as<string> (tp) != "?") current_ev->set (gen ("assembler", tp), as<generic> (unary_routine ("binary_assembler", r))); }
void mmx::attach_generic_binary_assembler | ( | ) | [inline] |
Definition at line 267 of file port.hpp.
References attach_generic_binary_assembler().
{ attach_generic_binary_assembler (binary_helper<T>::full_type_name (), binary_assemble_generic_via<T>); }
void attach_generic_binary_reader | ( | const string & | s, |
unary_generic | r | ||
) |
Definition at line 99 of file generic.cpp.
References binary_readers, s, and unary_routine().
Referenced by attach_generic_binary_reader().
{ if (s != "?") binary_readers[s]= as<generic> (unary_routine ("binary_reader", r)); }
void mmx::attach_generic_binary_reader | ( | ) | [inline] |
Definition at line 282 of file port.hpp.
References attach_generic_binary_reader().
{ attach_generic_binary_reader (binary_helper<T>::short_type_name (), binary_read_generic<T>); }
Definition at line 334 of file source_track.cpp.
References has_trace(), source_exception(), trace_pull(), and trace_top().
Referenced by source_exception().
{ if (has_trace (g)) return backtrace (trace_pull (g)) * backtrace (trace_top (g)); else return source_exception (as<exception> (g)); }
Definition at line 260 of file chain.hpp.
References balance_right(), Chain, is_nil(), left(), middle(), N(), right(), and shift_left().
Referenced by balance_right(), cdr(), and operator*().
{ // Ensure that #left(c) >= #right(c) switch (N(c)) { case 0: case 1: return c; case 2: if (is_nil (right (c))) return c; return Chain (Chain (middle (c)), middle (right (c)), Chain ()); case 3: return c; default: if (N (left (c)) >= N (right (c))) return c; else { Chain aux= balance_right (right (c)); return shift_left (Chain (left (c), middle (c), aux)); } } }
Definition at line 281 of file chain.hpp.
References balance_left(), Chain, is_nil(), left(), middle(), N(), right(), and shift_right().
Referenced by balance_left(), cDr(), and operator*().
{ // Ensure that #left(c) <= #right(c) switch (N(c)) { case 0: case 1: return c; case 2: if (is_nil (left (c))) return c; return Chain (Chain (), middle (left (c)), Chain (middle (c))); case 3: return c; default: if (N (left (c)) <= N (right (c))) return c; else { Chain aux= balance_left (left (c)); return shift_right (Chain (aux, middle (c), right (c))); } } }
Definition at line 427 of file iterator.hpp.
References busy(), C, CF(), done(), and get_sample().
Definition at line 439 of file iterator.hpp.
Referenced by GLUE_27().
{ return big<add_op> (it); }
Definition at line 1110 of file vector.hpp.
{ return big<add_op> (v); }
Definition at line 442 of file iterator.hpp.
{ return big<and_op> (it); }
Definition at line 1113 of file vector.hpp.
{ return big<and_op> (v); }
Definition at line 1116 of file vector.hpp.
{ return big<inf_op> (v); }
Definition at line 444 of file iterator.hpp.
{ return big<max_op> (it); }
Definition at line 1115 of file vector.hpp.
{ return big<max_op> (v); }
Definition at line 443 of file iterator.hpp.
{ return big<min_op> (it); }
Definition at line 1114 of file vector.hpp.
{ return big<min_op> (v); }
Definition at line 440 of file iterator.hpp.
Referenced by GLUE_26().
{ return big<mul_op> (it); }
Definition at line 1111 of file vector.hpp.
{ return big<mul_op> (v); }
Definition at line 441 of file iterator.hpp.
{ return big<or_op > (it); }
Definition at line 1112 of file vector.hpp.
{ return big< or_op> (v); }
Definition at line 176 of file generic_utils.cpp.
References compare().
Referenced by sum_less_op::op().
{ return compare (g1, g2, -1); }
Definition at line 1117 of file vector.hpp.
{ return big<sup_op> (v); }
generic mmx::binary_access | ( | const C & | x, |
nat | i | ||
) |
Definition at line 211 of file port.hpp.
References void_binary_helper< C >::access().
{ return binary_helper<C>::access (x, i); }
C binary_assemble | ( | const generic & | x | ) |
Definition at line 221 of file port.hpp.
References void_binary_helper< C >::assemble().
Referenced by binary_helper< compound >::assemble().
{
return binary_helper<C>::assemble (x);
}
Definition at line 89 of file generic.cpp.
References ASSERT, current_ev, gen(), mmerr, and val.
Referenced by binary_helper< generic >::assemble().
{ if (!current_ev->contains (gen ("assembler", tp))) mmerr << "val= " << val << "\n"; ASSERT (current_ev->contains (gen ("assembler", tp)), "unsupported type for generic binary assemble"); routine r= as<routine> (current_ev->get (gen ("assembler", tp))); return r->apply (val); }
generic mmx::binary_assemble_generic_via | ( | const generic & | x | ) |
Definition at line 564 of file table.hpp.
References busy(), entries(), simplify(), and Table.
{ Table r (Op::template neutral<C> ()); for (iterator<T> it1= entries (t); busy (it1); ++it1) for (iterator<T> it2= entries (u); busy (it2); ++it2) Op::set_op (r[Op::rhs_op::op (*it1, *it2)], t[*it1], u[*it2]); simplify (r); return r; }
generic binary_disassemble | ( | const C & | x | ) |
Definition at line 216 of file port.hpp.
References void_binary_helper< C >::disassemble().
Referenced by generic_concrete_rep< C >::binary_disassemble(), and binary_helper< format< T > >::disassemble().
{
return binary_helper<C>::disassemble (x);
}
Definition at line 84 of file generic.cpp.
Referenced by binary_helper< generic >::access().
{
return g->binary_disassemble ();
}
nat mmx::binary_id | ( | nat | id1, |
nat | id2 | ||
) | [inline] |
Definition at line 178 of file generic.hpp.
{ return id1 ^ (0x10115 * id2); }
port mmx::binary_ll | ( | const port & | out, |
const C & | x | ||
) |
Definition at line 236 of file port.hpp.
References void_binary_helper< C >::write().
{ binary_helper<C>::write (out, x); return out; }
sparse_vector<C,T,V> mmx::binary_map | ( | const sparse_vector< C, T, V > & | v1, |
const sparse_vector< C, T, V > & | v2 | ||
) |
Definition at line 195 of file sparse_vector.hpp.
References C, n, N(), Pair, and Sparse_vector.
{ typedef typename V::val_op Eq; typedef typename V::l_op Less; nat i1, i2, n1= N(v1), n2= N(v2), j, n= n1 + n2; Pair* r= mmx_new<Pair > (n); for (i1= i2= j= 0; i1 < n1 && i2 < n2; ) { if (Less::op (v1[i1].x1, v2[i2].x1)) { Pair e (v1[i1].x1, Op::op (v1[i1].x2, C(0))); i1++; if (Eq::not_op (e.x2, C(0))) r[j++]= e; } else if (Less::op (v2[i2].x1, v1[i1].x1)) { Pair e (v2[i2].x1, Op::op (C(0), v2[i2].x2)); i2++; if (Eq::not_op (e.x2, C(0))) r[j++]= e; } else { Pair e (v2[i2].x1, Op::op (v1[i1].x2, v2[i2].x2)); i1++; i2++; if (Eq::not_op (e.x2, C (0))) r[j++]= e; } } while (i1 < n1) { Pair e (v1[i1].x1, Op::op (v1[i1].x2, C(0))); i1++; if (Eq::not_op (e.x2, C(0))) r[j++]= e; } while (i2 < n2) { Pair e (v2[i2].x1, Op::op (C(0), v2[i2].x2)); i2++; if (Eq::not_op (e.x2, C(0))) r[j++]= e; } return Sparse_vector (r, j, n); }
format<typename binary_return_type_helper< Op , C1 , C2 >::RET > mmx::binary_map | ( | const format< C1 > & | fm1, |
const format< C2 > & | fm2 | ||
) |
Definition at line 600 of file type_props.hpp.
References Binary_return_type, and C2.
{ typedef Binary_return_type(Op,C1,C2) R; typedef typename format<R>::FT FT; return format_binary_map_helper<Op,FT,R,C1,C2>::op (fm1, fm2); }
vector<Binary_return_type(Op,C1,C2),V> mmx::binary_map | ( | const vector< C1, V > & | v, |
const vector< C2, V > & | w | ||
) |
Definition at line 764 of file vector.hpp.
References ASSERT, Binary_return_type, C2, CF(), extend(), is_a_scalar(), is_non_scalar(), N(), n, vector< C, V >::scalar(), seg(), and T.
{ typedef implementation<vector_linear,V> Vec; typedef Binary_return_type(Op,C1,C2) T; format<T> fm= binary_map<Op> (CF(v), CF(w)); if (is_a_scalar (v) || is_a_scalar (w)) { if (is_non_scalar (v)) return binary_map<Op> (v, extend (w, v)); if (is_non_scalar (w)) return binary_map<Op> (extend (v, w), w); return vector<T,V> (Op::op (v.scalar(), w.scalar())); } nat n= N(v); ASSERT (N(w) == n, "lengths don't match"); nat l= aligned_size<T,V> (n); T* r= mmx_formatted_new<T> (l, fm); Vec::template vec_binary<Op> (r, seg (v), seg (w), n); return vector<T,V> (r, n, l, fm); }
sparse_vector<C,T,V> mmx::binary_map_optimized | ( | const sparse_vector< C, T, V > & | v1, |
const sparse_vector< C, T, V > & | v2 | ||
) |
Definition at line 226 of file sparse_vector.hpp.
References C, n, N(), Pair, and Sparse_vector.
{ // With optimizations for addition and subtraction typedef typename V::val_op Eq; typedef typename V::l_op Less; nat i1, i2, n1= N(v1), n2= N(v2), j, n= n1 + n2; Pair* r= mmx_new<Pair > (n); for (i1= i2= j= 0; i1 < n1 && i2 < n2; ) { if (Less::op (v1[i1].x1, v2[i2].x1)) { typedef typename Op::lop Lop; r[j++]= Pair (v1[i1].x1, Lop::op (v1[i1].x2)); i1++; } else if (Less::op (v2[i2].x1, v1[i1].x1)) { typedef typename Op::rop Rop; r[j++]= Pair (v2[i2].x1, Rop::op (v2[i2].x2)); i2++; } else { Pair e (v2[i2].x1, Op::op (v1[i1].x2, v2[i2].x2)); i1++; i2++; if (Eq::not_op (e.x2, C (0))) r[j++]= e; } } while (i1 < n1) { typedef typename Op::lop Lop; r[j++]= Pair (v1[i1].x1, Lop::op (v1[i1].x2)); i1++; } while (i2 < n2) { typedef typename Op::rop Rop; r[j++]= Pair (v2[i2].x1, Rop::op (v2[i2].x2)); i2++; } return Sparse_vector (r, j, n); }
sparse_vector<C,T,V> mmx::binary_map_scalar | ( | const sparse_vector< C, T, V > & | v, |
const C & | x | ||
) |
Definition at line 279 of file sparse_vector.hpp.
References C, N(), n, Pair, and Sparse_vector.
format<typename binary_return_type_helper< Op , C1 , C2 >::RET > mmx::binary_map_scalar | ( | const format< C1 > & | fm, |
const C2 & | x | ||
) |
Definition at line 568 of file type_props.hpp.
References Binary_return_type, and C2.
{ typedef Binary_return_type(Op,C1,C2) R; typedef typename format<R>::FT FT; return format_binary_map_scalar_helper<Op,FT,R,C1,C2>::op (fm, x); }
vector<Binary_return_type(Op,C,X),V> mmx::binary_map_scalar | ( | const vector< C, V > & | v, |
const X & | x | ||
) |
Definition at line 783 of file vector.hpp.
References Binary_return_type, C, CF(), is_a_scalar(), N(), n, vector< C, V >::scalar(), seg(), and T.
{ typedef implementation<vector_linear,V> Vec; typedef Binary_return_type(Op,C,X) T; format<T> fm= binary_map_scalar<C> (CF(v), x); if (is_a_scalar (v)) return vector<T,V> (Op::op (v.scalar(), x)); nat n= N(v); nat l= aligned_size<T,V> (n); T* r= mmx_formatted_new<T> (l, fm); Vec::template vec_binary_scalar<Op> (r, seg (v), x, n); return vector<T,V> (r, n, l, fm); }
C binary_read | ( | const port & | in | ) |
Definition at line 231 of file port.hpp.
References void_binary_helper< C >::read().
Referenced by binary_helper< compound >::read().
{ return binary_helper<C>::read (in); }
Definition at line 110 of file generic.cpp.
References ASSERT, binary_readers, mmerr, and read().
Referenced by GLUE_28(), and binary_helper< generic >::read().
{ string name; char buf[1]; while (true) { mmx::read (in, buf, 1); if (buf[0] == ':') break; name << buf[0]; } if (!binary_readers->contains (name)) mmerr << "name= " << name << "\n"; ASSERT (binary_readers->contains (name), "unsupported type for generic binary read"); routine r= as<routine> (binary_readers[name]); return r->apply (as<generic> (in)); }
generic mmx::binary_read_generic | ( | const generic & | in | ) |
Definition at line 267 of file routine.hpp.
Referenced by accelerate(), define_type_helper< C >::def_type(), define(), and define_user_type().
{ return new binary_routine_rep<D,S1,S2> (name, f); }
port mmx::binary_rr | ( | const port & | in, |
C & | x | ||
) |
Definition at line 242 of file port.hpp.
References void_binary_helper< C >::read().
{ x= binary_helper<C>::read (in); return in; }
nat mmx::binary_size | ( | const C & | x | ) |
Definition at line 206 of file port.hpp.
References void_binary_helper< C >::size().
{ return binary_helper<C>::size (x); }
Definition at line 536 of file table.hpp.
References busy(), entries(), and I().
{ if (Op::not_op (I(t), I(u))) return false; for (iterator<T> it= entries (t); busy (it); ++it) if (Op::not_op (t[*it], u[*it])) return false; for (iterator<T> it= entries (u); busy (it); ++it) if (!t->contains (*it) && Op::not_op (t[*it], u[*it])) return false; return true; }
bool mmx::binary_test | ( | const triple< C1, C2, C3 > & | t1, |
const triple< C1, C2, C3 > & | t2 | ||
) |
Definition at line 54 of file triple.hpp.
{
return Op::op (t1.x1,t2.x1) && Op::op(t1.x2, t2.x2) && Op::op(t1.x3, t2.x3);
}
Definition at line 835 of file vector.hpp.
References extend(), is_a_scalar(), is_non_scalar(), N(), n, vector< C, V >::scalar(), and seg().
{ typedef implementation<vector_linear,V> Vec; if (is_a_scalar (v) || is_a_scalar (w)) { if (is_non_scalar (v)) return binary_test<Op> (v, extend (w, v)); if (is_non_scalar (w)) return binary_test<Op> (extend (v, w), w); return Op::op (v.scalar(), w.scalar()); } nat n= N(v); if (N(w) != n) return false; return Vec::template vec_binary_test<Op> (seg (v), seg (w), n); }
Definition at line 170 of file iterator.hpp.
References ERROR.
{ (void) it1b; (void) it2b; ERROR ("invalid test on iterators"); return false; /* Iterator it1= copy (it1b), it2= copy (it2b); while (busy (it1) && busy (it2)) { if (Op::not_op (*it1, *it2)) return false; ++it1; ++it2; } return done (it1) && done (it2); */ }
bool mmx::binary_test | ( | const pair< C1, C2 > & | p1, |
const pair< C1, C2 > & | p2 | ||
) |
bool mmx::binary_test | ( | const sparse_vector< C, T, V > & | v1, |
const sparse_vector< C, T, V > & | v2 | ||
) |
bool mmx::binary_test_scalar | ( | const table< C, T, V > & | t, |
const X & | c | ||
) |
bool mmx::binary_test_scalar | ( | const vector< C, V > & | v, |
const X & | c | ||
) |
Definition at line 848 of file vector.hpp.
References is_a_scalar(), N(), vector< C, V >::scalar(), and seg().
{ typedef implementation<vector_linear,V> Vec; if (is_a_scalar (v)) return Op::op (v.scalar(), c); return Vec::template vec_binary_test_scalar<Op> (seg (v), c, N(v)); }
Definition at line 79 of file generic.cpp.
Referenced by binary_helper< generic >::access().
{
return g->binary_type ();
}
void binary_write | ( | const port & | out, |
const C & | x | ||
) |
Definition at line 226 of file port.hpp.
References void_binary_helper< C >::write().
Referenced by generic_concrete_rep< C >::binary_write().
{ binary_helper<C>::write (out, x); }
Definition at line 105 of file generic.cpp.
Referenced by GLUE_27(), and binary_helper< generic >::write().
{ g->binary_write (out); }
C mmx::binpow | ( | const C & | i, |
const nat & | n | ||
) |
static nat mmx::bit_size | ( | const C & | p | ) | [inline, static] |
Definition at line 826 of file generic.cpp.
References current_ev.
{ return current_ev->apply ("blur", x1, x2); }
Definition at line 1168 of file vector.hpp.
{
return binary_map_scalar<blur_op> (v, x); }
Definition at line 1171 of file vector.hpp.
{
return binary_map<blur_op> (v, w); }
C mmx::blur | ( | const C & | x, |
const D & | y | ||
) | [inline] |
Definition at line 705 of file defaults.hpp.
Referenced by blur_op::op(), and blur_op::set_op().
{
(void) y; return x; }
unary_return_type_helper<abs_op, C >::RET mmx::bnd_down | ( | const C & | x | ) | [inline] |
Definition at line 897 of file type_props.hpp.
{ return as<Abs_type(C) > (x); }
unary_return_type_helper<abs_op, C >::RET mmx::bnd_up | ( | const C & | x | ) | [inline] |
Definition at line 899 of file type_props.hpp.
{ return as<Abs_type(C) > (x); }
Definition at line 133 of file mmx_printer.cpp.
References gen().
Referenced by mmx_printer::pp_E0().
{ return gen ("$bracket", l, g, r); }
bool mmx::busy | ( | const iterator< C > & | it | ) | [inline] |
Referenced by join_iterator_rep< C >::advance(), append(), big(), binary_combine(), binary_map(), binary_map_scalar(), binary_test(), binary_test_scalar(), composite_port_rep::busy(), common(), copy(), join_iterator_rep< C >::current(), as_helper< table< D, T >, table< C, T > >::cv(), difference(), binary_helper< table< C, T, V > >::disassemble(), flatten(), GLUE_13(), heap< C >::heap(), lazy_iterator_rep< C, T >::is_busy(), join_iterator_rep< C >::is_busy(), as_iterator_rep< C, S >::is_busy(), list< cleaner >::list(), map(), raw_read(), REP_STRUCT_1(), unary_filter(), unary_hash(), unary_map(), unary_set(), unary_set_scalar(), vector< observer >::vector(), wait_port_event(), and binary_helper< table< C, T, V > >::write().
bool mmx::busy | ( | const port & | p | ) | [inline] |
void call_glue | ( | const string & | s | ) |
Definition at line 117 of file glue.cpp.
References contains(), ERROR, glue_table, and s.
Referenced by glue_compound(), glue_document(), glue_list_generic(), glue_list_map(), glue_literal(), glue_port(), glue_routine(), glue_string(), glue_table_generic(), glue_vector_generic(), and glue_vector_map().
{ if (! contains (glue_table (), s)) ERROR ("Can not find glued function " * s); (glue_table () [s]) (); }
nat mmx::can_read | ( | const port & | p | ) | [inline] |
Definition at line 103 of file port.hpp.
References inside().
Referenced by composite_port_rep::can_read(), GLUE_15(), composite_port_rep::read(), and var_load().
{ return inside (p)->can_read (); }
nat mmx::can_write | ( | const port & | p | ) | [inline] |
Definition at line 167 of file system.cpp.
References ends(), get_directory(), and N().
Referenced by path_name(), relative_name(), and resolve_name().
{ for (int i= N(name)-1; i>=0; i--) if (name[i] == '/') { nat j=i; while (j>0 && name[j-1] == '/') j--; string pre = canonical_name (name (0, j)); string post= name (i+1, N(name)); if (pre == "") return "/" * post; else if (pre == ".") return post; else if (post == ".") return pre; else if (ends (pre, "..") && post == "..") return pre * "/" * post; else if (post == "..") return get_directory (pre); else return pre * "/" * post; } return name; }
Definition at line 605 of file vector.hpp.
{ return v[0]; }
Definition at line 129 of file cpp_printer.cpp.
References N().
Definition at line 207 of file chain.hpp.
References ASSERT, is_nil(), left(), and middle().
Referenced by append(), as_vector(), contains(), copy(), as_helper< list< T >, list< F > >::cv(), binary_helper< list< C > >::disassemble(), find(), GLUE_11(), GLUE_12(), GLUE_13(), insert(), list_map_1(), list_map_2(), list_map_n(), map(), merge(), operator*(), range(), read_car(), set_as(), split(), and binary_helper< list< C > >::write().
Definition at line 46 of file generic_utils.cpp.
{
return g[0];
}
C mmx::catalan_cst | ( | ) | [inline] |
Definition at line 741 of file type_props.hpp.
References C, and set_catalan().
{ C r; set_catalan (r); return r; }
Definition at line 302 of file chain.hpp.
References ASSERT, balance_left(), Chain, is_nil(), left(), middle(), N(), and right().
Referenced by append(), routine_primitive_rep::apply(), arguments(), as_texmacs(), as_vector(), contains(), copy(), as_helper< list< T >, list< F > >::cv(), binary_helper< list< C > >::disassemble(), find(), flatten(), GLUE_12(), GLUE_13(), GLUE_14(), insert(), is_atom(), list_map(), list_map_1(), list_map_2(), list_map_n(), make_document(), map(), merge(), N(), operator*(), range(), read_cdr(), scheme_to_tm(), set_as(), split(), un_try_catch(), WRAP_INDIRECT_IMPL(), and binary_helper< list< C > >::write().
Definition at line 310 of file chain.hpp.
References ASSERT, balance_right(), Chain, is_nil(), left(), middle(), N(), and right().
Referenced by operator*().
Definition at line 51 of file generic_utils.cpp.
References compound_to_vector(), N(), range(), and vector_to_compound().
{ return vector_to_compound (range (compound_to_vector (g), 1, N(g))); }
double ceil | ( | const double & | x | ) | [inline] |
Definition at line 127 of file double.hpp.
Referenced by ceil_op::op(), and ceil_op::set_op().
{ return std::ceil (x); }
Definition at line 752 of file generic.cpp.
References current_ev, and GEN_CEIL.
{ return current_ev->apply (GEN_CEIL, x); }
Definition at line 434 of file syntactic.cpp.
References GEN_CENTER, and syn().
{ return syn (GEN_CENTER, g1); }
Definition at line 820 of file generic.cpp.
References current_ev.
Referenced by center_op::Center_type(), and center_op::set_op().
{ return current_ev->apply ("center", x1); }
C mmx::center | ( | const C & | x | ) | [inline] |
Definition at line 889 of file type_props.hpp.
{ return x; }
Definition at line 1158 of file vector.hpp.
{
return unary_map<center_op> (v); }
Definition at line 203 of file vector.hpp.
{ return v->tfm (); }
Definition at line 101 of file iterator.hpp.
Referenced by append(), big(), binary_map(), binary_map_scalar(), cons(), as_helper< vector< T, TV >, vector< F, FV > >::cv(), as_helper< iterator< C >, iterator< S > >::cv(), fast_helper< vector< C, V > >::dd(), dot(), extract(), extract_mod(), get_format(), insert(), map(), promote_scalar_helper< FT, F, T >::op(), range(), reverse(), set_as(), sort_leq(), unary_map(), fast_helper< vector< C, V > >::uu(), vector< observer >::vector(), and binary_helper< vector< C, V > >::write().
{ return it->tfm (); }
format<C1> mmx::CF1 | ( | const triple< C1, C2, C3 > & | t | ) | [inline] |
format<C1> mmx::CF1 | ( | const pair< C1, C2 > & | p | ) | [inline] |
Definition at line 40 of file pair.hpp.
References get_format().
Referenced by append(), binary_map(), binary_map_scalar(), common(), copy(), as_helper< table< D, T >, table< C, T > >::cv(), difference(), unary_map(), and binary_helper< table< C, T, V > >::write().
{ return get_format (p.x2); }
Definition at line 761 of file generic.cpp.
References current_ev, and GEN_CHANGE_PRECISION.
Referenced by change_precision_op::op(), and change_precision_op::set_op().
{ return current_ev->apply (GEN_CHANGE_PRECISION, x, as<generic> ((int) p)); }
Definition at line 1139 of file vector.hpp.
{
return binary_map_scalar<change_precision_op> (v, p); }
Definition at line 201 of file routine.cpp.
Referenced by define_user_type().
{ return new change_signature_routine_rep (r, sig); }
void mmx::clear | ( | C & | x | ) | [inline] |
Definition at line 236 of file defaults.hpp.
References promote().
Referenced by clear_op::set_op().
{ x= promote (0, x); }
void mmx::close_alias | ( | const alias< C > & | a | ) | [inline] |
Definition at line 58 of file alias.hpp.
Referenced by alias_binary_access_rep< C, R, A, B >::close(), and alias_unary_access_rep< C, R, A >::close().
{ a->close (); }
Definition at line 747 of file mmx_printer.cpp.
References collect(), GEN_MINUS, GEN_PLUS, is_func(), and N().
{ vector<generic> v; collect (v, g, 0); vector<generic> w; for (nat i=0; i<N(v); i++) if (is_func (v[i], GEN_PLUS, 2) || is_func (v[i], GEN_MINUS, 2)) w << collect (v[i]); else w << v[i]; return w; }
generic comma | ( | ) |
Definition at line 169 of file generic.cpp.
References gen(), and GEN_COMMA.
Referenced by trig_op::op(), trig(), and xaccess().
C mmx::common_part | ( | const C & | x, |
const C & | y | ||
) | [inline] |
Definition at line 731 of file defaults.hpp.
References promote().
Referenced by common_part_op::op().
{ if (x == y) return x; else return promote (0, x); }
int mmx::compare | ( | const C & | x, |
const C & | y | ||
) | [inline] |
Definition at line 485 of file defaults.hpp.
References sign().
Referenced by big_small_compare(), compare_sub(), and small_big_compare().
{ return sign (x-y); }
Definition at line 162 of file generic_utils.cpp.
References compare_N(), compare_P(), and MEMOIZE_BINARY.
{ // NOTE: the splitting into two cases should not be necessary. // We do it in order to avoid an internal compiler error... if (dir < 0) { MEMOIZE_BINARY (std_memoizer,int,generic,generic,compare_N,g1,g2, compare_N (g1, g2)); } else { MEMOIZE_BINARY (std_memoizer,int,generic,generic,compare_P,g1,g2, compare_P (g1, g2)); } }
mmx::COMPARE_INT_SUGAR | ( | template< typename C, typename V > | , |
vector< C, V > | |||
) |
Definition at line 156 of file generic_utils.cpp.
References compare_sub().
Referenced by compare().
{ return compare_sub (g1, g2, -1); }
Definition at line 158 of file generic_utils.cpp.
References compare_sub().
Referenced by compare().
{ return compare_sub (g1, g2, 1); }
static int mmx::compare_sub | ( | const generic & | g1, |
const generic & | g2, | ||
const int & | direction | ||
) | [static] |
Definition at line 127 of file generic_utils.cpp.
References compare(), compare_numeric(), is_numeric(), literal_to_string(), N(), size(), and var_flatten().
Referenced by compare_N(), and compare_P().
{ nat s1= size (g1), s2= size (g2); if (s1 < s2) return -direction; if (s1 > s2) return direction; if (is<literal> (g1) && is<literal> (g2)) { string l1= literal_to_string (g1), l2= literal_to_string (g2); if (is_numeric (l1) && !is_numeric (l2)) return -direction; if (is_numeric (l2) && !is_numeric (l1)) return direction; if (is_numeric (l1) && is_numeric (l2)) return direction * compare_numeric (l1, l2); if (l1 < l2) return -1; if (l1 > l2) return 1; return 0; } if (is<literal> (g1) && is<compound> (g2)) return -direction; if (is<compound> (g1) && is<literal> (g2)) return direction; if (is<compound> (g1) && is<compound> (g2)) { nat i, n1= N (g1), n2= N (g2); if (n1 < n2) return -direction; if (n1 > n2) return direction; for (i=0; i<n1; i++) { int c= compare (g1[i], g2[i], direction); if (c != 0) return c; } return 0; } return compare (var_flatten (g1), var_flatten (g2), direction); }
port component | ( | const port & | p, |
const string & | name | ||
) |
Definition at line 86 of file syntactic.cpp.
References N().
Referenced by arguments().
{ vector<syntactic> v= fill<syntactic> (N(g)); for (nat i=0; i<N(g); i++) v[i]= g[i]; return v; }
Definition at line 697 of file generic.cpp.
References current_ev, and GEN_COMPOSE.
Referenced by compose(), reverse_op::diff_op(), compose_op::diff_op(), compose_op::op(), and compose_op::set_op().
{ return current_ev->apply (GEN_COMPOSE, x1, x2); }
Definition at line 166 of file routine.cpp.
References exact_eq(), exact_neq(), GEN_IDENTITY, and N().
{ // WARNING: the signature of the result is not necessarily correct // when simplifying with "fake identity functions", but that does not // matter for the application to overloading if (exact_eq (fun->name, GEN_IDENTITY) && N(args) == 1) return args [0]; for (nat i=0; i<N(args); i++) { if (exact_neq (args[i]->name, GEN_IDENTITY)) return new composed_routine_rep (fun, args); } return fun; }
Definition at line 135 of file composite_port.cpp.
References as_string(), N(), and n.
Referenced by GLUE_7(), and pipe_port().
{ nat i, n= N(ps); vector<string> names= fill<string> (n); for (i=0; i<n; i++) names[i]= as_string (i); return composite_port (ps, names); }
Definition at line 129 of file composite_port.cpp.
{ ASSERT (N(ps) == N(names), "lengths do not match"); return (port_rep*) new composite_port_rep (ps, names); }
Definition at line 17 of file compound.cpp.
References as_vector().
Referenced by add_modes(), append(), routine_primitive_rep::apply(), as_texmacs(), cdr(), concat_append(), cons(), flatten(), list_map(), make_document(), range(), scheme_to_tm(), texmacs_to_scheme(), un_try_catch(), vector_map(), and WRAP_INDIRECT_IMPL().
{ return as_vector (as<compound> (g)); }
Definition at line 116 of file mmx_printer.cpp.
References gen().
Referenced by print_mmx().
{ return gen ("$concat", v); }
generic mmx::concat | ( | ) | [inline] |
Definition at line 120 of file mmx_printer.cpp.
References gen().
{ return gen ("$concat", g1, g2); }
generic mmx::concat | ( | const generic & | g1, |
const generic & | g2, | ||
const generic & | g3, | ||
const generic & | g4 | ||
) | [inline] |
Definition at line 125 of file mmx_printer.cpp.
References gen().
{ return gen ("$concat", g1, g2, g3, g4); }
Definition at line 122 of file mmx_printer.cpp.
References gen().
{ return gen ("$concat", g1, g2, g3); }
Definition at line 221 of file mmx_texmacs.cpp.
References compound_to_vector(), gen(), is_func(), literal_to_string(), and N().
Referenced by as_texmacs().
{ if (g == ""); else if (is_func (g, "$concat")) { vector<generic> w= compound_to_vector (g); for (nat i=1; i<N(w); i++) concat_append (v, w[i]); } else if (N(v) == 0) v << g; else if (is<literal> (v[N(v)-1]) && is<literal> (g)) v[N(v)-1]= generic (literal_to_string (v[N(v)-1]) * literal_to_string (g)); else if (is_func (v[N(v)-1], "$lprime", 1) && is_func (g, "$lprime", 1)) { generic p (literal_to_string (v[N(v)-1][1]) * literal_to_string (g[1])); v[N(v)-1]= gen ("$lprime", p); } else if (is_func (v[N(v)-1], "$rprime", 1) && is_func (g, "$rprime", 1)) { generic p (literal_to_string (v[N(v)-1][1]) * literal_to_string (g[1])); v[N(v)-1]= gen ("$rprime", p); } else v << g; }
Definition at line 288 of file vector.hpp.
{
return conc->make_concrete_vector (as<generic> (abst));
}
Definition at line 737 of file generic.cpp.
References current_ev, and GEN_CONJ.
{ return current_ev->apply (GEN_CONJ, x1); }
Definition at line 1156 of file vector.hpp.
{ return unary_map<conj_op> (v); }
C mmx::conj | ( | const C & | x | ) | [inline] |
Definition at line 714 of file defaults.hpp.
Referenced by conj_op::op(), and conj_op::set_op().
{ return x; }
Definition at line 40 of file generic_utils.cpp.
References append(), compound_to_vector(), and vector_to_compound().
{ return vector_to_compound (append (vec<generic> (g1, g2), compound_to_vector (g3))); }
Definition at line 35 of file generic_utils.cpp.
References compound_to_vector(), and vector_to_compound().
Referenced by append(), apply(), default_routine_rep::apply(), binary_helper< list< C > >::assemble(), bigop(), copy(), as_helper< list< T >, list< F > >::cv(), gen(), GLUE_10(), GLUE_11(), GLUE_12(), insert(), list_map_1(), list_map_2(), list_map_n(), map(), merge(), range(), binary_helper< list< C > >::read(), reverse(), select_evaluator(), set_as(), and split().
{ return vector_to_compound (cons (g1, compound_to_vector (g2))); }
generic construct | ( | const int & | i | ) |
Definition at line 194 of file generic.cpp.
References current_ev.
Referenced by generic_concrete_rep< C >::acc_construct(), as_generic(), and accelerator< C >::set_construct().
{ return current_ev->construct (as<generic> (i)); }
Definition at line 199 of file generic.cpp.
References current_ev.
{ return current_ev->construct (as<generic> ((int) i)); }
generic construct | ( | const double & | x | ) |
Definition at line 204 of file generic.cpp.
References current_ev.
{ return current_ev->construct (as<generic> (x)); }
Definition at line 214 of file generic.cpp.
References current_ev.
{ return current_ev->construct (x); }
generic construct | ( | const float & | x | ) |
Definition at line 209 of file generic.cpp.
References current_ev.
{ return current_ev->construct (as<generic> ((double) x)); }
bool mmx::contains | ( | const table< C, T, V > & | t, |
const T & | x | ||
) | [inline] |
bool mmx::contains | ( | const table< C, T, V > & | t, |
const K & | x | ||
) | [inline] |
bool mmx::contains | ( | const vector< C, V > & | v, |
const C & | x | ||
) |
bool mmx::contains | ( | const list< C > & | l, |
const C & | x | ||
) |
Definition at line 326 of file list.hpp.
References car(), cdr(), and is_nil().
Referenced by as_texmacs(), call_glue(), dl_link(), GLUE_10(), GLUE_17(), GLUE_18(), GLUE_19(), GLUE_5(), insert(), new_type_id(), REP_STRUCT_2(), serialize(), and source_locate().
Definition at line 285 of file generic.cpp.
References current_ev, GEN_CONVERT, is_nil(), same_type(), and type_name().
{ if (same_type (from, to)) return from; routine* cv= to->acc_construct (from->acc_id ()); if (cv != NULL && !is_nil (*cv)) return (*cv) (from); return current_ev->apply (GEN_CONVERT, from, type_name (to)); }
C mmx::copy | ( | const C & | x | ) |
Definition at line 152 of file basix.hpp.
Referenced by add_modes(), append(), binary_test(), lazy_iterator_rep< C, T >::clone(), join_iterator_rep< C >::clone(), composed_routine_rep::composed_routine_rep(), cons(), duplicate(), inside_append(), locase_first(), copy_op::op(), vector< C, V >::operator<<(), ordered_product(), ordered_sum(), range(), REP_STRUCT_1(), copy_op::set_op(), unary_hash(), upcase_first(), vector< observer >::vector(), vector_sort(), vector_sort_leq(), and binary_helper< heap< C > >::write().
{ assert (false); // object should really be copied before access return x; }
char mmx::copy | ( | char | c | ) | [inline] |
Definition at line 219 of file defaults.hpp.
{ return c; }
signed char mmx::copy | ( | signed char | c | ) | [inline] |
Definition at line 220 of file defaults.hpp.
{ return c; }
unsigned char mmx::copy | ( | unsigned char | c | ) | [inline] |
Definition at line 221 of file defaults.hpp.
{ return c; }
short int mmx::copy | ( | short int | c | ) | [inline] |
Definition at line 222 of file defaults.hpp.
{ return c; }
short unsigned int mmx::copy | ( | short unsigned int | c | ) | [inline] |
Definition at line 223 of file defaults.hpp.
{ return c; }
int mmx::copy | ( | int | c | ) | [inline] |
Definition at line 224 of file defaults.hpp.
{ return c; }
long int mmx::copy | ( | long int | c | ) | [inline] |
Definition at line 226 of file defaults.hpp.
{ return c; }
unsigned int mmx::copy | ( | unsigned int | c | ) | [inline] |
Definition at line 225 of file defaults.hpp.
{ return c; }
long unsigned int mmx::copy | ( | long unsigned int | c | ) | [inline] |
Definition at line 227 of file defaults.hpp.
{ return c; }
long long unsigned int mmx::copy | ( | long long unsigned int | c | ) | [inline] |
Definition at line 229 of file defaults.hpp.
{ return c; }
float mmx::copy | ( | float | c | ) | [inline] |
Definition at line 231 of file defaults.hpp.
{ return c; }
long long int mmx::copy | ( | long long int | c | ) | [inline] |
Definition at line 228 of file defaults.hpp.
{ return c; }
double mmx::copy | ( | double | c | ) | [inline] |
Definition at line 232 of file defaults.hpp.
{ return c; }
void* mmx::copy | ( | C * | p | ) | [inline] |
Definition at line 234 of file defaults.hpp.
{ return p; }
Definition at line 970 of file vector.hpp.
{
return unary_map<id_op> (v); }
Definition at line 100 of file iterator.hpp.
{ return it.rep->clone (); }
Definition at line 444 of file generic.cpp.
References ACC_COS, ACC_UNARY, current_ev, and GEN_COS.
{ ACC_UNARY (ACC_COS, x1); return current_ev->apply (GEN_COS, x1); }
double cos | ( | const double & | x | ) | [inline] |
Definition at line 48 of file double.hpp.
Referenced by cos_sin(), tan_op::diff_op(), sin_op::diff_op(), GLUE_37(), cos_op::op(), trig_op::op(), cos_op::op_init(), cos_op::set_op(), and trig().
{ return std::cos (x); }
Definition at line 1085 of file vector.hpp.
{ return unary_map<cos_op> (v); }
Definition at line 1218 of file vector.hpp.
References cos(), sin(), and vec().
Referenced by tan_op::def(), sin_op::def(), and cos_op::def().
double cosh | ( | const double & | x | ) | [inline] |
C mmx::cosh | ( | const C & | x | ) | [inline] |
Definition at line 587 of file defaults.hpp.
References exp(), and promote().
Referenced by cosh(), tanh_op::diff_op(), sinh_op::diff_op(), cosh_op::op(), cosh_op::op_init(), and cosh_op::set_op().
generic mmx::CPP_ACCESS | ( | "." | [] | ) |
generic mmx::CPP_AND | ( | "and" | ) |
generic mmx::CPP_APPLY | ( | ".()" | ) |
generic mmx::CPP_ARROW | ( | "->" | ) |
generic mmx::CPP_BEGIN | ( | "begin" | ) |
generic mmx::CPP_BITWISE_AND | ( | "/\\" | ) |
generic mmx::CPP_BITWISE_OR | ( | "\\/" | ) |
generic mmx::CPP_BITWISE_XOR | ( | "xor" | ) |
generic mmx::CPP_BRACKETS | ( | "()" | ) |
generic mmx::CPP_BREAK | ( | "break" | ) |
generic mmx::CPP_CAST | ( | ": | , |
" | |||
) |
generic mmx::CPP_CATCH | ( | "catch" | ) |
generic mmx::CPP_COMPLEMENT | ( | "~" | ) |
generic mmx::CPP_CONST | ( | "const" | ) |
generic mmx::CPP_CONSTRUCT | ( | "construct" | ) |
generic mmx::CPP_CONSTRUCTOR | ( | "constructor" | ) |
generic mmx::CPP_CONTINUE | ( | "continue" | ) |
generic mmx::CPP_DEFINE | ( | ) |
generic mmx::CPP_DELETE | ( | "delete" | ) |
string cpp_demangle | ( | const char * | name | ) |
generic mmx::CPP_DESTRUCTOR | ( | "destructor" | ) |
generic mmx::CPP_DO | ( | "do" | ) |
generic mmx::CPP_DOT | ( | "." | ) |
generic mmx::CPP_ELSE | ( | "else" | ) |
generic mmx::CPP_EXIT | ( | "exit" | ) |
generic mmx::CPP_EXTERN | ( | "extern" | ) |
generic mmx::CPP_FOR | ( | "for" | ) |
generic mmx::CPP_GTR | ( | " | , |
" | |||
) |
generic mmx::CPP_GTREQ | ( | ">=" | ) |
generic mmx::CPP_GTRGTR | ( | ">>" | ) |
generic mmx::CPP_GTRGTREQ | ( | ) |
Referenced by opname_table().
generic mmx::CPP_IF | ( | "if" | ) |
generic mmx::CPP_INHERIT | ( | "inherit" | ) |
generic mmx::CPP_INITIALIZE | ( | "initialize" | ) |
generic mmx::CPP_INLINE | ( | "inline" | ) |
generic mmx::CPP_LESS | ( | ) |
generic mmx::CPP_LESSEQ | ( | "<=" | ) |
generic mmx::CPP_LESSLESS | ( | "<<" | ) |
generic mmx::CPP_LESSLESSEQ | ( | ) |
Referenced by opname_table().
generic mmx::CPP_MINUS | ( | "-" | ) |
generic mmx::CPP_MOD | ( | "%" | ) |
generic mmx::CPP_NAMESPACE | ( | "namespace" | ) |
generic mmx::CPP_NEW | ( | "new" | ) |
generic mmx::CPP_NOT | ( | "!" | ) |
generic mmx::CPP_OR | ( | "or" | ) |
generic mmx::CPP_OVER | ( | "/" | ) |
generic mmx::CPP_PLUS | ( | "+" | ) |
generic mmx::CPP_POSTDEC | ( | ".--" | ) |
generic mmx::CPP_POSTINC | ( | ".++" | ) |
generic mmx::CPP_PREDEC | ( | "--." | ) |
generic mmx::CPP_PREINC | ( | "++." | ) |
generic mmx::CPP_PUBLIC | ( | "public" | ) |
generic mmx::CPP_RETURN | ( | "return" | ) |
generic mmx::CPP_SCOPE | ( | "::" | ) |
generic mmx::CPP_SPECIALIZE | ( | "specialize" | ) |
generic mmx::CPP_STATIC | ( | "static" | ) |
generic mmx::CPP_STRUCT | ( | "struct" | ) |
generic mmx::CPP_SWITCH | ( | "switch" | ) |
generic mmx::CPP_TEMPLATE | ( | "template" | ) |
generic mmx::CPP_THROW | ( | "raise" | ) |
generic mmx::CPP_TIMES | ( | "*" | ) |
generic mmx::CPP_TRY | ( | "try" | ) |
generic mmx::CPP_TYPE | ( | ":" | ) |
generic mmx::CPP_TYPEDEF | ( | "typedef" | ) |
generic mmx::CPP_UNALIAS | ( | "unalias" | ) |
generic mmx::CPP_UNFUNCTION | ( | "unfunction" | ) |
generic mmx::CPP_UNPOINTER | ( | "unpointer" | ) |
generic mmx::CPP_USING | ( | "using" | ) |
generic mmx::CPP_VERBATIM | ( | "verbatim" | ) |
generic mmx::CPP_VIRTUAL | ( | "virtual" | ) |
generic mmx::CPP_WHILE | ( | "while" | ) |
generic mmx::CPP_XOR | ( | "^^" | ) |
double decexp2 | ( | const double & | x, |
const S & | y | ||
) | [inline] |
Definition at line 107 of file double.hpp.
{ return ldexp (x, -y); }
double decexp2 | ( | const double & | x | ) | [inline] |
Definition at line 109 of file double.hpp.
{ return ldexp (x, -1); }
void decexp2 | ( | double & | x, |
const double & | y, | ||
const S & | z | ||
) | [inline] |
Definition at line 113 of file double.hpp.
{ x= ldexp (y, -z); }
Definition at line 790 of file generic.cpp.
References current_ev.
{ return current_ev->apply ("decrease_exponent", x1, as<generic> ((int) x2)); }
C mmx::decexp2 | ( | const C & | x | ) | [inline] |
Definition at line 403 of file defaults.hpp.
{ return decexp2<C,xint> (x, 1); }
void mmx::decexp2 | ( | C & | x, |
const C & | y, | ||
const S & | z | ||
) | [inline] |
Definition at line 407 of file defaults.hpp.
{ x= y >> z; }
C mmx::decexp2 | ( | const C & | x, |
const S & | y | ||
) | [inline] |
Definition at line 401 of file defaults.hpp.
Referenced by GLUE_44(), decexp2_op::op(), decexp2_op::set_op(), and make_interval_helper< B, C >::val().
{ return x >> y; }
void decexp2_assign | ( | double & | x, |
const S & | y | ||
) | [inline] |
Definition at line 111 of file double.hpp.
{ x= ldexp (x, -y); }
void mmx::decexp2_assign | ( | C & | x, |
const S & | y | ||
) | [inline] |
Definition at line 141 of file system.cpp.
References get_env(), N(), and starts().
Referenced by file_exists(), follow_link(), input_file_port(), input_output_file_port(), load(), load_directory(), mkdir(), output_file_port(), and save().
{ if (name == "~") return get_env ("HOME"); if (starts (name, "~/")) return get_env ("HOME") * "/" * name (2, N(name)); if (starts (name, "$")) { nat i; for (i=0; i<N(name); i++) if (name[i] == '/') break; string r= get_env (name (1, i)); if (i == N(name)) return r; return r * "/" * name (i+1, N(name)); } return name; }
nat mmx::default_aligned_size | ( | nat | n | ) | [inline] |
Definition at line 218 of file routine.cpp.
References as(), get_alias(), and is().
Referenced by list_apply(), list_map(), list_sort(), vector_apply(), vector_map(), and vector_sort_leq().
{ if (is<routine> (name)) return as<routine> (name); if (is<alias<routine> > (name)) return get_alias (as<alias<routine> > (name)); return new default_routine_rep (name); }
void mmx::define | ( | const generic & | name, |
D(*)() | fun | ||
) | [inline] |
Definition at line 185 of file glue.hpp.
References current_ev, and nullary_routine().
Referenced by define_type_helper< C >::def_type(), glue_compound(), glue_document(), glue_double(), glue_dynamic(), glue_int(), glue_list_generic(), glue_list_map(), glue_literal(), glue_port(), glue_routine(), glue_string(), glue_syntactic(), glue_table_generic(), glue_vector_generic(), and glue_vector_map().
{ current_ev->overload (name, as<generic> (nullary_routine (name, fun))); }
void mmx::define | ( | const generic & | name, |
D(*)(const S1 &) | fun | ||
) | [inline] |
Definition at line 190 of file glue.hpp.
References accelerate(), current_ev, and unary_routine().
{ current_ev->overload (name, as<generic> (unary_routine (name, fun))); accelerate (name, fun); }
void mmx::define | ( | const generic & | name, |
D(*)(const S1 &, const S2 &) | fun | ||
) | [inline] |
Definition at line 196 of file glue.hpp.
References accelerate(), binary_routine(), and current_ev.
{ current_ev->overload (name, as<generic> (binary_routine (name, fun))); accelerate (name, fun); }
void mmx::define | ( | const generic & | name, |
D(*)(const S1 &, const S2 &, const S3 &, const S4 &) | fun | ||
) | [inline] |
Definition at line 209 of file glue.hpp.
References current_ev, and quaternary_routine().
{ current_ev->overload (name, as<generic> (quaternary_routine (name, fun))); }
void mmx::define | ( | const generic & | name, |
D(*)(const S1 &, const S2 &, const S3 &, const S4 &, const S5 &) | fun | ||
) | [inline] |
Definition at line 217 of file glue.hpp.
References current_ev, and quintary_routine().
{ current_ev->overload (name, as<generic> (quintary_routine (name, fun))); }
void mmx::define | ( | const generic & | name, |
D(*)(const S1 &, const S2 &, const S3 &) | fun | ||
) | [inline] |
Definition at line 203 of file glue.hpp.
References current_ev, and ternary_routine().
{ current_ev->overload (name, as<generic> (ternary_routine (name, fun))); }
mmx::DEFINE_BINARY_FORMAT_2 | ( | pair | ) |
void mmx::define_constant | ( | const generic & | name, |
const D & | x | ||
) | [inline] |
Definition at line 170 of file glue.hpp.
References current_ev.
{ current_ev->set (name, as<generic> (x)); }
void mmx::define_constructor | ( | generic(*)(const D &) | fun | ) | [inline] |
Definition at line 175 of file glue.hpp.
References current_ev, GEN_NEW, and unary_routine().
{ current_ev->overload (GEN_NEW, as<generic> (unary_routine (GEN_NEW, fun))); }
Definition at line 223 of file glue.hpp.
References accelerate_converter(), current_ev, gen(), GEN_INTO, and unary_routine().
Referenced by glue_document(), glue_double(), glue_list_generic(), glue_routine(), glue_table_generic(), and glue_vector_generic().
{ generic con= gen (GEN_INTO, type_name<S1> (), type_name<C> ()); routine fun= unary_routine (con, f); current_ev->overload (name, as<generic> (fun), p); accelerate_converter (name, f); }
void define_prerequisites | ( | ) |
Definition at line 39 of file glue.cpp.
References fall_back_equal(), fall_back_unequal(), GEN_BOOLEAN_TYPE, GEN_COMPOUND_TYPE, GEN_DOUBLE_TYPE, GEN_EQUAL, GEN_FALSE, GEN_GENERIC_TYPE, GEN_INT_TYPE, GEN_LITERAL_TYPE, GEN_MACRO_TYPE, GEN_ROUTINE_TYPE, GEN_TRUE, and GEN_UNEQUAL.
{ define_type<generic> (GEN_GENERIC_TYPE); define_type<bool> (GEN_BOOLEAN_TYPE); define_type<int> (GEN_INT_TYPE); define_type<double> (GEN_DOUBLE_TYPE); define_type<literal> (GEN_LITERAL_TYPE); define_type<compound> (GEN_COMPOUND_TYPE); define_type<routine> (GEN_ROUTINE_TYPE); define_type<primitive> (GEN_MACRO_TYPE); define_constant<bool> (GEN_FALSE, false); define_constant<bool> (GEN_TRUE, true); define<bool,generic,generic> (GEN_EQUAL, fall_back_equal); define<bool,generic,generic> (GEN_UNEQUAL, fall_back_unequal); }
Definition at line 180 of file glue.hpp.
References current_ev.
{ current_ev->set (name, as<generic> (primitive (name, fun))); }
mmx::DEFINE_TERNARY_FORMAT_3 | ( | triple | ) |
void mmx::define_type | ( | const generic & | name | ) | [inline] |
Definition at line 292 of file glue.hpp.
References define_type_helper< C >::def_default(), and define_type_helper< C >::def_type().
{ define_type_helper<C>::def_type (name); define_type_helper<C>::def_default (); }
Definition at line 67 of file glue.cpp.
References all_type_names(), current_ev, gen(), GEN_ALL_TYPES, GEN_TYPE_ID, GEN_TYPE_NAME, is_alias_type(), and is_tuple_type().
Referenced by define_type_helper< C >::def_type(), and define_user_type().
{ current_ev->set (gen (GEN_TYPE_NAME, as<generic> (id)), name); current_ev->set (gen (GEN_TYPE_ID, name), as<generic> (id)); if (!is_tuple_type (id) && !is_alias_type (id)) { vector<generic> all_types= all_type_names (); all_types << name; current_ev->set (gen (GEN_ALL_TYPES), as<generic> (all_types)); } }
mmx::DEFINE_UNARY_FORMAT_1 | ( | chain | ) | const |
mmx::DEFINE_UNARY_FORMAT_1 | ( | list | ) | const |
Definition at line 104 of file generic_object.cpp.
References alias_getter(), alias_setter(), alias_specializer(), binary_routine(), change_signature(), current_ev, define_type_sub(), gen(), GEN_ALIAS, GEN_ALIAS_TYPE, GEN_EQUAL, GEN_FLATTEN, GEN_GENERIC_TYPE, GEN_INTO, GEN_REWRITE, GEN_SPECIALIZE, GEN_UNALIAS, GEN_UNEQUAL, new_alias_type_id(), new_type_id(), object_alias(), object_equal(), object_flatten(), object_generalize_alias(), object_get_alias(), object_set_alias(), object_specialize_alias(), object_unequal(), PENALTY_INCLUSION, and unary_routine().
Referenced by get_user_type().
{ nat id= new_type_id (); nat alias_id= new_alias_type_id (id); // nat tuple_id= new_tuple_type_id (id); define_type_sub (name, id); define_type_sub (gen (GEN_ALIAS_TYPE, name), alias_id); // define_type_sub (gen (GEN_TUPLE_TYPE, name), tuple_id); { vector<nat> sig= vec<nat> (alias_id, id); routine r = unary_routine (GEN_ALIAS, object_alias); routine r2= change_signature (r, sig); current_ev->overload (GEN_ALIAS, as<generic> (r2), PENALTY_INCLUSION); } { vector<nat> sig= vec<nat> (id, alias_id); routine r = unary_routine (GEN_UNALIAS, object_get_alias); routine r2= change_signature (r, sig); alias_getter (alias_id, r2); } { vector<nat> sig= vec<nat> (id, alias_id, id); routine r = binary_routine (GEN_UNALIAS, object_set_alias); routine r2= change_signature (r, sig); alias_setter (alias_id, r2); } { vector<nat> sig= vec<nat> (alias_id, type_id<alias<generic> > ()); routine r = unary_routine (GEN_SPECIALIZE, object_specialize_alias); routine r2= change_signature (r, sig); alias_specializer (id, r2); } { vector<nat> sig= vec<nat> (id, alias_id); generic cv= gen (GEN_INTO, name, gen (GEN_ALIAS_TYPE, name)); routine r = unary_routine (cv, object_get_alias); routine r2= change_signature (r, sig); current_ev->overload (GEN_REWRITE, as<generic> (r2), PENALTY_INCLUSION); } { vector<nat> sig= vec<nat> (type_id<alias<generic> > (), alias_id); generic cv= gen (GEN_INTO, gen (GEN_ALIAS_TYPE, GEN_GENERIC_TYPE), gen (GEN_ALIAS_TYPE, name)); routine r = unary_routine (cv, object_generalize_alias); routine r2= change_signature (r, sig); current_ev->overload (GEN_REWRITE, as<generic> (r2), PENALTY_INCLUSION); } { vector<nat> sig= vec<nat> (type_id<bool> (), id, id); routine r = binary_routine (GEN_EQUAL, object_equal); routine r2= change_signature (r, sig); current_ev->overload (GEN_EQUAL, as<generic> (r2), PENALTY_INCLUSION); } { vector<nat> sig= vec<nat> (type_id<bool> (), id, id); routine r = binary_routine (GEN_UNEQUAL, object_unequal); routine r2= change_signature (r, sig); current_ev->overload (GEN_UNEQUAL, as<generic> (r2), PENALTY_INCLUSION); } { vector<nat> sig= vec<nat> (type_id<syntactic> (), id); routine r = unary_routine (GEN_FLATTEN, object_flatten); routine r2= change_signature (r, sig); current_ev->overload (GEN_FLATTEN, as<generic> (r2), PENALTY_INCLUSION); } return id; }
Definition at line 714 of file generic.cpp.
References current_ev, and GEN_DENOMINATOR.
Referenced by denominator_op::Denominator_type(), denominator_op::op(), and denominator_op::set_op().
{ return current_ev->apply (GEN_DENOMINATOR, x); }
Definition at line 438 of file syntactic.cpp.
References GEN_DENOMINATOR, and syn().
{ return syn (GEN_DENOMINATOR, g1); }
Definition at line 669 of file generic.cpp.
References ACC_DERIVE, ACC_UNARY, current_ev, and GEN_CACHED_DERIVE.
{ ACC_UNARY (ACC_DERIVE, x1); return current_ev->apply (GEN_CACHED_DERIVE, x1); }
Definition at line 681 of file generic.cpp.
References ACC_BINARY_SCALAR, ACC_DERIVE_WRT, current_ev, derive(), GEN_CACHED_DERIVE, and MEMOIZE_BINARY.
{ ACC_BINARY_SCALAR (ACC_DERIVE_WRT, x1, v); MEMOIZE_BINARY (std_memoizer,generic,generic,generic,derive,x1,v, current_ev->apply (GEN_CACHED_DERIVE, x1, v)); }
Definition at line 450 of file syntactic.cpp.
References GEN_DERIVE, and syn().
{ return syn (GEN_DERIVE, g); }
Definition at line 452 of file syntactic.cpp.
References GEN_DERIVE, and syn().
{ return syn (GEN_DERIVE, g, v); }
Definition at line 1099 of file vector.hpp.
{
return unary_map<derive_op> (v); }
Definition at line 1104 of file vector.hpp.
{
return binary_map_scalar<derive_op> (v, x); }
T mmx::derive | ( | const T & | f, |
const V & | v, | ||
nat | n | ||
) |
Definition at line 721 of file defaults.hpp.
Referenced by sqrt_op::def(), derive(), trig_op::diff_op(), reverse_op::diff_op(), compose_op::diff_op(), atanh_op::diff_op(), asinh_op::diff_op(), acosh_op::diff_op(), tanh_op::diff_op(), sinh_op::diff_op(), cosh_op::diff_op(), atan_op::diff_op(), asin_op::diff_op(), acos_op::diff_op(), tan_op::diff_op(), sin_op::diff_op(), cos_op::diff_op(), log_op::diff_op(), exp_op::diff_op(), sqrt_op::diff_op(), ldiv_op::diff_op(), rdiv_op::diff_op(), div_op::diff_op(), invert_op::diff_op(), square_op::diff_op(), lmul_op::diff_op(), rmul_op::diff_op(), mul_op::diff_op(), sub_op::diff_op(), add_op::diff_op(), neg_op::diff_op(), GLUE_43(), derive_op::op(), and derive_op::set_op().
void destroy | ( | const updater & | u | ) |
Definition at line 208 of file dynamic.cpp.
References detach(), inside(), and N().
Referenced by result_observer_rep::destroy(), INDIRECT_IMPL(), and dynamic_rep::~dynamic_rep().
{ for (nat i=0; i<N(u->obs); i++) detach (u->obs[i]); inside (u) -> args = vector<dynamic> (); inside (u) -> obs = vector<observer> (); }
void mmx::detach | ( | const observer & | o | ) |
Definition at line 699 of file generic.cpp.
References current_ev.
{ return current_ev->apply ("dilate", x1, x2); }
void mmx::div | ( | R & | x, |
const C1 & | y1, | ||
const C2 & | y2 | ||
) | [inline] |
Definition at line 58 of file operators.hpp.
Referenced by ldiv_op::set_op(), rdiv_op::set_op(), and div_op::set_op().
{ x= y1 / y2; }
T mmx::div_operator | ( | const T & | x, |
const T & | y | ||
) |
Definition at line 32 of file operators.hpp.
{ return x/y; }
bool mmx::divides | ( | const signed char & | n, |
const signed char & | m | ||
) | [inline] |
bool mmx::divides | ( | const short int & | n, |
const short int & | m | ||
) | [inline] |
bool mmx::divides | ( | const int & | n, |
const int & | m | ||
) | [inline] |
bool mmx::divides | ( | const long int & | n, |
const long int & | m | ||
) | [inline] |
bool mmx::divides | ( | const long long int & | n, |
const long long int & | m | ||
) | [inline] |
bool mmx::divides | ( | const unsigned char & | n, |
const unsigned char & | m | ||
) | [inline] |
bool mmx::divides | ( | const unsigned short int & | n, |
const unsigned short int & | m | ||
) | [inline] |
bool mmx::divides | ( | const unsigned int & | n, |
const unsigned int & | m | ||
) | [inline] |
bool mmx::divides | ( | const unsigned long long int & | n, |
const unsigned long long int & | m | ||
) | [inline] |
bool mmx::divides | ( | const unsigned long int & | n, |
const unsigned long int & | m | ||
) | [inline] |
bool dl_exists | ( | const string & | name | ) |
Definition at line 38 of file dlink.cpp.
References path_name(), and prefix_dir().
Referenced by dl_exists(), and dl_link().
{ string lib; string pdir = prefix_dir () * "/lib"; lib= path_name ("$LTDL_LIBRARY_PATH:$LD_LIBRARY_PATH:$DYLD_LIBRARY_PATH:" * pdir, "libmmx" * name * ".la"); if (lib != "") return lib; lib= path_name ("$LTDL_LIBRARY_PATH:$LD_LIBRARY_PATH:$MMX_LOAD_PATH:" * pdir, "libmmx" * name * ".so"); if (lib != "") return lib; lib= path_name ("$LTDL_LIBRARY_PATH:$DYLD_LIBRARY_PATH:$MMX_LOAD_PATH:" * pdir, "libmmx" * name * ".dylib"); if (lib != "") return lib; lib= path_name ("$LD_LIBRARY_PATH:$MMX_LOAD_PATH:" * pdir, "libmmx" * name * ".dll"); if (lib != "") return lib; return ""; }
Definition at line 69 of file dlink.cpp.
References as_charp(), contains(), dl_find(), done(), embedded_link, ERROR, error_message(), and free_charp().
Referenced by dl_link().
{ #ifdef BASIX_ENABLE_EMBEDDED if (embedded_link != NULL) embedded_link (name); #else static table<bool,string> done (false); if (contains (done, name)) return; //mmout << "Linking " << name << "\n"; string lib= dl_find (name); if (lib == "") ERROR ("library " * name * " not in library path"); if (lt_dlinit () != 0) ERROR ("lt_dlinit failed for " * name); //mmout << "Opening " << lib << "\n"; char* _lib = as_charp (lib); lt_dlhandle handle= lt_dlopen (_lib); free_charp (_lib); if (handle == NULL) { //mmerr << lt_dlerror () << lf; throw mmx::error_message (string (lt_dlerror ())); } //mmout << "Searching " << init << "\n"; char* _init= as_charp (init); lt_ptr ptr = lt_dlsym (handle, _init); free_charp (_init); if (ptr == NULL) { //mmerr << lt_dlerror () << lf; throw mmx::error_message (string (lt_dlerror ())); } //mmout << "Initializing " << name << "\n"; void (**define_glue) (void)= (void (**) (void)) ptr; (*define_glue) (); done[name]= true; #endif }
void dl_link | ( | const string & | name | ) |
string dl_option | ( | ) |
string dl_suffix | ( | ) |
Definition at line 18 of file document.cpp.
References gen(), N(), and tokenize().
{ vector<string> v= tokenize (s, "\n"); if (N(v) == 0) return gen ("$concat"); if (N(v) == 1) return generic (v[0]); vector<generic> r= vec<generic> (v[0]); for (nat i=1; i<N(v); i++) r << generic ("$lf") << generic (v[i]); return gen ("$concat", r); }
bool done | ( | const iterator< C > & | it | ) | [inline] |
Definition at line 98 of file iterator.hpp.
Referenced by big(), dl_link(), glue_basix(), glue_compound(), glue_document(), glue_double(), glue_dynamic(), glue_generic(), glue_int(), glue_list_generic(), glue_list_map(), glue_literal(), glue_port(), glue_routine(), glue_string(), glue_syntactic(), glue_table_generic(), glue_vector_generic(), glue_vector_map(), and REP_STRUCT_1().
{ return it.rep->is_done (); }
Definition at line 1211 of file vector.hpp.
References ASSERT, CF(), is_non_scalar(), N(), and seg().
Referenced by GLUE_25().
{ typedef implementation<vector_linear,V> Vec; ASSERT (is_non_scalar (v) && is_non_scalar (w), "non-scalar vectors expected"); ASSERT (N(v) == N(w), "lengths don't match"); return Vec::inn_prod (seg (v), seg (w), N(v), CF (v)); }
C mmx::duplicate | ( | const C & | x | ) | [inline] |
Definition at line 235 of file defaults.hpp.
Referenced by generic_object_rep::duplicate_me(), generic_concrete_rep< C >::duplicate_me(), duplicate_op::op(), and duplicate_op::set_op().
{ return x; }
Definition at line 972 of file vector.hpp.
{
return unary_map<duplicate_op> (v); }
Definition at line 131 of file generic.cpp.
{
return x1->duplicate_me ();
}
Definition at line 777 of file generic.cpp.
References current_ev, and GEN_ELEMENTARY_ERROR.
Referenced by elementary_error_op::Abs_type(), GLUE_48(), and elementary_error_op::set_op().
{ return current_ev->apply (GEN_ELEMENTARY_ERROR, x); }
unary_return_type_helper<abs_op, C >::RET mmx::elementary_error | ( | const C & | x | ) | [inline] |
Definition at line 872 of file type_props.hpp.
References rounding_error().
{ return rounding_error (x); }
Tell if s ends with what.
Definition at line 320 of file string.cpp.
Referenced by canonical_name(), GLUE_11(), scheme_to_tm(), unquote(), and write().
void* mmx::enlarge_malloc | ( | register size_t | sz | ) |
Definition at line 372 of file table.hpp.
Referenced by append(), big(), binary_combine(), binary_map(), binary_map_scalar(), binary_test(), binary_test_scalar(), common(), copy(), as_helper< table< D, T >, table< C, T > >::cv(), difference(), GLUE_3(), map(), unary_filter(), unary_map(), unary_set(), unary_set_scalar(), wait_port_event(), and binary_helper< table< C, T, V > >::write().
{ return iterator<T> (new entries_iterator_rep<C,T,V> (t)); }
mmx::EQUAL_INT_SUGAR | ( | template< typename C, typename V > | , |
vector< C, V > | |||
) |
bool mmx::equal_operator | ( | const T & | x, |
const T & | y | ||
) |
Definition at line 34 of file operators.hpp.
{ return x==y; }
bool mmx::error_flag | ( | const port & | p | ) | [inline] |
Definition at line 96 of file port.hpp.
References inside().
Referenced by composite_port_rep::error_flag(), composite_port_rep::error_message(), GLUE_11(), save(), and var_load().
{ return inside (p)->error_flag (); }
exception mmx::error_message | ( | const char * | msg | ) | [final] |
string error_message | ( | const port & | p | ) |
port error_port | ( | const string & | message | ) |
Definition at line 127 of file port.cpp.
Referenced by socket_port_rep::accept(), GLUE_8(), input_file_port(), input_output_file_port(), output_file_port(), socket_client_port(), and socket_server_port().
{ return (port_rep*) new error_port_rep (s); }
Replace "\n", "\t", and "\b" respectively by "\\n", "\\t", and "\\b".
Definition at line 449 of file string.cpp.
Referenced by quote().
C mmx::euler_cst | ( | ) | [inline] |
Definition at line 739 of file type_props.hpp.
References C, and set_euler().
Definition at line 219 of file generic.cpp.
References current_ev.
Referenced by include(), and rebuild().
{ return current_ev->eval (x); }
Definition at line 124 of file system.cpp.
References init_system(), N(), system(), user_dir(), and var_load().
Referenced by prefix_dir().
bool mmx::exact_eq | ( | short int | c1, |
short int | c2 | ||
) | [inline] |
Definition at line 109 of file defaults.hpp.
{ return c1 == c2; }
bool mmx::exact_eq | ( | unsigned char | c1, |
unsigned char | c2 | ||
) | [inline] |
Definition at line 108 of file defaults.hpp.
{ return c1 == c2; }
bool mmx::exact_eq | ( | short unsigned int | c1, |
short unsigned int | c2 | ||
) | [inline] |
Definition at line 110 of file defaults.hpp.
{
return c1 == c2; }
bool mmx::exact_eq | ( | int | c1, |
int | c2 | ||
) | [inline] |
Definition at line 112 of file defaults.hpp.
{ return c1 == c2; }
bool mmx::exact_eq | ( | unsigned int | c1, |
unsigned int | c2 | ||
) | [inline] |
Definition at line 113 of file defaults.hpp.
{ return c1 == c2; }
bool mmx::exact_eq | ( | long int | c1, |
long int | c2 | ||
) | [inline] |
Definition at line 114 of file defaults.hpp.
{ return c1 == c2; }
bool mmx::exact_eq | ( | long unsigned int | c1, |
long unsigned int | c2 | ||
) | [inline] |
Definition at line 115 of file defaults.hpp.
{
return c1 == c2; }
bool mmx::exact_eq | ( | long long int | c1, |
long long int | c2 | ||
) | [inline] |
Definition at line 117 of file defaults.hpp.
{ return c1 == c2; }
Definition at line 108 of file symbol.hpp.
{
return s1.rep == s2.rep; }
bool mmx::exact_eq | ( | float | x, |
float | y | ||
) | [inline] |
Definition at line 121 of file defaults.hpp.
{ return x == y; }
bool mmx::exact_eq | ( | double | x, |
double | y | ||
) | [inline] |
Definition at line 122 of file defaults.hpp.
{ return x == y; }
bool mmx::exact_eq | ( | const syntactic & | c1, |
const syntactic & | c2 | ||
) | [inline] |
bool mmx::exact_eq | ( | long long unsigned int | c1, |
long long unsigned int | c2 | ||
) | [inline] |
Definition at line 118 of file defaults.hpp.
{
return c1 == c2; }
bool mmx::exact_eq | ( | C * | p1, |
C * | p2 | ||
) | [inline] |
Definition at line 123 of file defaults.hpp.
{ return p1 == p2; }
Definition at line 585 of file generic.cpp.
References is_nil(), and same_type().
{ if (same_type (x1, x2)) return x1->is_exact_eq (x2); else { routine* cv= x1->acc_construct (x2->acc_id ()); if (cv != NULL && !is_nil (*cv)) return x1 -> is_exact_eq ((*cv) (x2)); cv= x2->acc_construct (x1->acc_id ()); if (cv != NULL && !is_nil (*cv)) return (*cv) (x1) -> is_exact_eq (x2); } return false; }
bool exact_eq | ( | const int & | x1, |
const generic & | x2 | ||
) |
bool exact_eq | ( | const generic & | x1, |
const int & | x2 | ||
) |
Definition at line 600 of file generic.cpp.
References is_nil().
{ if (is<int> (x1)) return as<int> (x1) == x2; else { routine* cv= x1->acc_construct (accelerator<int>::id); if (cv != NULL && !is_nil (*cv)) return x1 -> is_exact_eq ((*cv) (as<generic> (x2))); } return false; }
Definition at line 51 of file compound.hpp.
Referenced by as_math(), compose(), exact_eq(), exact_neq(), fall_back_equal(), gcd(), hard_eq(), generic_object_rep::is_exact_eq(), generic_concrete_rep< C >::is_exact_eq(), is_exact_zero(), is_func(), lcm(), exact_neq_op::not_op(), product_less_op::op(), exact_eq_op::op(), operator*(), operator+(), operator-(), operator/(), operator==(), pow(), xgcd(), and xgen_sub().
{ return exact_eq (as_symbol (c1), as_symbol (c2)); }
bool mmx::exact_eq | ( | const exception & | e1, |
const exception & | e2 | ||
) | [inline] |
Definition at line 48 of file literal.hpp.
References exact_eq().
{ return exact_eq (as_symbol (c1), as_symbol (c2)); }
bool mmx::exact_eq | ( | char | c1, |
char | c2 | ||
) | [inline] |
Definition at line 106 of file defaults.hpp.
{ return c1 == c2; }
bool mmx::exact_eq | ( | signed char | c1, |
signed char | c2 | ||
) | [inline] |
Definition at line 107 of file defaults.hpp.
{ return c1 == c2; }
nat mmx::exact_hash | ( | const syntactic & | c | ) | [inline] |
Definition at line 43 of file compound.hpp.
Referenced by exact_hash(), generic_object_rep::get_exact_hash_value(), generic_concrete_rep< C >::get_exact_hash_value(), hard_hash(), hash(), exact_neq_op::hash_op(), exact_eq_op::hash_op(), exact_hash_op::op(), and REP_STRUCT_1().
{ return exact_hash (as_symbol (c)); }
nat mmx::exact_hash | ( | const exception & | e | ) | [inline] |
Definition at line 42 of file literal.hpp.
References exact_hash().
{ return exact_hash (as_symbol (c)); }
nat mmx::exact_hash | ( | char | c | ) | [inline] |
Definition at line 84 of file defaults.hpp.
{ return (nat) c; }
nat mmx::exact_hash | ( | signed char | c | ) | [inline] |
Definition at line 85 of file defaults.hpp.
{ return (nat) c; }
nat mmx::exact_hash | ( | unsigned char | c | ) | [inline] |
Definition at line 86 of file defaults.hpp.
{ return (nat) c; }
nat mmx::exact_hash | ( | const generic & | g | ) | [inline] |
Definition at line 160 of file generic.hpp.
{
return g->get_exact_hash_value (); }
nat mmx::exact_hash | ( | short int | c | ) | [inline] |
Definition at line 87 of file defaults.hpp.
{ return (nat) c; }
nat mmx::exact_hash | ( | short unsigned int | c | ) | [inline] |
Definition at line 88 of file defaults.hpp.
{ return (nat) c; }
nat mmx::exact_hash | ( | int | c | ) | [inline] |
Definition at line 89 of file defaults.hpp.
{ return (nat) c; }
nat mmx::exact_hash | ( | unsigned int | c | ) | [inline] |
Definition at line 90 of file defaults.hpp.
{ return (nat) c; }
nat mmx::exact_hash | ( | long int | c | ) | [inline] |
Definition at line 91 of file defaults.hpp.
{ return (nat) c; }
nat mmx::exact_hash | ( | long long int | c | ) | [inline] |
Definition at line 93 of file defaults.hpp.
nat mmx::exact_hash | ( | long unsigned int | c | ) | [inline] |
Definition at line 92 of file defaults.hpp.
{ return (nat) c; }
nat mmx::exact_hash | ( | long long unsigned int | c | ) | [inline] |
Definition at line 96 of file defaults.hpp.
nat mmx::exact_hash | ( | const float & | x | ) | [inline] |
Definition at line 99 of file defaults.hpp.
{ return (*((nat*) ((void*) &x))) & 0xffffffff; }
nat mmx::exact_hash | ( | const double & | x | ) | [inline] |
Definition at line 101 of file defaults.hpp.
References n.
nat mmx::exact_hash | ( | C * | p | ) | [inline] |
Definition at line 110 of file symbol.hpp.
{
return s1.rep != s2.rep; }
bool mmx::exact_neq | ( | const syntactic & | c1, |
const syntactic & | c2 | ||
) | [inline] |
Definition at line 60 of file syntactic.hpp.
References exact_neq().
{ return exact_neq (*c1, *c2); }
bool mmx::exact_neq | ( | signed char | c1, |
signed char | c2 | ||
) | [inline] |
Definition at line 126 of file defaults.hpp.
{ return c1 != c2; }
bool mmx::exact_neq | ( | char | c1, |
char | c2 | ||
) | [inline] |
Definition at line 125 of file defaults.hpp.
{ return c1 != c2; }
bool mmx::exact_neq | ( | unsigned char | c1, |
unsigned char | c2 | ||
) | [inline] |
Definition at line 127 of file defaults.hpp.
{ return c1 != c2; }
bool mmx::exact_neq | ( | short int | c1, |
short int | c2 | ||
) | [inline] |
Definition at line 128 of file defaults.hpp.
{ return c1 != c2; }
bool exact_neq | ( | const generic & | x1, |
const int & | x2 | ||
) |
bool mmx::exact_neq | ( | int | c1, |
int | c2 | ||
) | [inline] |
Definition at line 131 of file defaults.hpp.
{ return c1 != c2; }
bool exact_neq | ( | const int & | x1, |
const generic & | x2 | ||
) |
bool mmx::exact_neq | ( | short unsigned int | c1, |
short unsigned int | c2 | ||
) | [inline] |
Definition at line 129 of file defaults.hpp.
{
return c1 != c2; }
bool mmx::exact_neq | ( | long int | c1, |
long int | c2 | ||
) | [inline] |
Definition at line 133 of file defaults.hpp.
{ return c1 != c2; }
bool mmx::exact_neq | ( | unsigned int | c1, |
unsigned int | c2 | ||
) | [inline] |
Definition at line 132 of file defaults.hpp.
{ return c1 != c2; }
bool mmx::exact_neq | ( | long unsigned int | c1, |
long unsigned int | c2 | ||
) | [inline] |
Definition at line 134 of file defaults.hpp.
{
return c1 != c2; }
bool mmx::exact_neq | ( | long long int | c1, |
long long int | c2 | ||
) | [inline] |
Definition at line 136 of file defaults.hpp.
{ return c1 != c2; }
bool mmx::exact_neq | ( | long long unsigned int | c1, |
long long unsigned int | c2 | ||
) | [inline] |
Definition at line 137 of file defaults.hpp.
{
return c1 != c2; }
bool mmx::exact_neq | ( | float | x, |
float | y | ||
) | [inline] |
Definition at line 140 of file defaults.hpp.
{ return x != y; }
bool mmx::exact_neq | ( | double | x, |
double | y | ||
) | [inline] |
Definition at line 141 of file defaults.hpp.
{ return x != y; }
bool mmx::exact_neq | ( | C * | p1, |
C * | p2 | ||
) | [inline] |
Definition at line 142 of file defaults.hpp.
{ return p1 != p2; }
Definition at line 53 of file compound.hpp.
Referenced by compose(), exact_neq(), fall_back_unequal(), hard_neq(), exact_eq_op::not_op(), exact_neq_op::op(), and operator!=().
{ return exact_neq (as_symbol (c1), as_symbol (c2)); }
Definition at line 57 of file document.hpp.
References exact_neq().
{ return exact_neq (*c1, *c2); }
bool mmx::exact_neq | ( | const exception & | e1, |
const exception & | e2 | ||
) | [inline] |
Definition at line 45 of file exception.hpp.
References exact_neq().
{ return exact_neq (*e1, *e2); }
Definition at line 50 of file literal.hpp.
References exact_neq().
{ return exact_neq (as_symbol (c1), as_symbol (c2)); }
double exp | ( | const double & | x | ) | [inline] |
Definition at line 44 of file double.hpp.
Referenced by cosh(), GLUE_34(), exp_op::op(), exp_op::op_init(), polar(), exp_op::set_op(), sinh(), and tanh().
{ return std::exp (x); }
Definition at line 432 of file generic.cpp.
References ACC_EXP, ACC_UNARY, current_ev, and GEN_EXP.
{ ACC_UNARY (ACC_EXP, x1); return current_ev->apply (GEN_EXP, x1); }
Definition at line 1083 of file vector.hpp.
{ return unary_map<exp_op> (v); }
double exp2 | ( | const double & | x | ) | [inline] |
Definition at line 45 of file double.hpp.
Referenced by exp2_op::op(), and exp2_op::set_op().
{ return ::exp2 (x); }
Definition at line 780 of file generic.cpp.
References ASSERT, current_ev, and GEN_EXPONENT.
{ generic r= current_ev->apply (GEN_EXPONENT, x); ASSERT (is<int> (r), "Int return value expected"); return as<int> (r); }
xint mmx::exponent | ( | const double & | x | ) | [inline] |
Definition at line 91 of file double.hpp.
References max().
Referenced by GLUE_41(), magnitude(), exponent_op::op(), max_exponent_op::set_op(), and exponent_op::set_op().
Definition at line 1144 of file vector.hpp.
{
return big<max_exponent_op> (v); }
Definition at line 212 of file vector.hpp.
References is_a_scalar(), is_non_scalar(), N(), Vector, and VERIFY.
Referenced by binary_map(), binary_test(), unary_set(), and vector_map_2().
{ VERIFY (is_a_scalar (v), "scalar vector expected"); VERIFY (is_non_scalar (w), "non-scalar vector expected"); return Vector (v.scalar(), N(w)); }
Definition at line 29 of file glue.cpp.
References exact_eq().
Referenced by define_prerequisites().
{ return exact_eq (x, y); }
Definition at line 34 of file glue.cpp.
References exact_neq().
Referenced by define_prerequisites().
{ return exact_neq (x, y); }
fast_helper< T >::fast_type mmx::fast | ( | const T & | x | ) |
Definition at line 689 of file type_props.hpp.
Referenced by fast_helper< vector< C, V > >::dd(), fast(), fast_op::Fast_type(), and fast_op::set_op().
{
return fast_helper<T>::dd (x);
}
format<typename fast_helper< T >::fast_type > mmx::fast | ( | const format< T > & | fm | ) | [inline] |
Definition at line 704 of file type_props.hpp.
References fast(), get_format(), and get_sample().
{ return get_format (fast (get_sample (fm))); }
volatile void fatal_error | ( | char * | message, |
char * | routine, | ||
char * | file | ||
) |
bool file_exists | ( | const string & | file_name | ) |
Definition at line 156 of file system.cpp.
References as_charp(), decode_name(), and free_charp().
Referenced by init_system(), path_name(), prefix_dir(), resolve_name(), and var_mkdir().
{ string name_s= decode_name (name); char* temp= as_charp (name_s); FILE* f= fopen (temp, "r"); free_charp (temp); if (f == NULL) return false; fclose (f); return true; }
bool file_is_directory | ( | const string & | file_name | ) |
Definition at line 414 of file system.cpp.
References file_test().
{ return file_test (name, "d"); }
bool file_is_file | ( | const string & | file_name | ) |
Definition at line 413 of file system.cpp.
References file_test().
{ return file_test (name, "f"); }
bool file_is_script | ( | const string & | file_name | ) |
Definition at line 216 of file system.cpp.
References as_charp(), free_charp(), and starts().
{ char* _file_name= as_charp (file_name); FILE* f= fopen (_file_name, "r"); free_charp (_file_name); if (f == NULL) return false; char c; string s= string (""); while ((c = fgetc (f)) != EOF && c != '\n') s << c; fclose (f); return starts (s, "#!/usr/bin/env mmx-light"); /* port f= input_file_port (file_name); if (error_flag (f)) return false; char c; string s= ""; while (can_read (f) > 0) { f >> c; if (c == '\n') break; s << c; } return starts (s, "#!/usr/bin/env mmx-light"); */ }
double file_last_modified | ( | const string & | file_name | ) |
Definition at line 389 of file system.cpp.
References ERROR.
{ ERROR ("could not get file's last modification time"); }
Definition at line 384 of file system.cpp.
Referenced by file_is_directory(), and file_is_file().
{ (void) name; (void) buf; }
Definition at line 472 of file vector.hpp.
References C, Format, get_format(), and n.
void fill_out | ( | vec_routine & | v, |
nat & | n, | ||
nat | i, | ||
const routine & | r | ||
) |
Definition at line 346 of file generic.cpp.
References n.
Referenced by accelerator< C >::set_apply(), and accelerator< C >::set_construct().
int mmx::find | ( | const vector< C, V > & | v, |
const C & | x | ||
) |
int mmx::find | ( | const list< C > & | l, |
const C & | x | ||
) |
C3 C1 mmx::first | ( | const triple< C1, C2, C3 > & | t | ) | [inline] |
Definition at line 40 of file triple.hpp.
{ return t.x1; }
C2 C1 mmx::first | ( | const pair< C1, C2 > & | p | ) | [inline] |
Definition at line 37 of file pair.hpp.
Referenced by cpp_demangle(), sort_op_pair_wrapper< Op >::not_op(), sort_op_pair_wrapper< Op >::op(), and sort_leq().
{ return p.x1; }
syntactic mmx::flatten | ( | const generic_alias< C > & | a | ) | [inline] |
Definition at line 129 of file alias.hpp.
Referenced by as_lisp(), as_math(), generic_object_rep::expression(), formatting_port_rep::expression(), composite_port_rep::expression(), generic_concrete_rep< C >::expression(), flatten(), flatten_as_cpp(), flatten_as_lisp(), flatten_as_math(), flatten_as_mmx(), flatten_as_texmacs_scheme(), flatten_as_tm(), GLUE_4(), define_type_helper< C >::helper_flatten(), INDIRECT_IMPL_1(), object_flatten(), flatten_op::op(), output_as_mmx(), pow(), flatten_op::set_op(), texmacs_dynamic_event(), and var_flatten().
{ return flatten (*a); }
syntactic mmx::flatten | ( | char *const & | s | ) |
syntactic mmx::flatten | ( | const syntactic & | g | ) | [inline] |
Definition at line 66 of file syntactic.hpp.
{ return g; }
Definition at line 68 of file document.hpp.
References as_generic(), as_syntactic(), and gen().
{ return as_syntactic (gen ("$text", as_generic (d))); }
syntactic mmx::flatten | ( | C *const & | x | ) | [inline] |
Definition at line 312 of file syntactic.hpp.
References as_string().
{ return as_string ((void*) x); }
syntactic flatten | ( | const bool & | b | ) |
Definition at line 510 of file syntactic.cpp.
{ return b? syntactic ("true"): syntactic ("false"); }
syntactic flatten | ( | const char & | i | ) |
Definition at line 512 of file syntactic.cpp.
References as_string().
syntactic flatten | ( | const signed char & | i | ) |
Definition at line 514 of file syntactic.cpp.
References as_string().
syntactic flatten | ( | const unsigned char & | i | ) |
Definition at line 516 of file syntactic.cpp.
References as_string().
syntactic flatten | ( | const short int & | i | ) |
Definition at line 518 of file syntactic.cpp.
References as_string().
syntactic flatten | ( | const short unsigned int & | i | ) |
Definition at line 520 of file syntactic.cpp.
References as_string().
syntactic flatten | ( | const int & | i | ) |
Definition at line 522 of file syntactic.cpp.
References as_string().
syntactic flatten | ( | const unsigned int & | i | ) |
Definition at line 524 of file syntactic.cpp.
References as_string().
syntactic flatten | ( | const long int & | i | ) |
Definition at line 526 of file syntactic.cpp.
References as_string().
syntactic flatten | ( | const long unsigned int & | i | ) |
Definition at line 528 of file syntactic.cpp.
References as_string().
syntactic flatten | ( | const long long int & | i | ) |
Definition at line 530 of file syntactic.cpp.
References as_string().
syntactic flatten | ( | const long long unsigned int & | i | ) |
Definition at line 532 of file syntactic.cpp.
References as_string().
syntactic flatten | ( | const float & | x | ) |
Definition at line 534 of file syntactic.cpp.
References as_string().
syntactic flatten | ( | const double & | x | ) |
Definition at line 536 of file syntactic.cpp.
References as_string().
syntactic flatten | ( | const long double & | x | ) |
Definition at line 538 of file syntactic.cpp.
References as_string().
syntactic mmx::flatten | ( | const char *const & | s | ) |
Definition at line 27 of file compound.cpp.
References as_generic(), as_syntactic(), as_vector(), flatten(), N(), n, and vector_to_compound().
{ const vector<generic> v= as_vector (c); nat i, n= N(v); vector<generic> w= fill<generic> (n); for (i=0; i<n; i++) w[i]= as_generic (flatten (v[i])); return as_syntactic (vector_to_compound (w)); }
Definition at line 90 of file dynamic.cpp.
References apply(), attach(), flatten(), inside(), N(), output_observer(), OUTPUT_OBSERVER, and unique_identifier().
{ syntactic r= apply ("$dynamic", syntactic (unique_identifier (g)), flatten (g->val)); for (nat i=0; i<N(g->obs); i++) if (g->obs[i]->observer_type () == OUTPUT_OBSERVER) return r; attach (g, output_observer (inside (g))); inside (g) -> ref_count++; // never destroy printed dynamic objects return r; }
Definition at line 63 of file triple.hpp.
References apply(), flatten(), and GEN_SQTUPLE.
{ return apply (GEN_SQTUPLE, flatten (t.x1), flatten (t.x2), flatten (t.x3)); }
syntactic mmx::flatten | ( | const exception & | e | ) | [inline] |
Definition at line 508 of file vector.hpp.
References apply(), flatten(), GEN_SQTUPLE, is_a_scalar(), N(), and n.
{ if (is_a_scalar (v)) return flatten (v.scalar()); nat i, n= N(v); vector<syntactic> r= fill <syntactic> (n); for (i=0; i<n; i++) r[i]= flatten (v[i]); return apply (GEN_SQTUPLE, r); }
syntactic mmx::flatten | ( | const function_0< D > & | f | ) | [inline] |
Definition at line 93 of file function.hpp.
References apply().
{ return apply ("function", flatten_type<D> ()); }
Definition at line 129 of file iterator.hpp.
References apply(), busy(), and flatten().
{ vector<syntactic> v; for (; busy (it); ++it) v << flatten (*it); return apply (fun, v); }
Definition at line 137 of file iterator.hpp.
References flatten().
{ return flatten ("iterator", it); // NOTE: when C involves the generic type, then traversal of the iterator // is a non trivial operations which may cause trouble (like in 1..10) // Indeed, the traveral may require operations like < on generic which // are not defined in the output evaluator. // return flatten (generic ("iterator"), it); // (void) it; return "iterator"; }
syntactic mmx::flatten | ( | const function_1< D, S1 > & | f | ) | [inline] |
Definition at line 142 of file function.hpp.
References apply().
{ return apply ("function", flatten_type<S1> (), flatten_type<D> ()); }
syntactic mmx::flatten | ( | const function_2< D, S1, S2 > & | f | ) | [inline] |
Definition at line 234 of file function.hpp.
References apply().
{ return apply ("function", flatten_type<S1> (), flatten_type<S2> (), flatten_type<D> ()); }
syntactic mmx::flatten | ( | const function_3< D, S1, S2, S3 > & | f | ) | [inline] |
Definition at line 287 of file function.hpp.
{ return "function"; }
syntactic mmx::flatten | ( | const function_4< D, S1, S2, S3, S4 > & | f | ) | [inline] |
Definition at line 339 of file function.hpp.
{ return "function"; }
Definition at line 235 of file list.hpp.
References apply(), flatten(), GEN_SQTUPLE, is_nil(), List, read_car(), and read_cdr().
{ vector<syntactic> v; List counter= l; while (!is_nil (counter)) { v << flatten (read_car (counter)); counter= read_cdr (counter); } return apply (GEN_SQTUPLE, v); }
syntactic mmx::flatten | ( | const function_5< D, S1, S2, S3, S4, S5 > & | f | ) | [inline] |
Definition at line 391 of file function.hpp.
{ return "function"; }
syntactic mmx::flatten | ( | const function_6< D, S1, S2, S3, S4, S5, S6 > & | f | ) | [inline] |
Definition at line 443 of file function.hpp.
{ return "function"; }
Definition at line 17 of file literal.cpp.
References as_syntactic().
{ return as_syntactic (as<generic> (s)); }
syntactic mmx::flatten | ( | const function_7< D, S1, S2, S3, S4, S5, S6, S7 > & | f | ) | [inline] |
Definition at line 495 of file function.hpp.
{ return "function"; }
syntactic mmx::flatten | ( | const function_8< D, S1, S2, S3, S4, S5, S6, S7, S8 > & | f | ) | [inline] |
Definition at line 547 of file function.hpp.
{ return "function"; }
syntactic mmx::flatten | ( | const cpp_printer & | p | ) | [inline] |
Definition at line 285 of file cpp_printer.cpp.
{ return "#cpp_printer<>"; }
Definition at line 136 of file generic.cpp.
References flatten(), and MEMOIZE_UNARY.
{ MEMOIZE_UNARY (std_memoizer,syntactic,generic,flatten,g, g->expression()); }
syntactic mmx::flatten | ( | const pair< C1, C2 > & | p | ) | [inline] |
Definition at line 63 of file pair.hpp.
References apply(), flatten(), and GEN_SQTUPLE.
{ return apply (GEN_SQTUPLE, flatten (p.x1), flatten (p.x2)); }
syntactic mmx::flatten | ( | const primitive & | fun | ) | [inline] |
Definition at line 47 of file primitive.hpp.
References as_syntactic(), GEN_NIL, and is_nil().
{ if (is_nil (fun)) return as_syntactic (GEN_NIL); else return as_syntactic (fun->name); }
Definition at line 100 of file routine.hpp.
References as_syntactic(), GEN_NIL, and is_nil().
{ if (is_nil (fun)) return as_syntactic (GEN_NIL); else return as_syntactic (fun->name); }
syntactic mmx::flatten | ( | const source_location & | l | ) | [inline] |
Definition at line 97 of file source_track.hpp.
References source_location::begin, source_position::column, source_location::end, source_location::file_name, flatten(), gen(), GEN_TUPLE, source_location::input_number, source_position::line, and source_location::obj.
syntactic mmx::flatten | ( | const sparse_vector< C, T, V > & | v | ) |
Definition at line 104 of file sparse_vector.hpp.
References apply(), flatten(), and N().
{ vector<syntactic> r; for (nat i=0; i<N(v); i++) r << flatten (v[i]); return apply ("sparse_vector", r); }
Definition at line 1227 of file cpp_printer.cpp.
References as_cpp(), as_generic(), and flatten().
{ generic f= as_generic (flatten (g)); return as_cpp (f); }
Definition at line 48 of file lisp_printer.cpp.
References as_generic(), as_lisp(), and flatten().
{ generic f= as_generic (flatten (g)); return as_lisp (f); }
string mmx::flatten_as_math | ( | const C & | x | ) | [inline] |
Definition at line 28 of file math_syntax.hpp.
References as_generic(), as_math(), and flatten().
{ return as_math (as_generic (flatten (x))); }
Definition at line 910 of file mmx_printer.cpp.
References as_generic(), as_mmx(), and flatten().
Referenced by std_exception().
{ generic f= as_generic (flatten (g)); return as_mmx (f); }
string mmx::flatten_as_texmacs_scheme | ( | const C & | x | ) | [inline] |
Definition at line 40 of file math_syntax.hpp.
References as_generic(), as_texmacs_scheme(), and flatten().
Referenced by output_as_mmx().
{ return as_texmacs_scheme (as_generic (flatten (x))); }
Definition at line 588 of file mmx_texmacs.cpp.
References as_generic(), as_snippet(), flatten(), is_func(), parse_lisp(), and scheme_to_tm().
{ string r; generic g= as_generic (flatten (x)); g= parse_lisp (as_snippet (g), true); if (is_func (g, "text", 1)) g= g[1]; scheme_to_tm (r, g, 0); return r; }
Definition at line 598 of file mmx_texmacs.cpp.
References as_generic(), as_snippet(), flatten(), gen(), is_func(), parse_lisp(), and scheme_to_tm().
{ string r; generic g= as_generic (flatten (x)); g= parse_lisp (as_snippet (g), true); if (is_func (g, "text", 1)) g= g[1]; if (!is_func (g, "document")) g= gen ("document", g); g= gen ("document", gen ("TeXmacs", string ("1.0.7.8")), gen ("style", style), gen ("body", g)); scheme_to_tm (r, g, 0); return r; }
syntactic mmx::flatten_type | ( | ) | [inline] |
Definition at line 19 of file function.hpp.
References as_syntactic(), and type_name().
{ return as_syntactic (type_name (type_information<T>::id)); }
void mmx::floating_to_string | ( | const C & | val, |
string & | s, | ||
const char * | fm | ||
) | [inline] |
Definition at line 194 of file string.cpp.
Referenced by numeric_to_string().
double floor | ( | const double & | x | ) | [inline] |
Definition at line 125 of file double.hpp.
Referenced by floor_op::op(), round(), and floor_op::set_op().
{ return std::floor (x); }
Definition at line 748 of file generic.cpp.
References current_ev, and GEN_FLOOR.
{ return current_ev->apply (GEN_FLOOR, x); }
void mmx::flush | ( | const port & | p | ) | [inline] |
Definition at line 396 of file system.cpp.
References as_charp(), decode_name(), and free_charp().
{ char buf[1024]; string name_s= decode_name (name); char* temp= as_charp (name_s); int n= readlink (temp, buf, 1024); free_charp (temp); if (n >= 0 && n < 1024) { string r (buf, n); if (recurse) return follow_link (r, true); else return r; } else { if (recurse) return name; else return ""; } }
port formatting_port | ( | const port & | p | ) |
Definition at line 101 of file formatting_port.cpp.
{ return (port_rep*) new formatting_port_rep (p); }
void free_charp | ( | char * | s | ) |
Free memory allocated within as_charp.
Definition at line 83 of file string.cpp.
References mmx_free().
Referenced by dl_link(), file_exists(), file_is_script(), follow_link(), get_env(), input_file_port(), input_output_file_port(), load_directory(), output_file_port(), socket_client_port(), system(), and var_mkdir().
C mmx::fuzz_cst | ( | ) | [inline] |
Definition at line 747 of file type_props.hpp.
References C, and set_fuzz().
Definition at line 429 of file syntactic.cpp.
References Imaginary.
Definition at line 739 of file generic.cpp.
References Imaginary.
Referenced by gaussian_op::op().
{ return x1 + x2 * Imaginary (generic); }
Definition at line 376 of file syntactic.cpp.
References exact_eq(), GEN_GCD, and syn().
Definition at line 716 of file generic.cpp.
References current_ev, and GEN_GCD.
Referenced by gcd_op::op(), and gcd_op::set_op().
{ return current_ev->apply (GEN_GCD, x1, x2); }
signed char mmx::gcd | ( | const signed char | a, |
const signed char | b | ||
) | [inline] |
signed char mmx::gcd | ( | const signed char | a, |
const signed char | b, | ||
signed char & | co_a | ||
) | [inline] |
signed char mmx::gcd | ( | const signed char | a, |
const signed char | b, | ||
signed char & | co_a, | ||
signed char & | co_b | ||
) | [inline] |
short int mmx::gcd | ( | const short int | a, |
const short int | b | ||
) | [inline] |
short int mmx::gcd | ( | const short int | a, |
const short int | b, | ||
short int & | co_a | ||
) | [inline] |
short int mmx::gcd | ( | const short int | a, |
const short int | b, | ||
short int & | co_a, | ||
short int & | co_b | ||
) | [inline] |
long int mmx::gcd | ( | const long int | a, |
const long int | b | ||
) | [inline] |
int mmx::gcd | ( | const int | a, |
const int | b, | ||
int & | co_a, | ||
int & | co_b | ||
) | [inline] |
long int mmx::gcd | ( | const long int | a, |
const long int | b, | ||
long int & | co_a | ||
) | [inline] |
long int mmx::gcd | ( | const long int | a, |
const long int | b, | ||
long int & | co_a, | ||
long int & | co_b | ||
) | [inline] |
long long int mmx::gcd | ( | const long long int | a, |
const long long int | b | ||
) | [inline] |
long long int mmx::gcd | ( | const long long int | a, |
const long long int | b, | ||
long long int & | co_a | ||
) | [inline] |
long long int mmx::gcd | ( | const long long int | a, |
const long long int | b, | ||
long long int & | co_a, | ||
long long int & | co_b | ||
) | [inline] |
unsigned short int mmx::gcd | ( | const unsigned short int | a, |
const unsigned short int | b | ||
) | [inline] |
unsigned int mmx::gcd | ( | const unsigned int | a, |
const unsigned int | b | ||
) | [inline] |
unsigned long int mmx::gcd | ( | const unsigned long int | a, |
const unsigned long int | b | ||
) | [inline] |
unsigned long long int mmx::gcd | ( | const unsigned long long int | a, |
const unsigned long long int | b | ||
) | [inline] |
int mmx::gcd | ( | const int | a, |
const int | b, | ||
int & | co_a | ||
) | [inline] |
unsigned char mmx::gcd | ( | const unsigned char | a, |
const unsigned char | b | ||
) | [inline] |
Definition at line 58 of file compound.cpp.
References cons().
Referenced by accelerate_converter(), access(), add_modes(), all_type_names(), evaluator_rep::apply(), as_texmacs(), attach_generic_binary_assembler(), bigop(), binary_assemble_generic(), bracket(), collect(), comma(), concat(), concat_append(), define_type_helper< C >::def_type(), define_converter(), define_type_sub(), define_user_type(), documentify(), flatten(), flatten_as_tm(), binary_helper< vector< C, V > >::full_type_name(), binary_helper< triple< C1, C2, C3 > >::full_type_name(), binary_helper< table< C, T, V > >::full_type_name(), binary_helper< symbol< C, V > >::full_type_name(), binary_helper< sparse_vector< C, T, V > >::full_type_name(), binary_helper< format< T > >::full_type_name(), binary_helper< pair< C1, C2 > >::full_type_name(), binary_helper< list< C > >::full_type_name(), binary_helper< iterator< C > >::full_type_name(), binary_helper< heap< C > >::full_type_name(), binary_helper< chain< C > >::full_type_name(), routine_rep::function_type(), glue_list_generic(), glue_routine(), glue_table_generic(), glue_vector_generic(), hlist(), include(), indented(), infix(), keyword(), has< T, Op >::lazy_value(), both< T1, T2 >::lazy_value(), list_foreach(), make_document(), make_math(), make_row(), make_texmacs(), make_text(), sum_less_op::op(), sign_op::op(), operate(), postfix(), prefix(), replace_lf(), std_exception(), syn(), texmacs_expand(), trace_pull(), trace_push(), trace_top(), type_id(), type_name(), un_try_catch(), user_exception(), vector_foreach(), vlist(), void_value(), and WRAP_INDIRECT_IMPL().
generic gen | ( | ) |
Definition at line 63 of file compound.cpp.
{ return as<generic> (compound (vec<generic> ())); }
Definition at line 68 of file compound.cpp.
{ return as<generic> (compound (vec<generic> (x1))); }
Definition at line 78 of file compound.cpp.
{ return as<generic> (compound (vec<generic> (x1, generic (x2)))); }
Definition at line 73 of file compound.cpp.
{ return as<generic> (compound (vec<generic> (x1, x2))); }
Definition at line 83 of file compound.cpp.
{ return as<generic> (compound (vec<generic> (x1, x2, x3))); }
Definition at line 88 of file compound.cpp.
{ return as<generic> (compound (vec<generic> (x1, x2, x3, x4))); }
generic gen | ( | const generic & | x1, |
const generic & | x2, | ||
const generic & | x3, | ||
const generic & | x4, | ||
const generic & | x5 | ||
) |
Definition at line 94 of file compound.cpp.
{ return as<generic> (compound (vec<generic> (x1, x2, x3, x4, x5))); }
generic gen | ( | const generic & | x1, |
const generic & | x2, | ||
const generic & | x3, | ||
const generic & | x4, | ||
const generic & | x5, | ||
const generic & | x6 | ||
) |
Definition at line 100 of file compound.cpp.
{ return as<generic> (compound (vec<generic> (x1, x2, x3, x4, x5, x6))); }
generic mmx::GEN_ABS | ( | "abs" | ) |
generic mmx::GEN_ACCESS | ( | "." | [] | ) |
generic mmx::GEN_ACCURACY | ( | "accuracy" | ) |
generic mmx::GEN_ADDITIVE_ERROR | ( | "additive_error" | ) |
generic mmx::GEN_ALIAS | ( | "alias" | ) |
generic mmx::GEN_ALIAS_TYPE | ( | "Alias" | ) |
generic mmx::GEN_ALL_TYPES | ( | "all_types" | ) |
generic mmx::GEN_AND | ( | "/\\" | ) |
generic mmx::GEN_APPEND | ( | " | ) |
generic mmx::GEN_APPLY | ( | ".()" | ) |
generic mmx::GEN_ARCCOS | ( | "arccos" | ) |
generic mmx::GEN_ARCSIN | ( | "arcsin" | ) |
generic mmx::GEN_ARCTAN | ( | "arctan" | ) |
generic mmx::GEN_ARCTAN2 | ( | "arctan2" | ) |
generic mmx::GEN_ARG | ( | "arg" | ) |
generic mmx::GEN_ARGCH | ( | "argch" | ) |
generic mmx::GEN_ARGSH | ( | "argsh" | ) |
generic mmx::GEN_ARGTH | ( | "argth" | ) |
generic mmx::GEN_ASSIGN_MACRO | ( | ": | , |
" | |||
) |
generic mmx::GEN_ASSUME | ( | "assume" | ) |
generic mmx::GEN_BACKPRIME | ( | ".`" | ) |
generic mmx::GEN_BACKQUOTE | ( | "`" | ) |
generic mmx::GEN_BACKTRACE | ( | "backtrace" | ) |
generic mmx::GEN_BALL | ( | "ball" | ) |
generic mmx::GEN_BEGIN | ( | "begin" | ) |
generic mmx::GEN_BLUR | ( | "blur" | ) |
generic mmx::GEN_BOOLEAN_TYPE | ( | "Boolean" | ) |
generic mmx::GEN_BREAK | ( | "break" | ) |
generic mmx::GEN_CACHE_CONVERTER | ( | "cache/converter" | ) |
generic mmx::GEN_CACHE_CONVERTERS | ( | "cache/converters" | ) |
generic mmx::GEN_CACHE_PENALTY | ( | "cache/penalty" | ) |
generic mmx::GEN_CACHED_DERIVE | ( | "%derive" | ) |
generic mmx::GEN_CASE | ( | "case" | ) |
generic mmx::GEN_CAST | ( | "cast" | ) |
generic mmx::GEN_CATALAN | ( | "mathcatalan" | ) |
generic mmx::GEN_CATCH | ( | "catch" | ) |
generic mmx::GEN_CATEGORY | ( | "category" | ) |
generic mmx::GEN_CBRT | ( | "cbrt" | ) |
generic mmx::GEN_CEIL | ( | "ceil" | ) |
generic mmx::GEN_CENTER | ( | "center" | ) |
generic mmx::GEN_CH | ( | "ch" | ) |
generic mmx::GEN_CHANGE_PRECISION | ( | "change_precision" | ) |
generic mmx::GEN_CLASS | ( | "class" | ) |
generic mmx::GEN_CLASS_ACCESS | ( | "class/access" | ) |
generic mmx::GEN_CLASS_ENCAPSULATION | ( | "class/encapsulation" | ) |
generic mmx::GEN_CLASS_EXPORT | ( | "class/export" | ) |
generic mmx::GEN_CLASS_FIELDS | ( | "class/fields" | ) |
generic mmx::GEN_CLASS_MODE | ( | "class/mode" | ) |
generic mmx::GEN_CLASS_NAME | ( | "class/name" | ) |
generic mmx::GEN_CLOSURE | ( | "closure" | ) |
generic mmx::GEN_COERCE | ( | "coerce" | ) |
generic mmx::GEN_COERCE_TYPE | ( | "Coerce" | ) |
generic mmx::GEN_COMMA | ( | " | , |
" | |||
) |
generic mmx::GEN_COMPOSE | ( | "@" | ) |
generic mmx::GEN_COMPOUND_TYPE | ( | "Compound" | ) |
generic mmx::GEN_CONJ | ( | "conj" | ) |
generic mmx::GEN_CONSTANT | ( | "constant" | ) |
generic mmx::GEN_CONSTRUCTOR | ( | "constructor" | ) |
generic mmx::GEN_CONTINUE | ( | "continue" | ) |
generic mmx::GEN_CONVERT | ( | ": | , |
" | |||
) |
generic mmx::GEN_CONVERTER | ( | "converter" | ) |
generic mmx::GEN_CONVERTERS | ( | "converters" | ) |
generic mmx::GEN_CONVERTS | ( | "~ | , |
" | |||
) |
generic mmx::GEN_COS | ( | "cos" | ) |
generic mmx::GEN_CROSS_TYPE | ( | "Cross" | ) |
generic mmx::GEN_D | ( | "mathd" | ) |
generic mmx::GEN_DEFINE_MACRO | ( | " | = = , |
" | |||
) |
generic mmx::GEN_DELTA | ( | "delta" | ) |
generic mmx::GEN_DENOMINATOR | ( | "denominator" | ) |
generic mmx::GEN_DERIVATIVE | ( | "derivative" | ) |
generic mmx::GEN_DERIVE | ( | "derive" | ) |
generic mmx::GEN_DESTRUCTOR | ( | "destructor" | ) |
generic mmx::GEN_DIV | ( | "div" | ) |
generic mmx::GEN_DOT | ( | "." | ) |
generic mmx::GEN_DOUBLE_TYPE | ( | "Double" | ) |
generic mmx::GEN_DOWNGRADE | ( | "downgrade" | ) |
generic mmx::GEN_DOWNTO | ( | "downto" | ) |
generic mmx::GEN_DUPLICATE | ( | "duplicate" | ) |
generic mmx::GEN_E | ( | "mathe" | ) |
generic mmx::GEN_ELEMENTARY_ERROR | ( | "elementary_error" | ) |
generic mmx::GEN_ELSE | ( | "else" | ) |
generic mmx::GEN_EMPTY | ( | "" | ) |
bool mmx::gen_eq | ( | const generic & | g1, |
const generic & | g2 | ||
) | [inline] |
Definition at line 164 of file generic.hpp.
Referenced by gen_eq_op::op().
{
return g1->is_hard_eq (g2); }
generic mmx::GEN_EQUALIZE_GROUPED | ( | "equalize_grouped" | ) |
generic mmx::GEN_EQUIV | ( | "<= | , |
" | |||
) |
generic mmx::GEN_ERF | ( | "erf" | ) |
generic mmx::GEN_ERROR | ( | "error" | ) |
generic mmx::GEN_EULER | ( | "matheuler" | ) |
generic mmx::GEN_EXACT_EQ | ( | "exact_eq" | ) |
generic mmx::GEN_EXACT_HASH | ( | "exact_hash" | ) |
generic mmx::GEN_EXACT_NEQ | ( | "exact_neq" | ) |
generic mmx::GEN_EXCEPTION | ( | "exception" | ) |
generic mmx::GEN_EXISTS | ( | "exists" | ) |
generic mmx::GEN_EXP | ( | "exp" | ) |
generic mmx::GEN_EXP10 | ( | "exp10" | ) |
generic mmx::GEN_EXP2 | ( | "exp2" | ) |
generic mmx::GEN_EXPECTED | ( | "expected" | ) |
generic mmx::GEN_EXPLODE | ( | "@" | ) |
generic mmx::GEN_EXPONENT | ( | "exponent" | ) |
generic mmx::GEN_EXPORT | ( | "export" | ) |
generic mmx::GEN_EXTERN | ( | "extern" | ) |
generic mmx::GEN_FACTORIAL | ( | ".!" | ) |
generic mmx::GEN_FALSE | ( | "false" | ) |
generic mmx::GEN_FAST | ( | "fast" | ) |
generic mmx::GEN_FILL | ( | "^^" | ) |
generic mmx::GEN_FLATTEN | ( | "flatten" | ) |
generic mmx::GEN_FLOATING_TYPE | ( | "Floating" | ) |
generic mmx::GEN_FLOOR | ( | "floor" | ) |
generic mmx::GEN_FOR | ( | "for" | ) |
generic mmx::GEN_FORALL | ( | "forall" | ) |
generic mmx::GEN_FOREIGN | ( | "foreign" | ) |
generic mmx::GEN_FUNCTION_TYPE | ( | "Function" | ) |
generic mmx::GEN_FUZZ | ( | "Fuzz" | ) |
generic mmx::GEN_GAMMA | ( | "gamma" | ) |
generic mmx::GEN_GAUSSIAN | ( | "gaussian" | ) |
generic mmx::GEN_GCD | ( | "gcd" | ) |
generic mmx::GEN_GENERATE | ( | "generate" | ) |
generic mmx::GEN_GENERATOR_TYPE | ( | "Generator" | ) |
generic mmx::GEN_GENERIC_ALIAS_TYPE | ( | "Generic_alias" | ) |
generic mmx::GEN_GENERIC_TYPE | ( | "Generic" | ) |
generic mmx::GEN_GLOBAL | ( | "global" | ) |
generic mmx::GEN_GRAD | ( | "grad" | ) |
generic mmx::GEN_GRAEFFE | ( | "graeffe" | ) |
generic mmx::GEN_GTR | ( | " | , |
" | |||
) |
generic mmx::GEN_GTREQ | ( | ">=" | ) |
generic mmx::GEN_GTRGTR | ( | ">>" | ) |
generic mmx::GEN_HARD_EQ | ( | "hard_eq" | ) |
generic mmx::GEN_HARD_GTR | ( | "hard_gtr" | ) |
generic mmx::GEN_HARD_HASH | ( | "hard_hash" | ) |
generic mmx::GEN_HARD_LESS | ( | "hard_less" | ) |
generic mmx::GEN_HARD_NEQ | ( | "hard_neq" | ) |
generic mmx::GEN_HAS | ( | "has" | ) |
generic mmx::GEN_HASH | ( | "hash" | ) |
nat mmx::gen_hash | ( | const generic & | g | ) | [inline] |
Definition at line 158 of file generic.hpp.
Referenced by gen_eq_op::hash_op().
{
return g->get_hard_hash_value (); }
generic mmx::GEN_HAT | ( | ".^" | ) |
generic mmx::GEN_HYPOT | ( | "hypot" | ) |
generic mmx::GEN_I | ( | "mathi" | ) |
generic mmx::GEN_IDENTITY | ( | "identity" | ) |
generic mmx::GEN_IF | ( | "if" | ) |
generic mmx::GEN_IM | ( | "Im" | ) |
generic mmx::GEN_IMPLIES | ( | " | , |
" | |||
) |
generic mmx::GEN_IMPORT | ( | "import" | ) |
generic mmx::GEN_IN | ( | "in" | ) |
generic mmx::GEN_INFINITY | ( | "Infty" | ) |
generic mmx::GEN_INFIX | ( | "infix" | ) |
generic mmx::GEN_INLINE | ( | "inline" | ) |
generic mmx::GEN_INPLACE | ( | "inplace" | ) |
generic mmx::GEN_INT_TYPE | ( | "Int" | ) |
generic mmx::GEN_INTEGER_TYPE | ( | "Integer" | ) |
generic mmx::GEN_INTEGRATE | ( | "integrate" | ) |
generic mmx::GEN_INTERN | ( | "intern" | ) |
generic mmx::GEN_INTERVAL | ( | "interval" | ) |
generic mmx::GEN_INTO | ( | "->" | ) |
generic mmx::GEN_INVERT | ( | "invert" | ) |
generic mmx::GEN_KEYWORD | ( | "keyword" | ) |
generic mmx::GEN_LAMBDA | ( | "lambda" | ) |
generic mmx::GEN_LARGEST | ( | "largest" | ) |
generic mmx::GEN_LCM | ( | "lcm" | ) |
generic mmx::GEN_LESS | ( | ) |
generic mmx::GEN_LESSEQ | ( | "<=" | ) |
generic mmx::GEN_LESSLESS | ( | "<<" | ) |
generic mmx::GEN_LIFT | ( | "lift" | ) |
generic mmx::GEN_LIST | ( | "list" | ) |
generic mmx::GEN_LITERAL_TYPE | ( | "Literal" | ) |
generic mmx::GEN_LOCAL | ( | "local" | ) |
generic mmx::GEN_LOG | ( | "log" | ) |
generic mmx::GEN_LOG10 | ( | "log10" | ) |
generic mmx::GEN_LOG2 | ( | "log2" | ) |
generic mmx::GEN_LOG2_AS | ( | "set_log2" | ) |
generic mmx::GEN_LOOP | ( | "loop" | ) |
generic mmx::GEN_LOWER | ( | "lower" | ) |
generic mmx::GEN_MACRO | ( | "macro" | ) |
generic mmx::GEN_MACRO_TYPE | ( | "Macro" | ) |
generic mmx::GEN_MAGNITUDE | ( | "magnitude" | ) |
generic mmx::GEN_MAPSTO | ( | ":->" | ) |
generic mmx::GEN_MAX | ( | "max" | ) |
generic mmx::GEN_METHOD | ( | "method" | ) |
generic mmx::GEN_MIN | ( | "min" | ) |
generic mmx::GEN_MINUS | ( | "-" | ) |
generic mmx::GEN_MOD | ( | "mod" | ) |
generic mmx::GEN_MODULE | ( | "module" | ) |
generic mmx::GEN_MUL_ADD | ( | "mul_add" | ) |
generic mmx::GEN_MUL_SUB | ( | "mul_sub" | ) |
generic mmx::GEN_MULTIPLICATIVE_ERROR | ( | "multiplicative_error" | ) |
generic mmx::GEN_MUTABLE | ( | "mutable" | ) |
generic mmx::GEN_NAN | ( | "NaN" | ) |
bool mmx::gen_neq | ( | const generic & | g1, |
const generic & | g2 | ||
) | [inline] |
Definition at line 166 of file generic.hpp.
Referenced by gen_eq_op::not_op().
{
return !g1->is_hard_eq (g2); }
generic mmx::GEN_NEW | ( | "new" | ) |
generic mmx::GEN_NEXT_ABOVE | ( | "next_above" | ) |
generic mmx::GEN_NEXT_BELOW | ( | "next_below" | ) |
generic mmx::GEN_NIL | ( | "nil" | ) |
generic mmx::GEN_NOOP | ( | "noop" | ) |
generic mmx::GEN_NOT | ( | "!" | ) |
generic mmx::GEN_NUMERATOR | ( | "numerator" | ) |
generic mmx::GEN_OPERATOR | ( | "operator" | ) |
generic mmx::GEN_OR | ( | "\\/" | ) |
generic mmx::GEN_OVER | ( | "/" | ) |
generic mmx::GEN_PARTIAL | ( | "partial" | ) |
generic mmx::GEN_PENALTY | ( | "penalty" | ) |
generic mmx::GEN_PI | ( | "mathpi" | ) |
generic mmx::GEN_PLUS | ( | "+" | ) |
generic mmx::GEN_POLAR | ( | "polar" | ) |
generic mmx::GEN_POSTFIX | ( | "postfix" | ) |
generic mmx::GEN_POWER | ( | "^" | ) |
generic mmx::GEN_PRECISION | ( | "precision" | ) |
generic mmx::GEN_PREFIX | ( | "prefix" | ) |
generic mmx::GEN_PRIME | ( | ".'" | ) |
generic mmx::GEN_PRIVATE | ( | "private" | ) |
generic mmx::GEN_PROJECT | ( | "project" | ) |
generic mmx::GEN_PUBLIC | ( | "public" | ) |
generic mmx::GEN_QUO | ( | "quo" | ) |
generic mmx::GEN_QUOTE | ( | "'" | ) |
generic mmx::GEN_RADIUS | ( | "radius" | ) |
generic mmx::GEN_RAISE | ( | "raise" | ) |
generic mmx::GEN_RANGE | ( | ".." | ) |
generic mmx::GEN_RATIONAL_TYPE | ( | "Rational" | ) |
generic mmx::GEN_RE | ( | "Re" | ) |
generic mmx::GEN_REM | ( | "rem" | ) |
generic mmx::GEN_RETURN | ( | "return" | ) |
generic mmx::GEN_REVERSE | ( | "reverse" | ) |
generic mmx::GEN_REWRITE | ( | "rewrite" | ) |
generic mmx::GEN_ROUND | ( | "round" | ) |
generic mmx::GEN_ROUNDING_ERROR | ( | "rounding_error" | ) |
generic mmx::GEN_ROUTINE_TYPE | ( | "Routine" | ) |
generic mmx::GEN_ROW | ( | "(.)" | ) |
generic mmx::GEN_SCOPE | ( | "::" | ) |
generic mmx::GEN_SEMICOLON | ( | ";" | ) |
generic mmx::GEN_SEQAND | ( | "and" | ) |
generic mmx::GEN_SEQOR | ( | "or" | ) |
generic mmx::GEN_SH | ( | "sh" | ) |
generic mmx::GEN_SHARPEN | ( | "sharpen" | ) |
generic mmx::GEN_SIN | ( | "sin" | ) |
generic mmx::GEN_SINGLE_TYPE | ( | "Single" | ) |
generic mmx::GEN_SIZE | ( | "#" | ) |
generic mmx::GEN_SLOW | ( | "slow" | ) |
generic mmx::GEN_SMALLEST | ( | "smallest" | ) |
generic mmx::GEN_SOLVE | ( | "solve" | ) |
generic mmx::GEN_SPECIALIZE | ( | "specialize" | ) |
generic mmx::GEN_SPECIALIZE_ALIAS | ( | "specialize_alias" | ) |
generic mmx::GEN_SQRT | ( | "sqrt" | ) |
generic mmx::GEN_SQTUPLE | ( | "" | [] | ) |
generic mmx::GEN_SQUARE | ( | "square" | ) |
generic mmx::GEN_STAR | ( | ".*" | ) |
generic mmx::GEN_STEP | ( | "step" | ) |
generic mmx::GEN_SUBSTITUTE | ( | "substitute" | ) |
generic mmx::GEN_SYMBOL_TYPE | ( | "Symbol" | ) |
generic mmx::GEN_TAN | ( | "tan" | ) |
generic mmx::GEN_TH | ( | "th" | ) |
generic mmx::GEN_THIS | ( | "this" | ) |
generic mmx::GEN_THIS_TYPE | ( | "This" | ) |
generic mmx::GEN_TILDA | ( | ".~" | ) |
generic mmx::GEN_TIMES | ( | "*" | ) |
generic mmx::GEN_TO | ( | "to" | ) |
generic mmx::GEN_TRANSITIVE | ( | "transitive" | ) |
generic mmx::GEN_TRANSTYPE | ( | ": | , |
" | |||
) |
generic mmx::GEN_TRUE | ( | "true" | ) |
generic mmx::GEN_TRUNC | ( | "trunc" | ) |
generic mmx::GEN_TRY | ( | "try" | ) |
generic mmx::GEN_TUPLE | ( | "()" | ) |
generic mmx::GEN_TUPLE_TYPE | ( | "Tuple" | ) |
generic mmx::GEN_TYPE | ( | ":" | ) |
generic mmx::GEN_TYPE_ID | ( | "type_id" | ) |
generic mmx::GEN_TYPE_NAME | ( | "type_name" | ) |
generic mmx::GEN_TYPE_TYPE | ( | "Type" | ) |
generic mmx::GEN_UNALIAS | ( | "unalias" | ) |
generic mmx::GEN_UNSPECIFIED_TYPE | ( | "Unspecified" | ) |
generic mmx::GEN_UNTIL | ( | "until" | ) |
generic mmx::GEN_UPGRADE | ( | "upgrade" | ) |
generic mmx::GEN_UPPER | ( | "upper" | ) |
Definition at line 59 of file generic.cpp.
{
return as<generic> (vec<generic> (g1)); }
generic gen_vec | ( | ) |
Definition at line 57 of file generic.cpp.
Referenced by binary_helper< triple< C1, C2, C3 > >::disassemble(), binary_helper< generic >::disassemble(), binary_helper< pair< C1, C2 > >::disassemble(), binary_helper< list< C > >::disassemble(), and binary_helper< chain< C > >::disassemble().
{
return as<generic> (vec<generic> ()); }
Definition at line 61 of file generic.cpp.
{
return as<generic> (vec<generic> (g1, g2)); }
Definition at line 63 of file generic.cpp.
{
return as<generic> (vec<generic> (g1, g2, g3)); }
generic mmx::GEN_VIA_TUPLE | ( | "via_tuple" | ) |
generic mmx::GEN_VOID_TYPE | ( | "Void" | ) |
generic mmx::GEN_VWHERE | ( | "||" | ) |
generic mmx::GEN_WHERE | ( | "|" | ) |
generic mmx::GEN_WHILE | ( | "while" | ) |
generic mmx::GEN_XDERIVE | ( | "xderive" | ) |
generic mmx::GEN_XGCD | ( | "xgcd" | ) |
generic mmx::GEN_XOR | ( | "xor" | ) |
generic mmx::GEN_YIELD | ( | "yield" | ) |
generic mmx::GEN_ZETA | ( | "zeta" | ) |
alias<generic> mmx::generalize_genalias | ( | const generic_alias< C > & | a | ) | [inline] |
generic mmx::generic_assemble | ( | const generic & | x | ) | [inline] |
Definition at line 117 of file glue_list_map.cpp.
References current_comparison.
Referenced by list_sort().
{ bool b= as<bool> (current_comparison->apply (x, y)); return b? -1: 1; }
generic mmx::generic_disassemble | ( | const generic & | x | ) | [inline] |
Definition at line 56 of file alias.hpp.
Referenced by default_routine(), generic_object_rep::expression(), alias_binary_access_rep< C, R, A, B >::get(), alias_unary_access_rep< C, R, A >::get(), object_get_alias(), object_specialize_alias(), and specialize_alias().
{ return a->get (); }
Definition at line 75 of file alias.cpp.
References alias_getter(), and type().
{ routine r; alias_getter (type (a), r); return r->apply (a); }
static bool mmx::get_attributes | ( | const string & | name, |
struct stat * | buf | ||
) | [static] |
Definition at line 378 of file system.cpp.
{
(void) name; (void) buf;
return 1;
}
Definition at line 242 of file system.cpp.
References N().
Referenced by canonical_name(), and resolve_name().
{ for (int i= N(name)-1; i>=0; i--) if (name[i]=='/') return name (0, i); return "."; }
Definition at line 37 of file system.cpp.
References as_charp(), and free_charp().
Referenced by decode_name(), load_path(), path_name(), prefix_dir(), sysconf_dir(), user_dir(), and var_load().
{ char* _var= as_charp (var); char* _ret= getenv (_var); free_charp (_var); if (_ret == NULL) return ""; string ret (_ret); return ret; // do not delete _ret ! }
Definition at line 268 of file system.cpp.
References N().
Definition at line 76 of file source_track.cpp.
References ASSERT, file_sources, line, N(), and read().
{ if (!file_sources->contains (file_name)) return ""; ASSERT (line < N (read (file_sources, file_name)), "source out of range"); return read (file_sources, file_name) [line]; }
Definition at line 71 of file source_track.cpp.
References file_sources, and recompose().
Referenced by get_source().
{ return recompose (file_sources [file_name], "\n"); }
Definition at line 180 of file type_props.hpp.
{ return typename format<C>::FT (x); }
Definition at line 115 of file iterator.hpp.
References CF().
Referenced by binary_helper< format< T > >::assemble(), CF1(), CF2(), CF3(), format_as_helper< FT, T, F >::cv(), fast(), fill(), iterate(), format_binary_map_helper< Op, FT, R, C1, C2 >::op(), format_binary_map_scalar_helper< Op, FT, R, C1, C2 >::op(), format_unary_map_helper< Op, FT, R, C >::op(), format_function_helper< FT, R, C, Fun >::op(), format_binary_helper< FT, T >::read(), REP_STRUCT_2(), seq(), slow(), slow_as(), vec(), and vector< observer >::vector().
{ return format<Iterator > (CF (it)); }
format<typename coefficient1_type_helper< C >::val > mmx::get_format1 | ( | const format< C > & | fm | ) | [inline] |
Definition at line 190 of file type_props.hpp.
References empty_format::format1().
{
return format<Coefficient1_type(C) > (fm.format1 ());
}
format<typename coefficient2_type_helper< C >::val > mmx::get_format2 | ( | const format< C > & | fm | ) | [inline] |
Definition at line 195 of file type_props.hpp.
References empty_format::format2().
{
return format<Coefficient2_type(C) > (fm.format2 ());
}
C mmx::get_genalias | ( | const generic_alias< C > & | a | ) | [inline] |
Definition at line 134 of file alias.hpp.
Referenced by WRAP_WRAPPED_IMPL().
{
return as<C> ((*a)->get ()); }
Definition at line 583 of file string.cpp.
References min(), N(), and tokenize().
Referenced by source_string_unindented().
nat get_interactive_number | ( | void | ) |
Definition at line 40 of file source_track.cpp.
References interactive_sources, and N().
Referenced by store_interactive_source().
{ return N(interactive_sources) ; }
Definition at line 59 of file source_track.cpp.
References ASSERT, interactive_sources, and N().
{ ASSERT (i < N (interactive_sources), "source out of range"); ASSERT (l < N (interactive_sources[i]), "source out of range"); return interactive_sources[i][l]; }
Definition at line 53 of file source_track.cpp.
References ASSERT, interactive_sources, N(), and recompose().
Referenced by get_source().
{ ASSERT (i < N (interactive_sources), "source out of range"); return recompose (interactive_sources[i], '\n'); }
int get_number_cores | ( | ) |
Definition at line 234 of file threads.cpp.
{ #ifdef __linux__ // also to be used for Solaris, AIX, ... int nr1= sysconf (_SC_NPROCESSORS_ONLN); if (nr1 >= 1) return nr1; #endif #ifdef __APPLE__ // also to be used for BSD system int mib[2] = { CTL_HW, HW_AVAILCPU }; //int mib[2] = { CTL_HW, HW_NCPU }; int nr2; size_t len; len = sizeof (nr2); sysctl (mib, 2, &nr2, &len, NULL, 0); if (nr2 >= 1) return nr2; #endif #ifdef __WINDOW__upcoming SYSTEM_INFO sysinfo; GetSystemInfo( &sysinfo ); int nr3= sysinfo.dwNumberOfProcessors; if (nr3 >= 1) return nr3; #endif #ifdef __HPUX__upcoming int nr4= mpctl (MPC_GETNUMSPUS, NULL, NULL); if (nr4 >= 1) return nr4; #endif #ifdef __IRIX__upcoming int nr5= sysconf (_SC_NPROC_ONLN); if (nr5 >= 1) return nr5; #endif return 1; }
C mmx::get_sample | ( | const format< C > & | fm | ) | [inline] |
Definition at line 185 of file type_props.hpp.
References format< C >::sample().
{
return fm.sample ();
}
Definition at line 120 of file iterator.hpp.
References Format, and Iterator.
Referenced by big(), format_as_helper< FT, T, F >::cv(), binary_helper< format< T > >::disassemble(), fast(), format_binary_map_helper< Op, FT, R, C1, C2 >::op(), format_binary_map_scalar_helper< Op, FT, R, C1, C2 >::op(), format_unary_map_helper< Op, FT, R, C >::op(), formatted_new_helper< FT, T >::op(), format_function_helper< FT, R, C, Fun >::op(), promote(), slow(), slow_as(), implementation< vector_abstractions, V, vector_naive >::vec_binary_big(), implementation< vector_abstractions, V, vector_naive >::vec_unary_big_dicho(), and format_binary_helper< FT, T >::write().
Definition at line 83 of file source_track.cpp.
References get_file_source(), and get_interactive_source().
{ if (file_name == "") return get_interactive_source (i); return get_file_source (file_name); }
Definition at line 89 of file source_track.cpp.
References get_file_source(), and get_interactive_source().
Referenced by source_string(), source_string_unindented(), and underlined().
{ if (file_name == "") return get_interactive_source (i, line); return get_file_source (file_name, line); }
Definition at line 187 of file heap.hpp.
Referenced by heap_iterator_rep< C >::current().
{
return h.rep->Get_top (); }
Definition at line 182 of file generic_object.cpp.
References define_user_type(), GEN_ALIAS_TYPE, GEN_GENERIC_ALIAS_TYPE, GEN_TUPLE_TYPE, is_func(), and type_id().
{ nat r= type_id (name); if (r == 1) { generic tp= name; if (is_func (tp, GEN_TUPLE_TYPE, 1)) tp= tp[1]; if (is_func (tp, GEN_ALIAS_TYPE, 1)) tp= tp[1]; if (is_func (tp, GEN_GENERIC_ALIAS_TYPE, 1)) tp= tp[1]; define_user_type (tp); r= type_id (name); } return r; }
Definition at line 87 of file alias.hpp.
{ return new global_alias_rep<C> (c); }
nat mmx::global_type_id | ( | ) | [inline] |
Definition at line 177 of file generic.hpp.
References new_type_id(), and T.
{ return new_type_id (typeid (T ()).name()); }
static bool mmx::GLUE_1 | ( | const generic & | arg_1 | ) | [static] |
Definition at line 16 of file glue_compound.cpp.
References is_generic_compound.
Referenced by glue_compound(), glue_document(), glue_double(), glue_dynamic(), glue_int(), glue_list_generic(), glue_literal(), glue_port(), glue_routine(), glue_string(), glue_syntactic(), glue_table_generic(), and glue_vector_generic().
{ return is_generic_compound (arg_1); }
static double mmx::GLUE_1 | ( | const literal & | arg_1 | ) | [static] |
Definition at line 10 of file glue_double.cpp.
References double_literal.
{ return double_literal (arg_1); }
Definition at line 9 of file glue_port.cpp.
References input_string_port().
{ return input_string_port (arg_1); }
Definition at line 10 of file glue_routine.cpp.
References as_vector().
{ return vector<routine > (as_vector (arg_1)); }
Definition at line 62 of file glue_document.cpp.
References make_math().
Referenced by glue_document(), glue_double(), glue_int(), glue_list_generic(), glue_port(), glue_routine(), glue_string(), glue_syntactic(), glue_table_generic(), and glue_vector_generic().
{ return make_math (arg_1); }
static vector<generic> mmx::GLUE_10 | ( | const vector< generic > & | arg_1, |
const vector< generic > & | arg_2 | ||
) | [static] |
Definition at line 54 of file glue_vector_generic.cpp.
References append().
{ return append (arg_1, arg_2); }
static double mmx::GLUE_10 | ( | const double & | arg_1, |
const double & | arg_2 | ||
) | [static] |
Definition at line 55 of file glue_double.cpp.
{
return arg_1 - arg_2;
}
static int mmx::GLUE_10 | ( | const int & | arg_1, |
const int & | arg_2 | ||
) | [static] |
Definition at line 55 of file glue_int.cpp.
{
return arg_1 / arg_2;
}
Definition at line 54 of file glue_list_generic.cpp.
References cons().
{ return cons (arg_1, arg_2); }
static bool mmx::GLUE_10 | ( | const port & | arg_1 | ) | [static] |
Definition at line 54 of file glue_port.cpp.
References is_input_port().
{ return is_input_port (arg_1); }
static alias<vector<routine> > mmx::GLUE_10 | ( | const alias< vector< routine > > & | arg_1, |
const vector< routine > & | arg_2 | ||
) | [static] |
Definition at line 55 of file glue_routine.cpp.
References alias_write().
{ return alias_write (arg_1, arg_2); }
Definition at line 54 of file glue_string.cpp.
References starts().
{ return starts (arg_1, arg_2); }
Definition at line 52 of file glue_syntactic.cpp.
{
return arg_1 / arg_2;
}
static bool mmx::GLUE_10 | ( | const table< generic, generic > & | arg_1, |
const tuple< generic > & | arg_2 | ||
) | [static] |
Definition at line 54 of file glue_table_generic.cpp.
References as_vector(), and contains().
Definition at line 67 of file glue_document.cpp.
References as_vector(), and make_inline().
Referenced by glue_document(), glue_double(), glue_int(), glue_list_generic(), glue_port(), glue_routine(), glue_string(), glue_syntactic(), glue_table_generic(), and glue_vector_generic().
{ return make_inline (as_vector (arg_1)); }
static double mmx::GLUE_11 | ( | const double & | arg_1, |
const double & | arg_2 | ||
) | [static] |
Definition at line 60 of file glue_double.cpp.
{
return arg_1 * arg_2;
}
static int mmx::GLUE_11 | ( | const int & | arg_1, |
const int & | arg_2 | ||
) | [static] |
static bool mmx::GLUE_11 | ( | const port & | arg_1 | ) | [static] |
Definition at line 59 of file glue_port.cpp.
References error_flag().
{ return error_flag (arg_1); }
static generic mmx::GLUE_11 | ( | const table< generic, generic > & | arg_1, |
const tuple< generic > & | arg_2 | ||
) | [static] |
Definition at line 59 of file glue_table_generic.cpp.
References as_vector().
{ return arg_1[as_vector (arg_2)]; }
static alias<vector<generic> > mmx::GLUE_11 | ( | const alias< vector< generic > > & | arg_1, |
const vector< generic > & | arg_2 | ||
) | [static] |
Definition at line 59 of file glue_vector_generic.cpp.
References alias_write().
{ return alias_write (arg_1, arg_2); }
static int mmx::GLUE_12 | ( | const int & | arg_1, |
const int & | arg_2 | ||
) | [static] |
Definition at line 64 of file glue_port.cpp.
References error_message().
{ return error_message (arg_1); }
static string mmx::GLUE_12 | ( | const string & | arg_1, |
const string & | arg_2, | ||
const string & | arg_3 | ||
) | [static] |
Definition at line 64 of file glue_string.cpp.
References replace().
{ return replace (arg_1, arg_2, arg_3); }
static vector<generic> mmx::GLUE_12 | ( | const generic & | arg_1, |
const vector< generic > & | arg_2 | ||
) | [static] |
Definition at line 64 of file glue_vector_generic.cpp.
References cons().
{ return cons (arg_1, arg_2); }
static double mmx::GLUE_12 | ( | const double & | arg_1, |
const double & | arg_2 | ||
) | [static] |
Definition at line 65 of file glue_double.cpp.
{
return arg_1 / arg_2;
}
static alias<generic> mmx::GLUE_12 | ( | const alias< table< generic, generic > > & | arg_1, |
const tuple< generic > & | arg_2 | ||
) | [static] |
Definition at line 64 of file glue_table_generic.cpp.
References as_vector().
{ return alias_access<generic > (arg_1, as_vector (arg_2)); }
Definition at line 72 of file glue_document.cpp.
References as_vector(), and make_block().
Referenced by glue_document(), glue_double(), glue_int(), glue_list_generic(), glue_port(), glue_routine(), glue_string(), glue_table_generic(), and glue_vector_generic().
{ return make_block (as_vector (arg_1)); }
static double mmx::GLUE_13 | ( | const double & | arg_1 | ) | [static] |
static bool mmx::GLUE_13 | ( | const int & | arg_1, |
const int & | arg_2 | ||
) | [static] |
Definition at line 70 of file glue_int.cpp.
References divides().
{ return divides (arg_1, arg_2); }
Definition at line 69 of file glue_list_generic.cpp.
References is_nil().
{ return is_nil (arg_1); }
Definition at line 69 of file glue_string.cpp.
References search_forwards().
{ return search_forwards (arg_1, arg_2, arg_3); }
static void mmx::GLUE_13 | ( | const alias< table< generic, generic > > & | arg_1, |
const tuple< generic > & | arg_2 | ||
) | [static] |
Definition at line 69 of file glue_table_generic.cpp.
References alias_reset(), and as_vector().
{ alias_reset (arg_1, as_vector (arg_2)); }
static bool mmx::GLUE_13 | ( | const port & | arg_1 | ) | [static] |
Definition at line 77 of file glue_document.cpp.
References as_vector(), and make_row().
Referenced by glue_document(), glue_double(), glue_int(), glue_list_generic(), glue_port(), glue_routine(), glue_string(), glue_table_generic(), and glue_vector_generic().
static double mmx::GLUE_14 | ( | const double & | arg_1, |
const double & | arg_2 | ||
) | [static] |
Definition at line 75 of file glue_double.cpp.
References mmx_pow.
Referenced by glue_double(), glue_int(), glue_list_generic(), glue_port(), glue_routine(), glue_string(), glue_table_generic(), and glue_vector_generic().
{ return mmx_pow (arg_1, arg_2); }
Definition at line 74 of file glue_list_generic.cpp.
References is_atom().
{ return is_atom (arg_1); }
static int mmx::GLUE_14 | ( | const port & | arg_1 | ) | [static] |
Definition at line 74 of file glue_string.cpp.
References search_backwards().
{ return search_backwards (arg_1, arg_2, arg_3); }
static bool mmx::GLUE_14 | ( | const int & | arg_1, |
const int & | arg_2 | ||
) | [static] |
Definition at line 75 of file glue_int.cpp.
{
return arg_1 < arg_2;
}
static void mmx::GLUE_14 | ( | const table< generic, generic > & | arg_1, |
const tuple< generic > & | arg_2, | ||
const generic & | arg_3 | ||
) | [static] |
Definition at line 74 of file glue_table_generic.cpp.
References as_vector(), and inside_set().
{ inside_set (arg_1, as_vector (arg_2), arg_3); }
Definition at line 79 of file glue_vector_generic.cpp.
References is_nil().
{ return is_nil (arg_1); }
Definition at line 79 of file glue_list_generic.cpp.
References insert().
{ return insert (arg_1, arg_2); }
static double mmx::GLUE_15 | ( | const double & | arg_1 | ) | [static] |
Definition at line 80 of file glue_double.cpp.
References mmx_exp.
Referenced by glue_double(), glue_int(), glue_list_generic(), glue_port(), glue_routine(), glue_string(), and glue_vector_generic().
{ return mmx_exp (arg_1); }
static bool mmx::GLUE_15 | ( | const int & | arg_1, |
const int & | arg_2 | ||
) | [static] |
Definition at line 80 of file glue_int.cpp.
{
return arg_1 <= arg_2;
}
static int mmx::GLUE_15 | ( | const port & | arg_1 | ) | [static] |
static bool mmx::GLUE_16 | ( | const int & | arg_1, |
const int & | arg_2 | ||
) | [static] |
Definition at line 85 of file glue_int.cpp.
{
return arg_1 > arg_2;
}
Definition at line 84 of file glue_list_generic.cpp.
References find().
{ return find (arg_1, arg_2); }
static vector<routine> mmx::GLUE_16 | ( | const vector< routine > & | arg_1, |
const routine & | arg_2 | ||
) | [static] |
Definition at line 85 of file glue_routine.cpp.
References insert().
{ return insert (arg_1, arg_2); }
Definition at line 84 of file glue_vector_generic.cpp.
References is_atom().
{ return is_atom (arg_1); }
static double mmx::GLUE_16 | ( | const double & | arg_1 | ) | [static] |
Definition at line 85 of file glue_double.cpp.
References mmx_log.
Referenced by glue_double(), glue_int(), glue_list_generic(), glue_port(), glue_routine(), glue_string(), and glue_vector_generic().
{ return mmx_log (arg_1); }
static double mmx::GLUE_17 | ( | const double & | arg_1 | ) | [static] |
Definition at line 90 of file glue_double.cpp.
References mmx_cos.
Referenced by glue_double(), glue_int(), glue_list_generic(), glue_port(), glue_routine(), glue_string(), and glue_vector_generic().
{ return mmx_cos (arg_1); }
static bool mmx::GLUE_17 | ( | const int & | arg_1, |
const int & | arg_2 | ||
) | [static] |
Definition at line 90 of file glue_int.cpp.
{
return arg_1 >= arg_2;
}
Definition at line 89 of file glue_list_generic.cpp.
References contains().
{ return contains (arg_1, arg_2); }
Definition at line 89 of file glue_string.cpp.
References upcase_first().
{ return upcase_first (arg_1); }
static vector<generic> mmx::GLUE_17 | ( | const vector< generic > & | arg_1, |
const generic & | arg_2 | ||
) | [static] |
Definition at line 89 of file glue_vector_generic.cpp.
References insert().
{ return insert (arg_1, arg_2); }
static void mmx::GLUE_18 | ( | const port & | arg_1 | ) | [static] |
Definition at line 95 of file glue_routine.cpp.
References contains().
{ return contains (arg_1, arg_2); }
Definition at line 94 of file glue_vector_generic.cpp.
References find().
{ return find (arg_1, arg_2); }
Definition at line 94 of file glue_string.cpp.
References locase_first().
{ return locase_first (arg_1); }
static int mmx::GLUE_18 | ( | const int & | arg_1 | ) | [static] |
static double mmx::GLUE_18 | ( | const double & | arg_1 | ) | [static] |
Definition at line 95 of file glue_double.cpp.
References mmx_sin.
Referenced by glue_double(), glue_int(), glue_port(), glue_routine(), glue_string(), and glue_vector_generic().
{ return mmx_sin (arg_1); }
static double mmx::GLUE_19 | ( | const double & | arg_1 | ) | [static] |
Definition at line 100 of file glue_double.cpp.
References mmx_tan.
Referenced by glue_double(), glue_int(), glue_port(), glue_routine(), glue_string(), and glue_vector_generic().
{ return mmx_tan (arg_1); }
static int mmx::GLUE_19 | ( | const int & | arg_1, |
const int & | arg_2 | ||
) | [static] |
static bool mmx::GLUE_19 | ( | const port & | arg_1, |
const int & | arg_2 | ||
) | [static] |
Definition at line 100 of file glue_routine.cpp.
{
return as<vector<generic> > (arg_1);
}
Definition at line 99 of file glue_vector_generic.cpp.
References contains().
{ return contains (arg_1, arg_2); }
Definition at line 21 of file glue_compound.cpp.
References as_vector().
Referenced by glue_compound(), glue_document(), glue_double(), glue_dynamic(), glue_int(), glue_list_generic(), glue_literal(), glue_port(), glue_routine(), glue_string(), glue_syntactic(), glue_table_generic(), and glue_vector_generic().
Definition at line 22 of file glue_document.cpp.
{ return document (arg_1); }
static int mmx::GLUE_2 | ( | const string & | arg_1 | ) | [static] |
Definition at line 15 of file glue_routine.cpp.
References as_vector().
{ return vector<routine > (as_vector (arg_1)); }
Definition at line 14 of file glue_string.cpp.
{
return arg_1 (arg_2, arg_3);
}
Definition at line 12 of file glue_syntactic.cpp.
References as_generic().
{ return as_generic (arg_1); }
Definition at line 14 of file glue_table_generic.cpp.
{ return table<generic, generic > (arg_1); }
static double mmx::GLUE_2 | ( | const int & | arg_1 | ) | [static] |
Definition at line 15 of file glue_double.cpp.
{
return double (arg_1);
}
static int mmx::GLUE_20 | ( | const int & | arg_1, |
const int & | arg_2 | ||
) | [static] |
Definition at line 104 of file glue_vector_generic.cpp.
{
return -arg_1;
}
static double mmx::GLUE_20 | ( | const double & | arg_1 | ) | [static] |
Definition at line 105 of file glue_double.cpp.
References mmx_acos.
Referenced by glue_double(), glue_int(), glue_port(), glue_string(), and glue_vector_generic().
{ return mmx_acos (arg_1); }
static double mmx::GLUE_21 | ( | const double & | arg_1 | ) | [static] |
Definition at line 110 of file glue_double.cpp.
References mmx_asin.
Referenced by glue_double(), glue_int(), glue_port(), and glue_vector_generic().
{ return mmx_asin (arg_1); }
static int mmx::GLUE_21 | ( | ) | [static] |
Definition at line 110 of file glue_int.cpp.
{
return rand ();
}
Definition at line 109 of file glue_vector_generic.cpp.
References square().
{ return square (arg_1); }
Definition at line 109 of file glue_port.cpp.
References component().
{ return component (arg_1, arg_2); }
static double mmx::GLUE_22 | ( | const double & | arg_1 | ) | [static] |
Definition at line 115 of file glue_double.cpp.
References mmx_atan.
Referenced by glue_double(), glue_port(), and glue_vector_generic().
{ return mmx_atan (arg_1); }
static int mmx::GLUE_22 | ( | const int & | arg_1 | ) | [static] |
Definition at line 114 of file glue_port.cpp.
References wait_port_event().
{ return wait_port_event (arg_1); }
static vector<generic> mmx::GLUE_22 | ( | const vector< generic > & | arg_1, |
const vector< generic > & | arg_2 | ||
) | [static] |
Definition at line 114 of file glue_vector_generic.cpp.
{
return arg_1 + arg_2;
}
static bool mmx::GLUE_23 | ( | const double & | arg_1, |
const double & | arg_2 | ||
) | [static] |
Definition at line 120 of file glue_double.cpp.
Referenced by glue_double(), glue_port(), and glue_vector_generic().
{
return arg_1 < arg_2;
}
Definition at line 119 of file glue_port.cpp.
{
return arg_1 << arg_2;
}
static vector<generic> mmx::GLUE_23 | ( | const vector< generic > & | arg_1, |
const vector< generic > & | arg_2 | ||
) | [static] |
Definition at line 119 of file glue_vector_generic.cpp.
{
return arg_1 - arg_2;
}
static bool mmx::GLUE_24 | ( | const double & | arg_1, |
const double & | arg_2 | ||
) | [static] |
Definition at line 125 of file glue_double.cpp.
Referenced by glue_double(), glue_port(), and glue_vector_generic().
{
return arg_1 <= arg_2;
}
Definition at line 124 of file glue_port.cpp.
{
return arg_1 << arg_2;
}
static vector<generic> mmx::GLUE_24 | ( | const vector< generic > & | arg_1, |
const vector< generic > & | arg_2 | ||
) | [static] |
Definition at line 124 of file glue_vector_generic.cpp.
{
return arg_1 * arg_2;
}
static bool mmx::GLUE_25 | ( | const double & | arg_1, |
const double & | arg_2 | ||
) | [static] |
Definition at line 130 of file glue_double.cpp.
Referenced by glue_double(), glue_port(), and glue_vector_generic().
{
return arg_1 > arg_2;
}
static generic mmx::GLUE_25 | ( | const vector< generic > & | arg_1, |
const vector< generic > & | arg_2 | ||
) | [static] |
Definition at line 129 of file glue_vector_generic.cpp.
References dot().
{ return dot (arg_1, arg_2); }
Definition at line 129 of file glue_port.cpp.
References generic_assemble().
{ return generic_assemble (arg_1); }
static bool mmx::GLUE_26 | ( | const double & | arg_1, |
const double & | arg_2 | ||
) | [static] |
Definition at line 135 of file glue_double.cpp.
Referenced by glue_double(), glue_port(), and glue_vector_generic().
{
return arg_1 >= arg_2;
}
Definition at line 134 of file glue_port.cpp.
References generic_disassemble().
{ return generic_disassemble (arg_1); }
Definition at line 134 of file glue_vector_generic.cpp.
References big_mul().
{ return big_mul (arg_1); }
Definition at line 139 of file glue_vector_generic.cpp.
References big_add().
{ return big_add (arg_1); }
static double mmx::GLUE_27 | ( | const double & | arg_1 | ) | [static] |
Definition at line 140 of file glue_double.cpp.
References abs().
Referenced by glue_double(), glue_port(), and glue_vector_generic().
{ return abs (arg_1); }
Definition at line 139 of file glue_port.cpp.
References binary_write_generic().
{ binary_write_generic (arg_1, arg_2); }
Definition at line 144 of file glue_port.cpp.
References binary_read_generic().
{ return binary_read_generic (arg_1); }
static double mmx::GLUE_28 | ( | const double & | arg_1, |
const double & | arg_2 | ||
) | [static] |
Definition at line 145 of file glue_double.cpp.
References min().
Referenced by glue_double(), glue_port(), and glue_vector_generic().
{ return min (arg_1, arg_2); }
static vector<generic> mmx::GLUE_28 | ( | const vector< generic > & | arg_1, |
const vector< generic > & | arg_2 | ||
) | [static] |
Definition at line 144 of file glue_vector_generic.cpp.
{
return arg_1 / arg_2;
}
static double mmx::GLUE_29 | ( | const double & | arg_1, |
const double & | arg_2 | ||
) | [static] |
Definition at line 150 of file glue_double.cpp.
References max().
Referenced by glue_double(), and glue_vector_generic().
{ return max (arg_1, arg_2); }
static bool mmx::GLUE_29 | ( | const vector< generic > & | arg_1, |
const vector< generic > & | arg_2 | ||
) | [static] |
Definition at line 149 of file glue_vector_generic.cpp.
{
return arg_1 <= arg_2;
}
Definition at line 26 of file glue_compound.cpp.
Referenced by glue_compound(), glue_document(), glue_double(), glue_dynamic(), glue_int(), glue_list_generic(), glue_literal(), glue_port(), glue_routine(), glue_string(), glue_syntactic(), glue_table_generic(), and glue_vector_generic().
{ return compound (arg_1); }
Definition at line 27 of file glue_document.cpp.
References as_generic().
{ return as_generic (arg_1); }
Definition at line 19 of file glue_dynamic.cpp.
References as_vector().
static string mmx::GLUE_3 | ( | const int & | arg_1 | ) | [static] |
Definition at line 24 of file glue_literal.cpp.
{
return *arg_1;
}
Definition at line 19 of file glue_port.cpp.
References output_file_port().
{ return output_file_port (arg_1); }
Definition at line 20 of file glue_routine.cpp.
References iterate().
{ return as<iterator<generic> > (iterate (arg_1)); }
Definition at line 17 of file glue_syntactic.cpp.
References as_string().
{ return as_string (arg_1); }
Definition at line 19 of file glue_table_generic.cpp.
References entries().
{ return entries (arg_1); }
Definition at line 19 of file glue_vector_generic.cpp.
References as_vector().
{ return vector<generic > (as_vector (arg_1)); }
Definition at line 19 of file glue_string.cpp.
{
return arg_1 * arg_2;
}
Definition at line 19 of file glue_list_generic.cpp.
References iterate().
{ return iterate (arg_1); }
static int mmx::GLUE_3 | ( | const double & | arg_1 | ) | [static] |
static double mmx::GLUE_30 | ( | const double & | arg_1 | ) | [static] |
Definition at line 155 of file glue_double.cpp.
References mmx_floor.
Referenced by glue_double(), and glue_vector_generic().
{ return mmx_floor (arg_1); }
static bool mmx::GLUE_30 | ( | const vector< generic > & | arg_1, |
const vector< generic > & | arg_2 | ||
) | [static] |
Definition at line 154 of file glue_vector_generic.cpp.
{
return arg_1 >= arg_2;
}
static double mmx::GLUE_31 | ( | const double & | arg_1 | ) | [static] |
Definition at line 160 of file glue_double.cpp.
References mmx_ceil.
Referenced by glue_double(), and glue_vector_generic().
{ return mmx_ceil (arg_1); }
static bool mmx::GLUE_31 | ( | const vector< generic > & | arg_1, |
const vector< generic > & | arg_2 | ||
) | [static] |
Definition at line 159 of file glue_vector_generic.cpp.
{
return arg_1 < arg_2;
}
static bool mmx::GLUE_32 | ( | const vector< generic > & | arg_1, |
const vector< generic > & | arg_2 | ||
) | [static] |
Definition at line 164 of file glue_vector_generic.cpp.
{
return arg_1 > arg_2;
}
static double mmx::GLUE_32 | ( | const double & | arg_1 | ) | [static] |
Definition at line 165 of file glue_double.cpp.
References mmx_trunc.
Referenced by glue_double(), and glue_vector_generic().
{ return mmx_trunc (arg_1); }
static double mmx::GLUE_33 | ( | const double & | arg_1 | ) | [static] |
Definition at line 170 of file glue_double.cpp.
References mmx_round.
Referenced by glue_double(), and glue_vector_generic().
{ return mmx_round (arg_1); }
static bool mmx::GLUE_34 | ( | const double & | arg_1 | ) | [static] |
Definition at line 175 of file glue_double.cpp.
References is_finite().
Referenced by glue_double(), and glue_vector_generic().
{ return is_finite (arg_1); }
static bool mmx::GLUE_35 | ( | const double & | arg_1 | ) | [static] |
Definition at line 180 of file glue_double.cpp.
References is_infinite().
Referenced by glue_double(), and glue_vector_generic().
{ return is_infinite (arg_1); }
static vector<generic> mmx::GLUE_36 | ( | const vector< generic > & | arg_1, |
const vector< generic > & | arg_2 | ||
) | [static] |
Definition at line 184 of file glue_vector_generic.cpp.
References pow().
{ return pow (arg_1, arg_2); }
static bool mmx::GLUE_36 | ( | const double & | arg_1 | ) | [static] |
Definition at line 185 of file glue_double.cpp.
References is_nan().
Referenced by glue_double(), and glue_vector_generic().
{ return is_nan (arg_1); }
static double mmx::GLUE_37 | ( | const double & | arg_1 | ) | [static] |
Definition at line 190 of file glue_double.cpp.
References times_infinity().
Referenced by glue_double(), and glue_vector_generic().
{ return times_infinity (arg_1); }
static int mmx::GLUE_38 | ( | const double & | arg_1 | ) | [static] |
Definition at line 195 of file glue_double.cpp.
References precision().
Referenced by glue_double(), and glue_vector_generic().
{ return precision (arg_1); }
static double mmx::GLUE_39 | ( | const double & | arg_1 | ) | [static] |
Definition at line 200 of file glue_double.cpp.
References next_above().
Referenced by glue_double(), and glue_vector_generic().
{ return next_above (arg_1); }
Definition at line 31 of file glue_compound.cpp.
References as_vector().
Referenced by glue_compound(), glue_document(), glue_double(), glue_dynamic(), glue_int(), glue_list_generic(), glue_literal(), glue_port(), glue_routine(), glue_string(), glue_syntactic(), glue_table_generic(), and glue_vector_generic().
{ return as_vector (arg_1); }
static string mmx::GLUE_4 | ( | const int & | arg_1 | ) | [static] |
Definition at line 25 of file glue_int.cpp.
References as_string_hexa().
{ return as_string_hexa (arg_1); }
Definition at line 29 of file glue_literal.cpp.
References as_vector(), and literal_apply.
{ return literal_apply (arg_1, as_vector (arg_2)); }
Definition at line 24 of file glue_port.cpp.
References socket_server_port().
{ return socket_server_port (arg_1, arg_2); }
Definition at line 24 of file glue_string.cpp.
{
return arg_1 * arg_2;
}
Definition at line 32 of file glue_document.cpp.
{ return document (arg_1); }
Definition at line 24 of file glue_vector_generic.cpp.
References iterate().
{ return iterate (arg_1); }
static double mmx::GLUE_40 | ( | const double & | arg_1 | ) | [static] |
Definition at line 205 of file glue_double.cpp.
References next_below().
Referenced by glue_double(), and glue_vector_generic().
{ return next_below (arg_1); }
static int mmx::GLUE_41 | ( | const double & | arg_1 | ) | [static] |
Definition at line 210 of file glue_double.cpp.
References exponent().
Referenced by glue_double(), and glue_vector_generic().
{ return exponent (arg_1); }
static double mmx::GLUE_42 | ( | const double & | arg_1 | ) | [static] |
Definition at line 215 of file glue_double.cpp.
References magnitude().
Referenced by glue_double(), and glue_vector_generic().
{ return magnitude (arg_1); }
static double mmx::GLUE_43 | ( | const double & | arg_1, |
const int & | arg_2 | ||
) | [static] |
Definition at line 220 of file glue_double.cpp.
References incexp2().
Referenced by glue_double(), and glue_vector_generic().
{ return incexp2 (arg_1, arg_2); }
Definition at line 219 of file glue_vector_generic.cpp.
References derive().
{ return derive (arg_1); }
Definition at line 224 of file glue_vector_generic.cpp.
References integrate().
{ return integrate (arg_1); }
static double mmx::GLUE_44 | ( | const double & | arg_1, |
const int & | arg_2 | ||
) | [static] |
Definition at line 225 of file glue_double.cpp.
References decexp2().
Referenced by glue_double(), and glue_vector_generic().
{ return decexp2 (arg_1, arg_2); }
static double mmx::GLUE_45 | ( | const double & | arg_1 | ) | [static] |
Definition at line 230 of file glue_double.cpp.
References rounding_error().
Referenced by glue_double().
{ return rounding_error (arg_1); }
static double mmx::GLUE_46 | ( | const double & | arg_1 | ) | [static] |
Definition at line 235 of file glue_double.cpp.
References additive_error().
Referenced by glue_double().
{ return additive_error (arg_1); }
static double mmx::GLUE_47 | ( | const double & | arg_1 | ) | [static] |
Definition at line 240 of file glue_double.cpp.
References multiplicative_error().
Referenced by glue_double().
{ return multiplicative_error (arg_1); }
static double mmx::GLUE_48 | ( | const double & | arg_1 | ) | [static] |
Definition at line 245 of file glue_double.cpp.
References elementary_error().
Referenced by glue_double().
{ return elementary_error (arg_1); }
Definition at line 30 of file glue_routine.cpp.
{
return arg_1[arg_2];
}
Definition at line 29 of file glue_port.cpp.
References socket_client_port().
{ return socket_client_port (arg_1, arg_2); }
Definition at line 34 of file glue_literal.cpp.
References as_vector(), and literal_access.
{ return literal_access (arg_1, as_vector (arg_2)); }
static int mmx::GLUE_5 | ( | const compound & | arg_1 | ) | [static] |
Definition at line 36 of file glue_compound.cpp.
References compound_size.
Referenced by glue_compound(), glue_document(), glue_double(), glue_int(), glue_list_generic(), glue_literal(), glue_port(), glue_routine(), glue_string(), glue_syntactic(), glue_table_generic(), and glue_vector_generic().
{ return compound_size (arg_1); }
Definition at line 37 of file glue_document.cpp.
References as_vector(), and make_texmacs().
{ return make_texmacs (arg_1, as_vector (arg_2)); }
static string mmx::GLUE_5 | ( | const double & | arg_1 | ) | [static] |
Definition at line 30 of file glue_double.cpp.
References as_string().
{ return as_string (arg_1); }
static int mmx::GLUE_5 | ( | const int & | arg_1 | ) | [static] |
Definition at line 30 of file glue_int.cpp.
{
return -arg_1;
}
Definition at line 29 of file glue_list_generic.cpp.
{
return arg_1[arg_2];
}
Definition at line 29 of file glue_string.cpp.
References alias_write().
{ return alias_write (arg_1, arg_2); }
Definition at line 27 of file glue_syntactic.cpp.
{
return -arg_1;
}
Definition at line 29 of file glue_table_generic.cpp.
References contains().
{ return contains (arg_1, arg_2); }
Definition at line 42 of file glue_document.cpp.
References as_vector(), and make_texmacs().
{ return make_texmacs (arg_1, as_vector (arg_2)); }
static double mmx::GLUE_6 | ( | const double & | arg_1, |
const double & | arg_2 | ||
) | [static] |
Definition at line 35 of file glue_double.cpp.
References uniform_deviate().
{ return uniform_deviate (arg_1, arg_2); }
static alias<generic> mmx::GLUE_6 | ( | const alias< list< generic > > & | arg_1, |
const int & | arg_2 | ||
) | [static] |
Definition at line 34 of file glue_list_generic.cpp.
{
return alias_access<generic > (arg_1, arg_2);
}
static alias<routine> mmx::GLUE_6 | ( | const alias< vector< routine > > & | arg_1, |
const int & | arg_2 | ||
) | [static] |
Definition at line 35 of file glue_routine.cpp.
{
return alias_access<routine > (arg_1, arg_2);
}
Definition at line 34 of file glue_string.cpp.
{
return arg_1 < arg_2;
}
Definition at line 34 of file glue_vector_generic.cpp.
{
return arg_1[arg_2];
}
static int mmx::GLUE_6 | ( | const int & | arg_1 | ) | [static] |
Definition at line 41 of file glue_compound.cpp.
References compound_access.
Referenced by glue_compound(), glue_document(), glue_double(), glue_int(), glue_list_generic(), glue_port(), glue_routine(), glue_string(), glue_syntactic(), glue_table_generic(), and glue_vector_generic().
{ return compound_access (arg_1, arg_2); }
static generic mmx::GLUE_6 | ( | const table< generic, generic > & | arg_1, |
const generic & | arg_2 | ||
) | [static] |
Definition at line 34 of file glue_table_generic.cpp.
{
return arg_1[arg_2];
}
Definition at line 46 of file glue_compound.cpp.
References as_vector().
Referenced by glue_compound(), glue_document(), glue_double(), glue_int(), glue_list_generic(), glue_port(), glue_routine(), glue_string(), glue_syntactic(), glue_table_generic(), and glue_vector_generic().
{ return as_vector (arg_1); }
Definition at line 47 of file glue_document.cpp.
References make_text().
{ return make_text (arg_1); }
static double mmx::GLUE_7 | ( | const double & | arg_1 | ) | [static] |
Definition at line 40 of file glue_double.cpp.
{
return -arg_1;
}
static list<generic> mmx::GLUE_7 | ( | const list< generic > & | arg_1, |
const int & | arg_2, | ||
const int & | arg_3 | ||
) | [static] |
Definition at line 39 of file glue_list_generic.cpp.
References range().
{ return range (arg_1, arg_2, arg_3); }
static int mmx::GLUE_7 | ( | const int & | arg_1, |
const int & | arg_2 | ||
) | [static] |
Definition at line 40 of file glue_int.cpp.
{
return arg_1 + arg_2;
}
Definition at line 39 of file glue_port.cpp.
References as_vector(), and composite_port().
{ return composite_port (as_vector (arg_1)); }
static vector<routine> mmx::GLUE_7 | ( | const vector< routine > & | arg_1, |
const int & | arg_2, | ||
const int & | arg_3 | ||
) | [static] |
Definition at line 40 of file glue_routine.cpp.
References range().
{ return range (arg_1, arg_2, arg_3); }
Definition at line 37 of file glue_syntactic.cpp.
{
return arg_1 + arg_2;
}
static alias<generic> mmx::GLUE_7 | ( | const alias< table< generic, generic > > & | arg_1, |
const generic & | arg_2 | ||
) | [static] |
Definition at line 39 of file glue_table_generic.cpp.
{
return alias_access<generic > (arg_1, arg_2);
}
static alias<generic> mmx::GLUE_7 | ( | const alias< vector< generic > > & | arg_1, |
const int & | arg_2 | ||
) | [static] |
Definition at line 39 of file glue_vector_generic.cpp.
{
return alias_access<generic > (arg_1, arg_2);
}
Definition at line 39 of file glue_string.cpp.
{
return arg_1 <= arg_2;
}
static double mmx::GLUE_8 | ( | const double & | arg_1 | ) | [static] |
static int mmx::GLUE_8 | ( | const int & | arg_1, |
const int & | arg_2 | ||
) | [static] |
Definition at line 45 of file glue_int.cpp.
{
return arg_1 - arg_2;
}
Definition at line 44 of file glue_list_generic.cpp.
References reverse().
{ return reverse (arg_1); }
Definition at line 44 of file glue_port.cpp.
References error_port().
{ return error_port (arg_1); }
static void mmx::GLUE_8 | ( | const alias< table< generic, generic > > & | arg_1, |
const generic & | arg_2 | ||
) | [static] |
Definition at line 44 of file glue_table_generic.cpp.
References alias_reset().
{ alias_reset (arg_1, arg_2); }
Definition at line 44 of file glue_string.cpp.
{
return arg_1 > arg_2;
}
Definition at line 51 of file glue_compound.cpp.
References compound_arguments.
Referenced by glue_compound(), glue_document(), glue_double(), glue_int(), glue_list_generic(), glue_port(), glue_routine(), glue_string(), glue_syntactic(), glue_table_generic(), and glue_vector_generic().
{ return compound_arguments (arg_1); }
static vector<generic> mmx::GLUE_8 | ( | const vector< generic > & | arg_1, |
const int & | arg_2, | ||
const int & | arg_3 | ||
) | [static] |
Definition at line 44 of file glue_vector_generic.cpp.
References range().
{ return range (arg_1, arg_2, arg_3); }
Definition at line 42 of file glue_syntactic.cpp.
{
return arg_1 - arg_2;
}
Definition at line 52 of file glue_document.cpp.
References make_text().
{ return make_text (arg_1); }
static void mmx::GLUE_9 | ( | const table< generic, generic > & | arg_1, |
const generic & | arg_2, | ||
const generic & | arg_3 | ||
) | [static] |
Definition at line 49 of file glue_table_generic.cpp.
References inside_set().
{ inside_set (arg_1, arg_2, arg_3); }
static bool mmx::GLUE_9 | ( | const port & | arg_1 | ) | [static] |
Definition at line 49 of file glue_port.cpp.
References is_output_port().
{ return is_output_port (arg_1); }
Definition at line 57 of file glue_document.cpp.
References make_math().
{ return make_math (arg_1); }
static double mmx::GLUE_9 | ( | const double & | arg_1, |
const double & | arg_2 | ||
) | [static] |
Definition at line 50 of file glue_double.cpp.
{
return arg_1 + arg_2;
}
static int mmx::GLUE_9 | ( | const int & | arg_1, |
const int & | arg_2 | ||
) | [static] |
Definition at line 50 of file glue_int.cpp.
{
return arg_1 * arg_2;
}
Definition at line 49 of file glue_string.cpp.
{
return arg_1 >= arg_2;
}
Definition at line 47 of file glue_syntactic.cpp.
{
return arg_1 * arg_2;
}
static vector<routine> mmx::GLUE_9 | ( | const vector< routine > & | arg_1, |
const vector< routine > & | arg_2 | ||
) | [static] |
Definition at line 50 of file glue_routine.cpp.
References append().
{ return append (arg_1, arg_2); }
Definition at line 49 of file glue_vector_generic.cpp.
References reverse().
{ return reverse (arg_1); }
static list<generic> mmx::GLUE_9 | ( | const list< generic > & | arg_1, |
const list< generic > & | arg_2 | ||
) | [static] |
Definition at line 49 of file glue_list_generic.cpp.
References append().
{ return append (arg_1, arg_2); }
Definition at line 56 of file glue_compound.cpp.
References as_vector(), and compound_apply.
Referenced by glue_compound(), glue_document(), glue_double(), glue_int(), glue_list_generic(), glue_port(), glue_routine(), glue_string(), glue_syntactic(), glue_table_generic(), and glue_vector_generic().
{ return compound_apply (arg_1, as_vector (arg_2)); }
void mmx::glue_basix | ( | ) |
Definition at line 24 of file glue_basix.cpp.
References done(), glue_compound(), glue_document(), glue_double(), glue_dynamic(), glue_generic(), glue_int(), glue_list_generic(), glue_list_map(), glue_literal(), glue_port(), glue_routine(), glue_string(), glue_syntactic(), glue_table_generic(), glue_vector_generic(), glue_vector_map(), and register_glue().
{ static bool done = false; if (done) return; done = true; register_glue (string ("glue_compound"), (& (glue_compound))); register_glue (string ("glue_document"), (& (glue_document))); register_glue (string ("glue_double"), (& (glue_double))); register_glue (string ("glue_dynamic"), (& (glue_dynamic))); register_glue (string ("glue_generic"), (& (glue_generic))); register_glue (string ("glue_int"), (& (glue_int))); register_glue (string ("glue_list_generic"), (& (glue_list_generic))); register_glue (string ("glue_list_map"), (& (glue_list_map))); register_glue (string ("glue_literal"), (& (glue_literal))); register_glue (string ("glue_port"), (& (glue_port))); register_glue (string ("glue_routine"), (& (glue_routine))); register_glue (string ("glue_string"), (& (glue_string))); register_glue (string ("glue_syntactic"), (& (glue_syntactic))); register_glue (string ("glue_table_generic"), (& (glue_table_generic))); register_glue (string ("glue_vector_generic"), (& (glue_vector_generic))); register_glue (string ("glue_vector_map"), (& (glue_vector_map))); register_glue (string ("glue_basix"), (& (glue_basix))); glue_compound (); glue_document (); glue_double (); glue_dynamic (); glue_generic (); glue_int (); glue_list_generic (); glue_list_map (); glue_literal (); glue_port (); glue_routine (); glue_string (); glue_syntactic (); glue_table_generic (); glue_vector_generic (); glue_vector_map (); }
void glue_compound | ( | ) |
Definition at line 61 of file glue_compound.cpp.
References call_glue(), define(), done(), GLUE_1(), GLUE_2(), GLUE_3(), GLUE_4(), GLUE_5(), GLUE_6(), GLUE_7(), GLUE_8(), and GLUE_9().
Referenced by glue_basix().
{ static bool done = false; if (done) return; done = true; call_glue (string ("glue_vector_generic")); define ("compound?", GLUE_1); define ("compound", GLUE_2); define ("as_compound", GLUE_3); define ("as_vector", GLUE_4); define ("#", GLUE_5); define (".[]", GLUE_6); define ("components", GLUE_7); define ("arguments", GLUE_8); define (".()", GLUE_9); }
void glue_document | ( | ) |
Definition at line 82 of file glue_document.cpp.
References call_glue(), define(), define_converter(), done(), GLUE_1(), GLUE_10(), GLUE_11(), GLUE_12(), GLUE_13(), GLUE_2(), GLUE_3(), GLUE_4(), GLUE_5(), GLUE_6(), GLUE_7(), GLUE_8(), GLUE_9(), lit(), and PENALTY_INCLUSION.
Referenced by glue_basix().
{ static bool done = false; if (done) return; done = true; call_glue (string ("glue_literal")); define_type<document > (lit ("Document")); define ("document", GLUE_1); define ("document", GLUE_2); define ("as_generic", GLUE_3); define_converter ("upgrade", GLUE_4, PENALTY_INCLUSION); define ("$tm", GLUE_5); define ("$tm", GLUE_6); define ("$text", GLUE_7); define ("$text", GLUE_8); define ("$math", GLUE_9); define ("$math", GLUE_10); define ("$inline", GLUE_11); define ("$block", GLUE_12); define ("(.)", GLUE_13); }
void glue_double | ( | ) |
Definition at line 250 of file glue_double.cpp.
References define(), define_converter(), done(), GLUE_1(), GLUE_10(), GLUE_11(), GLUE_12(), GLUE_13(), GLUE_14(), GLUE_15(), GLUE_16(), GLUE_17(), GLUE_18(), GLUE_19(), GLUE_2(), GLUE_20(), GLUE_21(), GLUE_22(), GLUE_23(), GLUE_24(), GLUE_25(), GLUE_26(), GLUE_27(), GLUE_28(), GLUE_29(), GLUE_3(), GLUE_30(), GLUE_31(), GLUE_32(), GLUE_33(), GLUE_34(), GLUE_35(), GLUE_36(), GLUE_37(), GLUE_38(), GLUE_39(), GLUE_4(), GLUE_40(), GLUE_41(), GLUE_42(), GLUE_43(), GLUE_44(), GLUE_45(), GLUE_46(), GLUE_47(), GLUE_48(), GLUE_5(), GLUE_6(), GLUE_7(), GLUE_8(), GLUE_9(), lit(), and PENALTY_INCLUSION.
Referenced by glue_basix().
{ static bool done = false; if (done) return; done = true; define_type<double > (lit ("Double")); define ("literal_floating", GLUE_1); define_converter ("upgrade", GLUE_2, PENALTY_INCLUSION); define ("as_int", GLUE_3); define ("as_double", GLUE_4); define ("as_string", GLUE_5); define ("uniform_deviate", GLUE_6); define ("-", GLUE_7); define ("square", GLUE_8); define ("+", GLUE_9); define ("-", GLUE_10); define ("*", GLUE_11); define ("/", GLUE_12); define ("sqrt", GLUE_13); define ("^", GLUE_14); define ("exp", GLUE_15); define ("log", GLUE_16); define ("cos", GLUE_17); define ("sin", GLUE_18); define ("tan", GLUE_19); define ("arccos", GLUE_20); define ("arcsin", GLUE_21); define ("arctan", GLUE_22); define ("<", GLUE_23); define ("<=", GLUE_24); define (">", GLUE_25); define (">=", GLUE_26); define ("abs", GLUE_27); define ("min", GLUE_28); define ("max", GLUE_29); define ("floor", GLUE_30); define ("ceil", GLUE_31); define ("trunc", GLUE_32); define ("round", GLUE_33); define ("finite?", GLUE_34); define ("infinite?", GLUE_35); define ("nan?", GLUE_36); define ("times_infinity", GLUE_37); define ("precision", GLUE_38); define ("next_above", GLUE_39); define ("next_below", GLUE_40); define ("exponent", GLUE_41); define ("magnitude", GLUE_42); define ("increase_exponent", GLUE_43); define ("decrease_exponent", GLUE_44); define ("rounding_error", GLUE_45); define ("additive_error", GLUE_46); define ("multiplicative_error", GLUE_47); define ("elementary_error", GLUE_48); }
void glue_dynamic | ( | ) |
Definition at line 29 of file glue_dynamic.cpp.
References define(), done(), GLUE_1(), GLUE_2(), GLUE_3(), GLUE_4(), and lit().
Referenced by glue_basix().
void glue_generic | ( | ) |
Definition at line 6 of file glue_generic.cpp.
References done().
Referenced by glue_basix().
{ static bool done = false; if (done) return; done = true; }
void glue_int | ( | ) |
Definition at line 115 of file glue_int.cpp.
References define(), done(), GLUE_1(), GLUE_10(), GLUE_11(), GLUE_12(), GLUE_13(), GLUE_14(), GLUE_15(), GLUE_16(), GLUE_17(), GLUE_18(), GLUE_19(), GLUE_2(), GLUE_20(), GLUE_21(), GLUE_3(), GLUE_4(), GLUE_5(), GLUE_6(), GLUE_7(), GLUE_8(), GLUE_9(), and lit().
Referenced by glue_basix().
{ static bool done = false; if (done) return; done = true; define_type<int > (lit ("Int")); define ("literal_integer", GLUE_1); define ("as_int", GLUE_2); define ("as_string", GLUE_3); define ("as_string_hexa", GLUE_4); define ("-", GLUE_5); define ("square", GLUE_6); define ("+", GLUE_7); define ("-", GLUE_8); define ("*", GLUE_9); define ("div", GLUE_10); define ("quo", GLUE_11); define ("rem", GLUE_12); define ("divides?", GLUE_13); define ("<", GLUE_14); define ("<=", GLUE_15); define (">", GLUE_16); define (">=", GLUE_17); define ("abs", GLUE_18); define ("min", GLUE_19); define ("max", GLUE_20); define ("random", GLUE_21); }
void glue_list_generic | ( | ) |
Definition at line 94 of file glue_list_generic.cpp.
References call_glue(), define(), define_converter(), done(), gen(), GLUE_1(), GLUE_10(), GLUE_11(), GLUE_12(), GLUE_13(), GLUE_14(), GLUE_15(), GLUE_16(), GLUE_17(), GLUE_2(), GLUE_3(), GLUE_4(), GLUE_5(), GLUE_6(), GLUE_7(), GLUE_8(), GLUE_9(), lit(), and PENALTY_PROMOTE_GENERIC.
Referenced by glue_basix().
{ static bool done = false; if (done) return; done = true; call_glue (string ("glue_generic")); define_type<list<generic> > (gen (lit ("List"), lit ("Generic"))); define ("list?", GLUE_1); define ("list", GLUE_2); define_converter (":>", GLUE_3, PENALTY_PROMOTE_GENERIC); define ("#", GLUE_4); define (".[]", GLUE_5); define (".[]", GLUE_6); define (".[]", GLUE_7); define ("reverse", GLUE_8); define ("><", GLUE_9); define ("cons", GLUE_10); define ("car", GLUE_11); define ("cdr", GLUE_12); define ("nil?", GLUE_13); define ("atom?", GLUE_14); define ("insert", GLUE_15); define ("find", GLUE_16); define ("contains?", GLUE_17); }
void glue_list_map | ( | ) |
Definition at line 160 of file glue_list_map.cpp.
References call_glue(), define(), done(), list_append_several(), list_apply(), list_foreach(), list_map(), list_sort(), and register_glue().
Referenced by glue_basix().
{ static bool done = false; if (done) return; done = true; register_glue ("glue_list_map", &glue_list_map); call_glue ("glue_list_generic"); define ("map", list_map); define ("foreach", list_foreach); define ("append", list_append_several); define ("apply", list_apply); define ("sort", list_sort); //define ("filter", list_filter); //define ("find_index", list_find_index); }
void glue_literal | ( | ) |
Definition at line 39 of file glue_literal.cpp.
References call_glue(), define(), done(), GLUE_1(), GLUE_2(), GLUE_3(), GLUE_4(), and GLUE_5().
Referenced by glue_basix().
void glue_port | ( | ) |
Definition at line 149 of file glue_port.cpp.
References call_glue(), define(), done(), GLUE_1(), GLUE_10(), GLUE_11(), GLUE_12(), GLUE_13(), GLUE_14(), GLUE_15(), GLUE_16(), GLUE_17(), GLUE_18(), GLUE_19(), GLUE_2(), GLUE_20(), GLUE_21(), GLUE_22(), GLUE_23(), GLUE_24(), GLUE_25(), GLUE_26(), GLUE_27(), GLUE_28(), GLUE_3(), GLUE_4(), GLUE_5(), GLUE_6(), GLUE_7(), GLUE_8(), GLUE_9(), lit(), mmerr, mmin, and mmout.
Referenced by glue_basix().
{ static bool done = false; if (done) return; done = true; call_glue (string ("glue_string")); define_type<port > (lit ("Port")); define_constant<port > ("mmin", mmin); define_constant<port > ("mmout", mmout); define_constant<port > ("mmerr", mmerr); define ("input_string_port", GLUE_1); define ("input_file_port", GLUE_2); define ("output_file_port", GLUE_3); define ("socket_server_port", GLUE_4); define ("socket_client_port", GLUE_5); define ("pipe_port", GLUE_6); define ("composite_port", GLUE_7); define ("error_port", GLUE_8); define (".output_port?", GLUE_9); define (".input_port?", GLUE_10); define (".error?", GLUE_11); define (".error", GLUE_12); define (".busy?", GLUE_13); define (".can_write", GLUE_14); define (".can_read", GLUE_15); define ("write", GLUE_16); define ("read", GLUE_17); define ("flush", GLUE_18); define ("wait", GLUE_19); define ("accept", GLUE_20); define (".[]", GLUE_21); define ("wait", GLUE_22); define ("<<", GLUE_23); define ("<<", GLUE_24); define ("binary_assemble", GLUE_25); define ("binary_disassemble", GLUE_26); define ("binary_write", GLUE_27); define ("binary_read", GLUE_28); }
void glue_routine | ( | ) |
Definition at line 105 of file glue_routine.cpp.
References call_glue(), define(), define_converter(), done(), gen(), GLUE_1(), GLUE_10(), GLUE_11(), GLUE_12(), GLUE_13(), GLUE_14(), GLUE_15(), GLUE_16(), GLUE_17(), GLUE_18(), GLUE_19(), GLUE_2(), GLUE_3(), GLUE_4(), GLUE_5(), GLUE_6(), GLUE_7(), GLUE_8(), GLUE_9(), lit(), PENALTY_CAST, and PENALTY_PROMOTE_GENERIC.
Referenced by glue_basix().
{ static bool done = false; if (done) return; done = true; call_glue (string ("glue_vector_generic")); define_type<vector<routine> > (gen (lit ("Vector"), lit ("Routine"))); define ("vector", GLUE_1); define ("[]", GLUE_2); define_converter (":>", GLUE_3, PENALTY_CAST); define ("#", GLUE_4); define (".[]", GLUE_5); define (".[]", GLUE_6); define (".[]", GLUE_7); define ("reverse", GLUE_8); define ("><", GLUE_9); define ("<<", GLUE_10); define ("cons", GLUE_11); define ("car", GLUE_12); define ("cdr", GLUE_13); define ("nil?", GLUE_14); define ("atom?", GLUE_15); define ("insert", GLUE_16); define ("find", GLUE_17); define ("contains?", GLUE_18); define_converter (":>", GLUE_19, PENALTY_PROMOTE_GENERIC); }
void glue_string | ( | ) |
Definition at line 109 of file glue_string.cpp.
References call_glue(), define(), done(), GLUE_1(), GLUE_10(), GLUE_11(), GLUE_12(), GLUE_13(), GLUE_14(), GLUE_15(), GLUE_16(), GLUE_17(), GLUE_18(), GLUE_19(), GLUE_2(), GLUE_20(), GLUE_3(), GLUE_4(), GLUE_5(), GLUE_6(), GLUE_7(), GLUE_8(), and GLUE_9().
Referenced by glue_basix().
{ static bool done = false; if (done) return; done = true; call_glue (string ("glue_vector_generic")); define ("#", GLUE_1); define (".[]", GLUE_2); define ("*", GLUE_3); define ("><", GLUE_4); define ("<<", GLUE_5); define ("<", GLUE_6); define ("<=", GLUE_7); define (">", GLUE_8); define (">=", GLUE_9); define ("starts?", GLUE_10); define ("ends?", GLUE_11); define ("replace", GLUE_12); define ("search_forwards", GLUE_13); define ("search_backwards", GLUE_14); define ("upcase", GLUE_15); define ("locase", GLUE_16); define ("upcase_first", GLUE_17); define ("locase_first", GLUE_18); define ("quote", GLUE_19); define ("unquote", GLUE_20); }
void glue_syntactic | ( | ) |
Definition at line 62 of file glue_syntactic.cpp.
References define(), done(), GLUE_1(), GLUE_10(), GLUE_11(), GLUE_2(), GLUE_3(), GLUE_4(), GLUE_5(), GLUE_6(), GLUE_7(), GLUE_8(), GLUE_9(), and lit().
Referenced by glue_basix().
{ static bool done = false; if (done) return; done = true; define_type<syntactic > (lit ("Syntactic")); define ("syntactic", GLUE_1); define ("as_generic", GLUE_2); define ("as_string", GLUE_3); define ("flatten", GLUE_4); define ("-", GLUE_5); define ("square", GLUE_6); define ("+", GLUE_7); define ("-", GLUE_8); define ("*", GLUE_9); define ("/", GLUE_10); define ("^", GLUE_11); }
void glue_table_generic | ( | ) |
Definition at line 79 of file glue_table_generic.cpp.
References call_glue(), define(), define_converter(), done(), gen(), GLUE_1(), GLUE_10(), GLUE_11(), GLUE_12(), GLUE_13(), GLUE_14(), GLUE_2(), GLUE_3(), GLUE_4(), GLUE_5(), GLUE_6(), GLUE_7(), GLUE_8(), GLUE_9(), lit(), and PENALTY_PROMOTE_GENERIC.
Referenced by glue_basix().
{ static bool done = false; if (done) return; done = true; call_glue (string ("glue_generic")); define_type<table<generic, generic> > (gen (lit ("Table"), lit ("Generic"), lit ("Generic"))); define ("table?", GLUE_1); define ("table", GLUE_2); define_converter (":>", GLUE_3, PENALTY_PROMOTE_GENERIC); define ("#", GLUE_4); define ("contains?", GLUE_5); define (".[]", GLUE_6); define (".[]", GLUE_7); define ("reset", GLUE_8); define ("set", GLUE_9); define ("contains?", GLUE_10); define (".[]", GLUE_11); define (".[]", GLUE_12); define ("reset", GLUE_13); define ("set", GLUE_14); }
void glue_vector_generic | ( | ) |
Definition at line 229 of file glue_vector_generic.cpp.
References call_glue(), define(), define_converter(), done(), gen(), GLUE_1(), GLUE_10(), GLUE_11(), GLUE_12(), GLUE_13(), GLUE_14(), GLUE_15(), GLUE_16(), GLUE_17(), GLUE_18(), GLUE_19(), GLUE_2(), GLUE_20(), GLUE_21(), GLUE_22(), GLUE_23(), GLUE_24(), GLUE_25(), GLUE_26(), GLUE_27(), GLUE_28(), GLUE_29(), GLUE_3(), GLUE_30(), GLUE_31(), GLUE_32(), GLUE_33(), GLUE_34(), GLUE_35(), GLUE_36(), GLUE_37(), GLUE_38(), GLUE_39(), GLUE_4(), GLUE_40(), GLUE_41(), GLUE_42(), GLUE_43(), GLUE_44(), GLUE_5(), GLUE_6(), GLUE_7(), GLUE_8(), GLUE_9(), lit(), and PENALTY_PROMOTE_GENERIC.
Referenced by glue_basix().
{ static bool done = false; if (done) return; done = true; call_glue (string ("glue_generic")); define_type<vector<generic> > (gen (lit ("Vector"), lit ("Generic"))); define ("vector?", GLUE_1); define ("vector", GLUE_2); define ("[]", GLUE_3); define_converter (":>", GLUE_4, PENALTY_PROMOTE_GENERIC); define ("#", GLUE_5); define (".[]", GLUE_6); define (".[]", GLUE_7); define (".[]", GLUE_8); define ("reverse", GLUE_9); define ("><", GLUE_10); define ("<<", GLUE_11); define ("cons", GLUE_12); define ("car", GLUE_13); define ("cdr", GLUE_14); define ("nil?", GLUE_15); define ("atom?", GLUE_16); define ("insert", GLUE_17); define ("find", GLUE_18); define ("contains?", GLUE_19); define ("-", GLUE_20); define ("square", GLUE_21); define ("+", GLUE_22); define ("-", GLUE_23); define ("*", GLUE_24); define ("dot", GLUE_25); define ("big_mul", GLUE_26); define ("big_add", GLUE_27); define ("/", GLUE_28); define ("<=", GLUE_29); define (">=", GLUE_30); define ("<", GLUE_31); define (">", GLUE_32); define ("sqrt", GLUE_33); define ("exp", GLUE_34); define ("log", GLUE_35); define ("^", GLUE_36); define ("cos", GLUE_37); define ("sin", GLUE_38); define ("tan", GLUE_39); define ("arccos", GLUE_40); define ("arcsin", GLUE_41); define ("arctan", GLUE_42); define ("derive", GLUE_43); define ("integrate", GLUE_44); }
void glue_vector_map | ( | ) |
Definition at line 163 of file glue_vector_map.cpp.
References call_glue(), define(), done(), register_glue(), vector_append_several(), vector_apply(), vector_foreach(), vector_map(), vector_sort(), and vector_sort_leq().
Referenced by glue_basix().
{ static bool done = false; if (done) return; done = true; register_glue ("glue_vector_map", &glue_vector_map); call_glue ("glue_vector_generic"); define ("map", vector_map); define ("foreach", vector_foreach); define ("append", vector_append_several); define ("apply", vector_apply); define ("sort", vector_sort); define ("sort", vector_sort_leq); }
bool mmx::gtr_operator | ( | const T & | x, |
const T & | y | ||
) |
Definition at line 38 of file operators.hpp.
{ return x>y; }
bool mmx::gtreq_operator | ( | const T & | x, |
const T & | y | ||
) |
Definition at line 39 of file operators.hpp.
{ return x>=y; }
Definition at line 55 of file compound.hpp.
References as_vector(), and hard_eq().
bool mmx::hard_eq | ( | const exception & | e1, |
const exception & | e2 | ||
) | [inline] |
bool mmx::hard_eq | ( | const syntactic & | c1, |
const syntactic & | c2 | ||
) | [inline] |
bool mmx::hard_eq | ( | const function_0< D > & | f, |
const function_0< D > & | g | ||
) | [inline] |
Definition at line 97 of file function.hpp.
bool mmx::hard_eq | ( | const function_1< D, S1 > & | f, |
const function_1< D, S1 > & | g | ||
) | [inline] |
Definition at line 146 of file function.hpp.
bool mmx::hard_eq | ( | const function_2< D, S1, S2 > & | f, |
const function_2< D, S1, S2 > & | g | ||
) | [inline] |
Definition at line 239 of file function.hpp.
bool mmx::hard_eq | ( | const function_3< D, S1, S2, S3 > & | f, |
const function_3< D, S1, S2, S3 > & | g | ||
) | [inline] |
Definition at line 291 of file function.hpp.
bool mmx::hard_eq | ( | const C & | x, |
const C & | y | ||
) | [inline] |
Definition at line 159 of file basix.hpp.
References exact_eq().
Referenced by detach(), hard_eq(), generic_object_rep::is_hard_eq(), generic_concrete_rep< C >::is_hard_eq(), hard_neq_op::not_op(), and hard_eq_op::op().
{ return exact_eq (x, y); }
bool mmx::hard_eq | ( | const function_4< D, S1, S2, S3, S4 > & | f, |
const function_4< D, S1, S2, S3, S4 > & | g | ||
) | [inline] |
Definition at line 343 of file function.hpp.
bool mmx::hard_eq | ( | const function_5< D, S1, S2, S3, S4, S5 > & | f, |
const function_5< D, S1, S2, S3, S4, S5 > & | g | ||
) | [inline] |
Definition at line 395 of file function.hpp.
Definition at line 52 of file literal.hpp.
References as_string(), and hard_eq().
bool mmx::hard_eq | ( | const function_6< D, S1, S2, S3, S4, S5, S6 > & | f, |
const function_6< D, S1, S2, S3, S4, S5, S6 > & | g | ||
) | [inline] |
Definition at line 447 of file function.hpp.
bool mmx::hard_eq | ( | const function_7< D, S1, S2, S3, S4, S5, S6, S7 > & | f, |
const function_7< D, S1, S2, S3, S4, S5, S6, S7 > & | g | ||
) | [inline] |
Definition at line 499 of file function.hpp.
bool mmx::hard_eq | ( | const function_8< D, S1, S2, S3, S4, S5, S6, S7, S8 > & | f, |
const function_8< D, S1, S2, S3, S4, S5, S6, S7, S8 > & | g | ||
) | [inline] |
Definition at line 551 of file function.hpp.
bool mmx::hard_gtr | ( | const C & | x, |
const C & | y | ||
) | [inline] |
Definition at line 45 of file compound.hpp.
References as_vector(), and hard_hash().
nat mmx::hard_hash | ( | const C & | x | ) | [inline] |
Definition at line 155 of file basix.hpp.
References exact_hash().
Referenced by generic_object_rep::get_hard_hash_value(), generic_concrete_rep< C >::get_hard_hash_value(), hard_hash(), hard_neq_op::hash_op(), hard_eq_op::hash_op(), hard_hash_op::op(), and unique_identifier().
{ return exact_hash (x); }
nat mmx::hard_hash | ( | const exception & | e | ) | [inline] |
nat mmx::hard_hash | ( | const function_0< D > & | f | ) | [inline] |
nat mmx::hard_hash | ( | const function_1< D, S1 > & | f | ) | [inline] |
nat mmx::hard_hash | ( | const function_2< D, S1, S2 > & | f | ) | [inline] |
nat mmx::hard_hash | ( | const function_3< D, S1, S2, S3 > & | f | ) | [inline] |
nat mmx::hard_hash | ( | const function_4< D, S1, S2, S3, S4 > & | f | ) | [inline] |
nat mmx::hard_hash | ( | const function_5< D, S1, S2, S3, S4, S5 > & | f | ) | [inline] |
Definition at line 43 of file literal.hpp.
References as_string(), and hard_hash().
nat mmx::hard_hash | ( | const function_6< D, S1, S2, S3, S4, S5, S6 > & | f | ) | [inline] |
nat mmx::hard_hash | ( | const function_7< D, S1, S2, S3, S4, S5, S6, S7 > & | f | ) | [inline] |
nat mmx::hard_hash | ( | const function_8< D, S1, S2, S3, S4, S5, S6, S7, S8 > & | f | ) | [inline] |
nat mmx::hard_hash | ( | const syntactic & | c | ) | [inline] |
triple<C1,C2,C3> mmx::HARD_IDENTITY_OP_SUGAR | ( | template< typename C1, typename C2, typename C3 > | , |
triple< C1, C2, C3 > | |||
) |
bool mmx::hard_less | ( | const C & | x, |
const C & | y | ||
) | [inline] |
bool mmx::hard_neq | ( | const C & | x, |
const C & | y | ||
) | [inline] |
Definition at line 161 of file basix.hpp.
References exact_neq().
Referenced by hard_neq(), hard_eq_op::not_op(), and hard_neq_op::op().
{ return exact_neq (x, y); }
Definition at line 57 of file compound.hpp.
References as_vector(), and hard_neq().
bool mmx::hard_neq | ( | const syntactic & | c1, |
const syntactic & | c2 | ||
) | [inline] |
bool mmx::hard_neq | ( | const exception & | e1, |
const exception & | e2 | ||
) | [inline] |
bool mmx::hard_neq | ( | const function_0< D > & | f, |
const function_0< D > & | g | ||
) | [inline] |
Definition at line 99 of file function.hpp.
bool mmx::hard_neq | ( | const function_1< D, S1 > & | f, |
const function_1< D, S1 > & | g | ||
) | [inline] |
Definition at line 148 of file function.hpp.
bool mmx::hard_neq | ( | const function_2< D, S1, S2 > & | f, |
const function_2< D, S1, S2 > & | g | ||
) | [inline] |
Definition at line 241 of file function.hpp.
bool mmx::hard_neq | ( | const function_3< D, S1, S2, S3 > & | f, |
const function_3< D, S1, S2, S3 > & | g | ||
) | [inline] |
Definition at line 293 of file function.hpp.
bool mmx::hard_neq | ( | const function_4< D, S1, S2, S3, S4 > & | f, |
const function_4< D, S1, S2, S3, S4 > & | g | ||
) | [inline] |
Definition at line 345 of file function.hpp.
bool mmx::hard_neq | ( | const function_5< D, S1, S2, S3, S4, S5 > & | f, |
const function_5< D, S1, S2, S3, S4, S5 > & | g | ||
) | [inline] |
Definition at line 397 of file function.hpp.
Definition at line 54 of file literal.hpp.
References as_string(), and hard_neq().
bool mmx::hard_neq | ( | const function_6< D, S1, S2, S3, S4, S5, S6 > & | f, |
const function_6< D, S1, S2, S3, S4, S5, S6 > & | g | ||
) | [inline] |
Definition at line 449 of file function.hpp.
bool mmx::hard_neq | ( | const function_7< D, S1, S2, S3, S4, S5, S6, S7 > & | f, |
const function_7< D, S1, S2, S3, S4, S5, S6, S7 > & | g | ||
) | [inline] |
Definition at line 501 of file function.hpp.
bool mmx::hard_neq | ( | const function_8< D, S1, S2, S3, S4, S5, S6, S7, S8 > & | f, |
const function_8< D, S1, S2, S3, S4, S5, S6, S7, S8 > & | g | ||
) | [inline] |
Definition at line 553 of file function.hpp.
mmx::HARD_TO_EXACT_IDENTITY_SUGAR | ( | dynamic | ) |
mmx::HARD_TO_EXACT_IDENTITY_SUGAR | ( | template< typename C > | , |
iterator< C > | |||
) |
mmx::HARD_TO_EXACT_IDENTITY_SUGAR | ( | template< typename D > | , |
function_0< D > | |||
) |
mmx::HARD_TO_EXACT_IDENTITY_SUGAR | ( | template< typename D, typename S1 > | , |
function_1< D, S1 > | |||
) |
mmx::HARD_TO_EXACT_IDENTITY_SUGAR | ( | template< typename D, typename S1, typename S2 > | , |
function_2< D, S1, S2 > | |||
) |
mmx::HARD_TO_EXACT_IDENTITY_SUGAR | ( | template< typename D, typename S1, typename S2, typename S3 > | , |
function_3< D, S1, S2, S3 > | |||
) |
mmx::HARD_TO_EXACT_IDENTITY_SUGAR | ( | template< typename D, typename S1, typename S2, typename S3, typename S4 > | , |
function_4< D, S1, S2, S3, S4 > | |||
) |
mmx::HARD_TO_EXACT_IDENTITY_SUGAR | ( | template< typename D, typename S1, typename S2, typename S3, typename S4, typename S5 > | , |
function_5< D, S1, S2, S3, S4, S5 > | |||
) |
mmx::HARD_TO_EXACT_IDENTITY_SUGAR | ( | template< typename D, typename S1, typename S2, typename S3, typename S4, typename S5, typename S6 > | , |
function_6< D, S1, S2, S3, S4, S5, S6 > | |||
) |
mmx::HARD_TO_EXACT_IDENTITY_SUGAR | ( | template< typename D, typename S1, typename S2, typename S3, typename S4, typename S5, typename S6, typename S7 > | , |
function_7< D, S1, S2, S3, S4, S5, S6, S7 > | |||
) |
mmx::HARD_TO_EXACT_IDENTITY_SUGAR | ( | template< typename D, typename S1, typename S2, typename S3, typename S4, typename S5, typename S6, typename S7, typename S8 > | , |
function_8< D, S1, S2, S3, S4, S5, S6, S7, S8 > | |||
) |
mmx::HARD_TO_TRUE_IDENTITY_SUGAR | ( | observer | ) |
mmx::HARD_TO_TRUE_IDENTITY_SUGAR | ( | dynamic | ) |
port mmx::HARD_TO_TRUE_IDENTITY_SUGAR | ( | port | ) | const |
bool has_trace | ( | const generic & | exc | ) |
Definition at line 84 of file exception.cpp.
References GEN_BACKTRACE, GEN_EXCEPTION, and is_func().
Referenced by backtrace(), source_exception(), and trace_depth().
{ if (!is<exception> (exc)) return false; generic msg= *as<exception> (exc); return is_func (msg, GEN_EXCEPTION, 2) && is_func (msg[2], GEN_BACKTRACE, 2); }
nat mmx::hash | ( | const generic & | g | ) | [inline] |
Definition at line 162 of file generic.hpp.
{
return g->get_hash_value (); }
Definition at line 41 of file compound.hpp.
Referenced by generic_object_rep::get_hash_value(), generic_concrete_rep< C >::get_hash_value(), hash(), unequal_op::hash_op(), equal_op::hash_op(), hash_op::op(), and REP_STRUCT_1().
{ return hash (as_symbol (c)); }
nat mmx::hash | ( | const exception & | e | ) | [inline] |
nat mmx::hash | ( | const syntactic & | c | ) | [inline] |
nat mmx::hash | ( | signed char | c | ) | [inline] |
Definition at line 63 of file defaults.hpp.
{ return (nat) c; }
nat mmx::hash | ( | char | c | ) | [inline] |
Definition at line 62 of file defaults.hpp.
{ return (nat) c; }
nat mmx::hash | ( | unsigned char | c | ) | [inline] |
Definition at line 64 of file defaults.hpp.
{ return (nat) c; }
nat mmx::hash | ( | short int | c | ) | [inline] |
Definition at line 65 of file defaults.hpp.
{ return (nat) c; }
nat mmx::hash | ( | short unsigned int | c | ) | [inline] |
Definition at line 66 of file defaults.hpp.
{ return (nat) c; }
nat mmx::hash | ( | int | c | ) | [inline] |
Definition at line 67 of file defaults.hpp.
{ return (nat) c; }
nat mmx::hash | ( | long int | c | ) | [inline] |
Definition at line 69 of file defaults.hpp.
{ return (nat) c; }
nat mmx::hash | ( | unsigned int | c | ) | [inline] |
Definition at line 68 of file defaults.hpp.
{ return (nat) c; }
nat mmx::hash | ( | long unsigned int | c | ) | [inline] |
Definition at line 70 of file defaults.hpp.
{ return (nat) c; }
nat mmx::hash | ( | long long int | c | ) | [inline] |
Definition at line 71 of file defaults.hpp.
nat mmx::hash | ( | long long unsigned int | c | ) | [inline] |
Definition at line 74 of file defaults.hpp.
nat mmx::hash | ( | const float & | x | ) | [inline] |
Definition at line 77 of file defaults.hpp.
{ return (*((nat*) ((void*) &x))) & 0xffffffff; }
nat mmx::hash | ( | const cpp_printer & | p | ) | [inline] |
Definition at line 290 of file cpp_printer.cpp.
{
return 0;
}
nat mmx::hash | ( | const double & | x | ) | [inline] |
Definition at line 79 of file defaults.hpp.
References n.
nat mmx::hash | ( | C * | p | ) | [inline] |
nat mmx::hash | ( | const symbol< C, equal_table > & | s | ) | [inline] |
double hypot | ( | const double & | x, |
const double & | y | ||
) | [inline] |
Definition at line 516 of file generic.cpp.
References ACC_BINARY, ACC_HYPOT, sqrt(), and square().
{ ACC_BINARY (ACC_HYPOT, x, y); return sqrt (square (x) + square (y)); }
C mmx::hypot | ( | const C & | x, |
const C & | y | ||
) | [inline] |
Definition at line 571 of file defaults.hpp.
References sqrt(), and square().
Referenced by hypot(), hypot_op::op(), and hypot_op::set_op().
Definition at line 201 of file table.hpp.
Referenced by append(), binary_map(), binary_map_scalar(), binary_test(), binary_test_scalar(), common(), copy(), as_helper< table< D, T >, table< C, T > >::cv(), difference(), binary_helper< table< C, T, V > >::disassemble(), unsigned_int_gcd_helper::gcd(), int_gcd_helper::gcd(), map(), REP_STRUCT_2(), unary_filter(), unary_map(), unary_set(), unary_set_scalar(), and binary_helper< table< C, T, V > >::write().
{
t->lazy_initialize ();
return *t->init;
}
Definition at line 112 of file routine.cpp.
{ // WARNING: we do allow for "fake identity functions" with sig[0] != sig[1] // This is useful for fast conversions to generic ASSERT (N(sig) == 2, "identity routine should take one argument"); return new identity_routine_rep (sig); }
Definition at line 735 of file generic.cpp.
References current_ev, and GEN_IM.
{ return current_ev->apply (GEN_IM, x1); }
C mmx::Im | ( | const C & | x | ) | [inline] |
Definition at line 713 of file defaults.hpp.
Referenced by Im_op::op(), Im_op::Real_type(), and Im_op::set_op().
{ return 0; }
Definition at line 1155 of file vector.hpp.
{ return unary_map<Im_op> (v); }
C mmx::imaginary_cst | ( | ) | [inline] |
Definition at line 743 of file type_props.hpp.
References C, and set_imaginary().
{ C r; set_imaginary (r); return r; }
alias<C> mmx::incarnate_genalias | ( | const generic_alias< C > & | a | ) | [inline] |
double incexp2 | ( | const double & | x, |
const S & | y | ||
) | [inline] |
Definition at line 99 of file double.hpp.
{ return ldexp (x, y); }
void incexp2 | ( | double & | x, |
const double & | y, | ||
const S & | z | ||
) | [inline] |
Definition at line 105 of file double.hpp.
{ x= ldexp (y, z); }
double incexp2 | ( | const double & | x | ) | [inline] |
Definition at line 101 of file double.hpp.
{ return ldexp (x, 1); }
Definition at line 788 of file generic.cpp.
References current_ev.
{ return current_ev->apply ("increase_exponent", x1, as<generic> ((int) x2)); }
C mmx::incexp2 | ( | const C & | x, |
const S & | y | ||
) | [inline] |
Definition at line 393 of file defaults.hpp.
Referenced by GLUE_43(), incexp2_op::op(), and incexp2_op::set_op().
{ return x << y; }
C mmx::incexp2 | ( | const C & | x | ) | [inline] |
Definition at line 395 of file defaults.hpp.
{ return incexp2<C,xint> (x, 1); }
void mmx::incexp2 | ( | C & | x, |
const C & | y, | ||
const S & | z | ||
) | [inline] |
Definition at line 399 of file defaults.hpp.
{ x= y << z; }
void incexp2_assign | ( | double & | x, |
const S & | y | ||
) | [inline] |
Definition at line 103 of file double.hpp.
{ x= ldexp (x, y); }
void mmx::incexp2_assign | ( | C & | x, |
const S & | y | ||
) | [inline] |
void include | ( | const string & | name | ) |
mmx::INDIRECT_IMPL | ( | evaluator | , |
evaluator_rep | |||
) |
mmx::INDIRECT_IMPL | ( | generic | , |
generic_rep | |||
) |
Definition at line 146 of file generic.hpp.
{ return generic (this, true); }
mmx::INDIRECT_IMPL | ( | string | , |
string_rep | |||
) |
mmx::INDIRECT_IMPL | ( | updater | , |
updater_rep | |||
) |
Definition at line 133 of file dynamic.cpp.
References arg(), ARGUMENT_OBSERVER, and destroy().
: public observer_rep { public: updater u; inline argument_observer_rep (dynamic_rep* arg, const updater& u2): observer_rep (arg), u (u2) {} inline ~argument_observer_rep () {} inline nat observer_type () const { return ARGUMENT_OBSERVER; } inline void destroy () const { mmx::destroy (u); } inline void modify () const { u->update (); } };
mmx::INDIRECT_IMPL | ( | port | , |
port_rep | |||
) |
mmx::INDIRECT_IMPL_1 | ( | heap | , |
heap_rep | , | ||
typename C | , | ||
C | |||
) |
mmx::INDIRECT_IMPL_1 | ( | iterator | , |
iterator_rep | , | ||
typename C | , | ||
C | |||
) | const |
Definition at line 95 of file iterator.hpp.
{ return it.rep->is_busy (); }
mmx::INDIRECT_IMPL_1 | ( | alias | , |
alias_rep | , | ||
typename C | , | ||
C | |||
) | const |
mmx::INDIRECT_IMPL_2 | ( | symbol | , |
symbol_rep | , | ||
typename C | , | ||
C | , | ||
typename V | , | ||
V | |||
) |
Definition at line 88 of file symbol.hpp.
References SYMBOLIC_LITERAL.
{ static const nat id= SYMBOLIC_LITERAL; };
mmx::INDIRECT_IMPL_2 | ( | vector | , |
vector_rep | , | ||
typename C | , | ||
C | , | ||
typename V | , | ||
V | |||
) |
mmx::INDIRECT_IMPL_3 | ( | table | , |
table_rep | , | ||
typename C | , | ||
C | , | ||
typename T | , | ||
T | , | ||
typename V | , | ||
V | |||
) |
mmx::INDIRECT_IMPL_3 | ( | sparse_vector | , |
sparse_vector_rep | , | ||
typename C | , | ||
C | , | ||
typename T | , | ||
T | , | ||
typename V | , | ||
V | |||
) |
mmx::INDIRECT_NULL_IMPL | ( | observer | , |
observer_rep | |||
) |
mmx::INDIRECT_NULL_IMPL | ( | dynamic | , |
dynamic_rep | |||
) | const |
mmx::INDIRECT_NULL_IMPL | ( | task | , |
task_rep | |||
) |
mmx::INDIRECT_NULL_IMPL | ( | routine | , |
routine_rep | |||
) | const |
Definition at line 96 of file routine.hpp.
{
return fun.rep == NULL; }
mmx::INDIRECT_NULL_IMPL | ( | primitive | , |
primitive_rep | |||
) | const |
Definition at line 43 of file primitive.hpp.
{
return fun.rep == NULL; }
Definition at line 1051 of file vector.hpp.
{
return binary_map<inf_op> (v, w); }
C mmx::inf | ( | const C & | x, |
const C & | y | ||
) |
Definition at line 512 of file defaults.hpp.
References min().
Referenced by inf_op::op(), and inf_op::set_op().
{ return min (x, y); }
sparse_vector<C,T,V> mmx::inf | ( | const sparse_vector< C, T, V > & | t, |
const sparse_vector< C, T, V > & | u | ||
) | [inline] |
Definition at line 270 of file sparse_vector.hpp.
{
return binary_map<inf_op,C,T,V> (t, u); }
C mmx::infinity_cst | ( | ) | [inline] |
Definition at line 755 of file type_props.hpp.
References C, and set_infinity().
{ C r; set_infinity (r); return r; }
Definition at line 129 of file mmx_printer.cpp.
References gen().
Referenced by mmx_printer::pp_E0().
{ return gen ("$infix", g, op, h); }
bool init | ( | const iterator< C > & | it | ) | [inline] |
Definition at line 99 of file iterator.hpp.
Referenced by join_iterator_rep< C >::is_init(), as_iterator_rep< C, S >::is_init(), mmx_symbol_table(), binary_helper< table< C, T, V > >::read(), join_iterator_rep< C >::regress(), REP_STRUCT_1(), REP_STRUCT_2(), and texmacs_symbol_table().
{ return it.rep->is_init (); }
void init_system | ( | ) |
Definition at line 67 of file system.cpp.
References file_exists(), user_dir(), and var_mkdir().
Referenced by eval_system(), path_name(), system_instance::system_instance(), and var_load().
{ string path = user_dir (); if (!file_exists (path)) { printf ("This is your first use of Mathemagix.\n"); printf ("I am creating a .mathemagix directory in your home directory\n"); var_mkdir (path); } var_mkdir (path * "/etc"); var_mkdir (path * "/lib"); var_mkdir (path * "/var"); var_mkdir (path * "/mmx"); var_mkdir (path * "/tmp"); }
void mmx::init_threads | ( | ) |
Definition at line 222 of file threads.cpp.
{}
Definition at line 485 of file syntactic.cpp.
References syn().
Referenced by mv_inject_op::op(), and mv_inject_op::set_op().
{ return syn ("inject", x, y, z); }
Definition at line 106 of file file_port.cpp.
References as_charp(), decode_name(), error_port(), and free_charp().
Referenced by var_load().
{ string name_s= decode_name (name); char* temp= as_charp (name_s); FILE* f= fopen (temp, "r"); free_charp (temp); if (f == NULL) return error_port ("file '" * name * "' not found"); return input_file_port (f, true, name); }
Definition at line 75 of file file_port.cpp.
{ return (port_rep*) new file_port_rep (2, f, close_flag, name); }
Definition at line 116 of file file_port.cpp.
References as_charp(), decode_name(), error_port(), and free_charp().
{ string name_s= decode_name (name); char* temp= as_charp (name_s); FILE* f= fopen (temp, "w+"); free_charp (temp); if (f == NULL) return error_port ("file '" * name * "' did not open"); return input_output_file_port (f, true, name); }
Definition at line 80 of file file_port.cpp.
{ return (port_rep*) new file_port_rep (3, f, close_flag, name); }
port input_output_string_port | ( | string & | s | ) |
Definition at line 105 of file string_port.cpp.
{ return (port_rep*) new input_output_string_port_rep (s); }
port input_string_port | ( | const string & | s | ) |
Definition at line 68 of file string_port.cpp.
Referenced by GLUE_1().
{ return (port_rep*) new input_string_port_rep (s); }
Definition at line 702 of file vector.hpp.
References append(), and contains().
Definition at line 708 of file vector.hpp.
References ASSERT, C, CF(), n, N(), pos, seg(), and Vector.
{ // insert x at 'pos' in v ASSERT (pos <= N(v), "position out of range"); nat n= N(v) + 1, i; nat l= aligned_size<C,V> (n); C* a= mmx_formatted_new<C> (l, CF(v)); const C* p= seg (v); for (i= 0; i < pos; i++, p++) a[i]= *p; a[pos]= x; i++; for (;i < n; i++, p++) a[i]= *p; return Vector (a, n, l, CF(v)); }
vector<C,V> mmx::insert | ( | const vector< C, V > & | v, |
const vector< C, V > & | x, | ||
const vector< nat, W > & | pos | ||
) |
Definition at line 721 of file vector.hpp.
References ASSERT, C, CF(), n, N(), seg(), and Vector.
{ // insert x[0] at pos[0] in v, then x[1] at pos[1], etc ASSERT (N(x) == N(pos), "wrong sizes"); nat n= N(v) + N(x), i= 0; nat l= aligned_size<C,V> (n); C* a= mmx_formatted_new<C> (l, CF(v)); const C* p= seg (v); for (nat k= 0; k < N(pos); k++) { ASSERT (pos[k] < n, "position out of range"); for (; i < pos[k]; i++, p++) a[i]= *p; a[pos[k]]= x[k]; i++; } for (;i < n; i++, p++) a[i]= *p; return Vector (a, n, l, CF(v)); }
char* mmx::inside | ( | const string & | s, |
nat | pos | ||
) | [inline] |
Definition at line 114 of file chain.hpp.
References Chain_rep.
Referenced by accept(), as_cpp(), assign(), attach(), busy(), can_read(), can_write(), component(), contents(), destroy(), error_flag(), error_message(), flatten(), flush(), formatting_port_rep::format(), hard_gtr(), hard_less(), inside_append(), inside_set(), is_input_port(), is_output_port(), operator<<(), input_output_string_port_rep::read(), input_string_port_rep::read(), posix_port_rep::read(), read(), reset(), string_to_floating(), threads_execute(), wait(), and write().
{ return const_cast<Chain_rep*> (x.operator -> ()); }
Definition at line 668 of file vector.hpp.
References ASSERT, copy(), inside(), is_non_scalar(), N(), n, and seg().
void mmx::inside_set | ( | const table< C, T, V > & | t, |
const K & | x, | ||
const C & | v | ||
) | [inline] |
Definition at line 168 of file table.hpp.
References inside().
Referenced by GLUE_14(), GLUE_9(), new_type_id(), and register_glue().
{ inside (t) -> set (as<T> (x)) = v; }
void mmx::inside_set | ( | const table< C, T, V > & | t, |
const T & | x, | ||
const C & | v | ||
) | [inline] |
Definition at line 675 of file generic.cpp.
References ACC_INTEGRATE, ACC_UNARY, current_ev, and GEN_INTEGRATE.
Referenced by integrate_routine_rep::apply(), solve_matrix_lde_op::def(), solve_vector_lde_op::def(), atan_op::def(), asin_op::def(), acos_op::def(), trig_op::def(), log_op::def(), exp_op::def(), sqrt_op::def(), GLUE_44(), integrate_op::op(), and integrate_op::set_op().
{ ACC_UNARY (ACC_INTEGRATE, x1); return current_ev->apply (GEN_INTEGRATE, x1); }
Definition at line 458 of file syntactic.cpp.
References GEN_INTEGRATE, and syn().
{ return syn (GEN_INTEGRATE, g); }
Definition at line 460 of file syntactic.cpp.
References GEN_INTEGRATE, and syn().
{ return syn (GEN_INTEGRATE, g, v); }
Definition at line 248 of file routine.cpp.
{ return new integrate_routine_rep (r); }
Definition at line 688 of file generic.cpp.
References ACC_BINARY_SCALAR, ACC_DERIVE_WRT, current_ev, and GEN_INTEGRATE.
{ ACC_BINARY_SCALAR (ACC_DERIVE_WRT, x1, v); return current_ev->apply (GEN_INTEGRATE, x1, v); }
Definition at line 1101 of file vector.hpp.
{
return unary_map<integrate_op> (v); }
Definition at line 1107 of file vector.hpp.
{
return binary_map_scalar<integrate_op> (v, x); }
Definition at line 473 of file syntactic.cpp.
References syn().
{ return syn ("integrate_init", g, c); }
Definition at line 811 of file generic.cpp.
References current_ev.
Referenced by integrate_op::op_init().
{ return current_ev->apply ("integrate_init", x1, x2); }
Definition at line 475 of file syntactic.cpp.
References syn().
{ return syn ("integrate_init", g, v, c); }
mmx::INV_TRIGO_SUGAR | ( | double | ) |
double invert | ( | const double & | x | ) | [inline] |
Definition at line 123 of file double.hpp.
{ return 1.0 / x; }
Definition at line 284 of file syntactic.cpp.
{ return syntactic (1) / g; }
Definition at line 375 of file generic.cpp.
References ACC_INVERT, ACC_UNARY, current_ev, and GEN_OVER.
{ ACC_UNARY (ACC_INVERT, x1); return current_ev->apply (GEN_OVER, 1, x1); }
C mmx::invert | ( | const C & | x | ) | [inline] |
Definition at line 557 of file defaults.hpp.
References promote().
Referenced by invert_op::op(), and invert_op::set_op().
{ return promote (1, x) / x; }
bool mmx::is | ( | const generic & | x | ) | [inline] |
Definition at line 182 of file generic.hpp.
References type().
Referenced by binary_helper< vector< C, V > >::assemble(), default_routine(), and vector_size().
{ return type (x) == type_information<C>::id; }
bool is_a_scalar | ( | const vector< C, V > & | v | ) | [inline] |
Definition at line 204 of file vector.hpp.
Referenced by binary_helper< vector< C, V > >::access(), binary_map(), binary_map_scalar(), binary_test(), binary_test_scalar(), as_helper< vector< T, TV >, vector< F, FV > >::cv(), fast_helper< vector< C, V > >::dd(), binary_helper< vector< C, V > >::disassemble(), extend(), flatten(), is_finite(), is_fuzz(), is_infinite(), is_nan(), is_reliable(), range(), rebuild(), REP_STRUCT_1(), reverse(), vector< observer >::scalar(), binary_helper< vector< C, V > >::size(), unary_map(), unary_set(), unary_set_scalar(), fast_helper< vector< C, V > >::uu(), vector< observer >::vector(), vector_map_1(), vector_map_2(), vector_map_n(), and binary_helper< vector< C, V > >::write().
{ return v->scalar_flag; }
bool mmx::is_a_scalar | ( | const vector< C, vector_fixed< V, S > > & | v | ) | [inline] |
Definition at line 354 of file vector.hpp.
{ (void) v; return false; }
bool mmx::is_alias_type | ( | nat | id | ) | [inline] |
Definition at line 182 of file alias.hpp.
References alias_type_info().
Referenced by define_type_sub(), and generic_object_rep::expression().
{ int mode= 0; alias_type_info (id, mode); return mode == 1; }
bool mmx::is_alpha | ( | const generic & | g | ) |
Definition at line 210 of file mmx_texmacs.cpp.
References literal_to_string(), N(), and s.
Referenced by as_texmacs(), mmx_lex(), and test_keyword().
{ if (!is<literal> (g)) return false; string s= literal_to_string (g); for (nat i=0; i<N(s); i++) if ((s[i] < 'a' || s[i] > 'z') && (s[i] < 'A' || s[i] > 'Z')) return false; return true; }
static bool is_applicable | ( | const generic & | g | ) | [static] |
Definition at line 1080 of file cpp_printer.cpp.
References CPP_AND, CPP_IF, CPP_OR, CPP_SPECIALIZE, CPP_TYPE_CONSTRUCTOR, CPP_UNALIAS, CPP_UNPOINTER, CPP_XOR, is_func(), and N().
{ if (is<literal> (g)) { string s= *as<literal> (g); if (N(s) == 0) return false; nat i; for (i=0; i<N(s); i++) if (((s[i]<'0') || (s[i]>'9')) && ((s[i]<'a') || (s[i]>'z')) && ((s[i]<'A') || (s[i]>'Z')) && ((s[i]<'_') || (s[i]>'_'))) return false; return s != CPP_IF && s != CPP_AND && s != CPP_OR && s != CPP_XOR && s != CPP_UNALIAS && s != CPP_UNPOINTER; } else if (is_func (g, CPP_SPECIALIZE) && N(g)>=2 && is_applicable (g[1])) return true; else if (is_func (g, CPP_TYPE_CONSTRUCTOR, 1)) return true; else return false; }
bool is_atom | ( | const syntactic & | g | ) |
Definition at line 25 of file syntactic.cpp.
{ return is<literal> (*g); }
bool mmx::is_atom | ( | const vector< C, V > & | v | ) | [inline] |
Definition at line 218 of file vector.hpp.
References is_non_scalar(), and N().
{ return is_non_scalar (v) && N(v) == 1; }
bool mmx::is_atom | ( | const list< C > & | l | ) | [inline] |
static bool mmx::is_C0 | ( | const generic & | g | ) | [static] |
Definition at line 308 of file mmx_printer.cpp.
References GEN_ASSIGN, GEN_ASSIGN_MACRO, GEN_ASSUME, GEN_BEGIN, GEN_BREAK, GEN_CATEGORY, GEN_CLASS, GEN_CONSTANT, GEN_CONTINUE, GEN_DEFINE, GEN_DEFINE_MACRO, GEN_EXISTS, GEN_EXTERN, GEN_FORALL, GEN_FOREIGN, GEN_GTRGTREQ, GEN_IF, GEN_INTERN, GEN_LAMBDA, GEN_LESSLESSEQ, GEN_LOOP, GEN_MACRO, GEN_METHOD, GEN_MINUS_ASSIGN, GEN_MODULE, GEN_MUTABLE, GEN_OVER_ASSIGN, GEN_PENALTY, GEN_PLUS_ASSIGN, GEN_PRIVATE, GEN_PUBLIC, GEN_RETURN, GEN_TIMES_ASSIGN, GEN_TRY, is_func(), and N().
Referenced by print_mmx().
{ if (is_func (g, GEN_BEGIN) || is_func (g, GEN_IF) || is_func (g, GEN_LOOP) || is_func (g, GEN_BREAK) || is_func (g, GEN_CONTINUE) || is_func (g, GEN_TRY) || is_func (g, GEN_LAMBDA) || is_func (g, GEN_MACRO) || is_func (g, GEN_RETURN) || is_func (g, GEN_CLASS) || is_func (g, GEN_MODULE) || is_func (g, GEN_CATEGORY)) return true; if (N(g) == 2 && is_C0 (g[1])) return is_func (g, GEN_INTERN) || is_func (g, GEN_METHOD) || is_func (g, GEN_EXTERN) || is_func (g, GEN_MUTABLE) || is_func (g, GEN_CONSTANT) || is_func (g, GEN_PUBLIC) || is_func (g, GEN_PRIVATE); if (N(g) == 3 && is_C0 (g[2])) return is_func (g, GEN_FORALL) || is_func (g, GEN_EXISTS) || is_func (g, GEN_ASSUME) || is_func (g, GEN_PENALTY) || is_func (g, GEN_DEFINE) || is_func (g, GEN_ASSIGN) || is_func (g, GEN_DEFINE_MACRO) || is_func (g, GEN_ASSIGN_MACRO) || is_func (g, GEN_PLUS_ASSIGN) || is_func (g, GEN_MINUS_ASSIGN) || is_func (g, GEN_TIMES_ASSIGN) || is_func (g, GEN_OVER_ASSIGN) || is_func (g, GEN_LESSLESSEQ) || is_func (g, GEN_GTRGTREQ); if (N(g) == 4 && is_C0 (g[3])) return is_func (g, GEN_FOREIGN); return false; }
bool mmx::is_exact_zero | ( | const C & | x | ) | [inline] |
Definition at line 212 of file defaults.hpp.
References exact_eq(), and promote().
Referenced by _mul_add().
bool mmx::is_exact_zero | ( | const generic & | g1 | ) | [inline] |
bool mmx::is_finite | ( | const table< C, T, V > & | t | ) | [inline] |
bool mmx::is_finite | ( | const C & | x | ) | [inline] |
Definition at line 691 of file defaults.hpp.
Referenced by GLUE_34(), is_finite(), is_finite_op::not_op(), and_is_finite_op::op(), is_finite_op::op(), and and_is_finite_op::set_op().
{ (void) x; return true; }
bool mmx::is_finite | ( | const vector< C, V > & | v | ) | [inline] |
Definition at line 1123 of file vector.hpp.
References is_a_scalar(), and is_finite().
{ if (is_a_scalar (v)) return is_finite (v.scalar()); return big<and_is_finite_op> (v); }
bool is_func | ( | const syntactic & | g, |
const char * | f | ||
) |
Definition at line 75 of file generic_utils.cpp.
References exact_eq(), and N().
Definition at line 65 of file generic_utils.cpp.
References exact_eq(), and N().
Definition at line 70 of file generic_utils.cpp.
References exact_eq().
{ return is<compound> (g) && exact_eq (g[0], f); }
bool is_func | ( | const generic & | g, |
const char * | f | ||
) |
Definition at line 60 of file generic_utils.cpp.
References exact_eq().
Referenced by add_modes(), as_texmacs(), collect(), concat_append(), flatten_as_tm(), get_user_type(), has_trace(), is_applicable(), is_C0(), is_func(), is_function_type(), is_infix(), make_document(), migrate_negate(), migrate_sub(), product_less_op::op(), sum_less_op::op(), operator*(), operator+(), operator-(), operator/(), mmx_printer::pp_E0(), print_mmx(), replace_lf(), scheme_to_tm(), serialize(), signed_decompose(), texmacs_expand(), trace_pull(), trace_push(), trace_top(), un_try_catch(), and unbracket().
{ return is<compound> (g) && exact_eq (g[0], generic (f)); }
static bool mmx::is_function_type | ( | const generic & | g | ) | [static] |
Definition at line 563 of file cpp_printer.cpp.
References CPP_FUNCTION_TYPE, CPP_INLINE, CPP_STATIC, and is_func().
{ return is_func (g, CPP_FUNCTION_TYPE) || (is_func (g, CPP_INLINE, 1) && is_function_type (g[1])) || (is_func (g, CPP_STATIC, 1) && is_function_type (g[1])); }
bool mmx::is_fuzz | ( | const C & | x | ) | [inline] |
Definition at line 695 of file defaults.hpp.
Referenced by is_fuzz(), is_fuzz_op::not_op(), or_is_fuzz_op::op(), is_fuzz_op::op(), and or_is_fuzz_op::set_op().
{ (void) x; return false; }
bool mmx::is_fuzz | ( | const double & | x | ) | [inline] |
Definition at line 78 of file double.hpp.
{ (void) x; return false; }
bool mmx::is_fuzz | ( | const table< C, T, V > & | t | ) | [inline] |
bool mmx::is_fuzz | ( | const vector< C, V > & | v | ) | [inline] |
Definition at line 1132 of file vector.hpp.
References is_a_scalar(), is_fuzz(), and is_nan().
{ if (is_a_scalar (v)) return is_fuzz (v.scalar()); return !is_nan (v) && big<or_is_fuzz_op> (v); }
bool mmx::is_infinite | ( | const vector< C, V > & | v | ) | [inline] |
Definition at line 1129 of file vector.hpp.
References is_a_scalar(), is_infinite(), and is_nan().
{ if (is_a_scalar (v)) return is_infinite (v.scalar()); return !is_nan (v) && big<or_is_infinite_op> (v); }
bool mmx::is_infinite | ( | const double & | x | ) | [inline] |
Definition at line 77 of file double.hpp.
{ return std::isinf (x); }
bool mmx::is_infinite | ( | const table< C, T, V > & | t | ) | [inline] |
bool mmx::is_infinite | ( | const C & | x | ) | [inline] |
Definition at line 693 of file defaults.hpp.
Referenced by GLUE_35(), is_infinite(), is_infinite_op::not_op(), or_is_infinite_op::op(), is_infinite_op::op(), and or_is_infinite_op::set_op().
{ (void) x; return false; }
Definition at line 199 of file mmx_texmacs.cpp.
References is_func().
{ return is_func (g, "$infix", 3) && g[2] == op; }
bool mmx::is_input_port | ( | const port & | p | ) | [inline] |
Definition at line 92 of file port.hpp.
References inside().
Referenced by composite_port_rep::can_read(), GLUE_10(), composite_port_rep::is_input_port(), composite_port_rep::read(), and composite_port_rep::wait().
{ return inside (p)->is_input_port (); }
bool mmx::is_list | ( | const generic & | x | ) | [inline] |
Definition at line 221 of file generic.hpp.
References SPECIES_LIST, and species_type().
{ return species_type (x) == SPECIES_LIST; }
static bool mmx::is_locase | ( | register char | c | ) | [static] |
Definition at line 395 of file string.cpp.
Referenced by upcase(), and upcase_first().
{ int code= (int) ((unsigned char) c); return ((c>='a') && (c<='z')) || ((code >= 160) && (code < 189)) || (code >= 224); }
bool mmx::is_nan | ( | const table< C, T, V > & | t | ) | [inline] |
bool mmx::is_nan | ( | const double & | x | ) | [inline] |
Definition at line 79 of file double.hpp.
{ return std::isnan (x); }
bool mmx::is_nan | ( | const vector< C, V > & | v | ) | [inline] |
Definition at line 1126 of file vector.hpp.
References is_a_scalar(), and is_nan().
{ if (is_a_scalar (v)) return is_nan (v.scalar()); return big<or_is_nan_op> (v); }
bool mmx::is_nan | ( | const C & | x | ) | [inline] |
Definition at line 697 of file defaults.hpp.
Referenced by GLUE_36(), is_fuzz(), is_infinite(), is_nan(), is_nan_op::not_op(), or_is_nan_op::op(), is_nan_op::op(), and or_is_nan_op::set_op().
{ (void) x; return false; }
bool is_nil | ( | const chain< C > & | c | ) | [inline] |
Definition at line 134 of file chain.hpp.
Referenced by alias_getter(), alias_setter(), alias_specializer(), append(), as_vector(), balance_left(), balance_right(), binary_test(), cAr(), car(), cDr(), cdr(), contains(), convert(), copy(), as_helper< list< T >, list< F > >::cv(), binary_helper< list< C > >::disassemble(), memoizer< V >::end(), exact_eq(), find(), flatten(), GLUE_13(), GLUE_14(), GLUE_15(), insert(), is_atom(), list_iterator_rep< C >::is_busy(), iterate(), list_apply(), list_map_1(), list_map_2(), list_map_n(), map(), merge(), N(), operator==(), range(), restore_evaluator(), reverse(), set_as(), source_column(), source_error(), source_exists(), source_file(), source_line(), source_locate(), source_string(), source_string_unindented(), source_underlined(), table_iterator_rep< C, T, V >::spool(), entries_iterator_rep< C, T, V >::spool(), unary_hash(), and binary_helper< list< C > >::write().
{ return c.rep == NULL; }
bool mmx::is_nil | ( | const vector< C, V > & | v | ) | [inline] |
bool mmx::is_nil | ( | const source_location & | l | ) | [inline] |
Definition at line 92 of file source_track.hpp.
References source_location::end, source_position::line, and source_position::position.
{
return (l.end.line == 0 && l.end.position == 0);
};
bool is_nil | ( | const list< C > & | l | ) | [inline] |
bool is_non_scalar | ( | const vector< C, V > & | v | ) | [inline] |
Definition at line 205 of file vector.hpp.
Referenced by append(), binary_map(), binary_test(), cons(), dot(), extend(), inside_append(), is_atom(), map(), vector< C, V >::operator<<(), vector< observer >::operator[](), REP_STRUCT_1(), seg(), unary_set(), and vector_map_2().
{ return !v->scalar_flag; }
bool mmx::is_non_scalar | ( | const vector< C, vector_fixed< V, S > > & | v | ) | [inline] |
Definition at line 356 of file vector.hpp.
{ (void) v; return true; }
bool is_numeric | ( | const string & | s | ) |
Definition at line 105 of file generic_utils.cpp.
References N().
Referenced by compare_sub(), product_less_op::op(), and sum_less_op::op().
bool mmx::is_output_port | ( | const port & | p | ) | [inline] |
Definition at line 94 of file port.hpp.
References inside().
Referenced by composite_port_rep::can_write(), composite_port_rep::flush(), GLUE_9(), composite_port_rep::is_output_port(), and composite_port_rep::write().
{ return inside (p)->is_output_port (); }
bool mmx::is_power_of_two | ( | nat | p | ) | [inline] |
bool mmx::is_reliable | ( | const C & | x | ) | [inline] |
Definition at line 699 of file defaults.hpp.
Referenced by is_reliable(), is_reliable_op::not_op(), and is_reliable_op::op().
{ (void) x; return true; }
bool mmx::is_reliable | ( | const double & | x | ) | [inline] |
Definition at line 80 of file double.hpp.
{ (void) x; return false; }
bool mmx::is_reliable | ( | const table< C, T, V > & | t | ) | [inline] |
Definition at line 711 of file table.hpp.
References C, and is_reliable().
{ return is_reliable (C (0)); }
bool mmx::is_reliable | ( | const vector< C, V > & | v | ) | [inline] |
Definition at line 1135 of file vector.hpp.
References is_a_scalar(), and is_reliable().
{ if (is_a_scalar (v)) return is_reliable (v.scalar()); return is_reliable (C (0)); }
bool mmx::is_table | ( | const generic & | x | ) | [inline] |
Definition at line 223 of file generic.hpp.
References SPECIES_TABLE, and species_type().
{ return species_type (x) == SPECIES_TABLE; }
bool mmx::is_tuple_type | ( | nat | id | ) | [inline] |
Definition at line 98 of file tuple.hpp.
References tuple_type_info().
Referenced by define_type_sub().
{ bool mode= false; tuple_type_info (id, mode); return mode; }
static bool mmx::is_upcase | ( | register char | c | ) | [static] |
Definition at line 404 of file string.cpp.
Referenced by locase(), and locase_first().
{ int code= (int) ((unsigned char) c); return ((c>='A') && (c<='Z')) || ((code >= 128) && (code < 159)) || ((code >= 192) && (code < 224)); }
bool mmx::is_vector | ( | const generic & | x | ) | [inline] |
Definition at line 219 of file generic.hpp.
References species_type(), and SPECIES_VECTOR.
{ return species_type (x) == SPECIES_VECTOR; }
Definition at line 405 of file table.hpp.
{ return iterator<pair<T,C> > (new table_iterator_rep<C,T,V> (t)); }
Definition at line 217 of file heap.hpp.
{ return iterator<C> (new heap_iterator_rep<C> (h)); }
Definition at line 499 of file vector.hpp.
{ return iterator<C> (new vector_iterator_rep<C,V> (v)); }
Definition at line 201 of file list.hpp.
{ return iterator<C> (new list_iterator_rep<C> (l)); }
Definition at line 142 of file chain.hpp.
References get_format(), is_nil(), left(), middle(), and right().
Referenced by binary_helper< table< C, T, V > >::disassemble(), flatten(), GLUE_3(), GLUE_4(), lazy_iterator_rep< C, T >::initialize(), iterate(), and unary_hash().
{ if (is_nil (c)) return iterator<C> (); return lazy_iterator<C,Chain > (left (c), get_format (middle (c))) * iterator<C> (middle (c)) * lazy_iterator<C,Chain > (right (c), get_format (middle (c))); }
Definition at line 143 of file mmx_printer.cpp.
References gen().
{ return gen ("$keyword", op, g); }
Definition at line 141 of file mmx_printer.cpp.
References gen().
Referenced by mmx_lex(), and mmx_printer::pp_E0().
{ return gen ("$keyword", g); }
C mmx::largest_cst | ( | ) | [inline] |
Definition at line 751 of file type_props.hpp.
References C, and set_largest().
{ C r; set_largest (r); return r; }
Definition at line 418 of file iterator.hpp.
References Iterator.
{ return Iterator (new lazy_iterator_rep<C,T> (x, fm)); }
Definition at line 382 of file syntactic.cpp.
References exact_eq(), GEN_LCM, and syn().
Definition at line 718 of file generic.cpp.
References current_ev, and GEN_LCM.
Referenced by lcm_op::op(), and lcm_op::set_op().
{ return current_ev->apply (GEN_LCM, x1, x2); }
Definition at line 131 of file chain.hpp.
Referenced by balance_left(), balance_right(), binary_test(), car(), cDr(), cdr(), copy(), binary_helper< chain< C > >::disassemble(), iterate(), map(), operator*(), range(), reverse(), shift_left(), shift_right(), skew_div(), skew_quo(), skew_rem(), unary_hash(), and binary_helper< chain< C > >::write_bis().
{ return c.rep->l; }
bool mmx::less_operator | ( | const T & | x, |
const T & | y | ||
) |
Definition at line 36 of file operators.hpp.
{ return x<y; }
bool mmx::lesseq_operator | ( | const T & | x, |
const T & | y | ||
) |
Definition at line 37 of file operators.hpp.
{ return x<=y; }
Definition at line 96 of file glue_list_map.cpp.
References N(), and rebuild().
Referenced by glue_list_map().
{ list<generic> r; for (int i=N(t)-1; i>=0; i--) r= t[i] * r; return rebuild (r); }
Definition at line 104 of file glue_list_map.cpp.
References default_routine(), is_nil(), N(), n, read_car(), and read_cdr().
Referenced by glue_list_map().
{ routine fun= is<routine> (f)? as<routine> (f): default_routine (f); list<generic> l= l2; nat i, n= N(l); vector<generic> a= fill<generic> (n); for (i=0; !is_nil (l); i++, l= read_cdr(l)) a[i]= read_car (l); return fun->apply (a); }
Definition at line 90 of file glue_list_map.cpp.
References gen(), GEN_TUPLE, and list_map().
Referenced by glue_list_map().
{ generic r= list_map (f, t); return as<generic> (tuple<generic> (gen (GEN_TUPLE))); }
Definition at line 72 of file glue_list_map.cpp.
References ASSERT, cdr(), compound_to_vector(), default_routine(), list_map_1(), list_map_2(), list_map_n(), n, N(), and rebuild().
Referenced by glue_list_map(), and list_foreach().
{ routine fun= is<routine> (f)? as<routine> (f): default_routine (f); switch (N(t)) { case 0: ASSERT (N(t)>0, "wrong number of arguments"); case 1: return rebuild (list_map_1 (fun, t[0])); case 2: return rebuild (list_map_2 (fun, t[0], t[1])); default: { const vector<generic> a= cdr (compound_to_vector (*t)); nat i, n= N(a); vector<list<generic> > b= fill<list<generic> > (n); for (i=0; i<n; i++) b[i]= as<list<generic> > (a[i]); return rebuild (list_map_n (fun, b)); } } }
Definition at line 36 of file glue_list_map.cpp.
References car(), cdr(), cons(), and is_nil().
Referenced by list_map().
{ if (is_nil (l)) return l; generic r= fun->apply (car (l)); return cons (r, list_map_1 (fun, cdr (l))); }
list<generic> mmx::list_map_2 | ( | const routine & | fun, |
const list< generic > & | l1, | ||
const list< generic > & | l2 | ||
) |
Definition at line 43 of file glue_list_map.cpp.
References ASSERT, car(), cdr(), cons(), and is_nil().
Referenced by list_map().
Definition at line 53 of file glue_list_map.cpp.
References ASSERT, car(), cdr(), cons(), is_nil(), N(), and n.
Referenced by list_map().
{ nat i, n= N(a); vector<generic> cara= fill<generic> (n); if (is_nil (a[0])) { for (i=0; i<n; i++) ASSERT (is_nil (a[i]), "lists of unequal lengths"); return a[0]; } for (i=0; i<n; i++) { ASSERT (!is_nil (a[i]), "lists of unequal lengths"); cara[i]= car (a[i]); } vector<list<generic> > cdra= fill<list<generic> > (n); for (i=0; i<n; i++) cdra[i]= cdr (a[i]); generic r= fun->apply (cara); return cons (r, list_map_n (fun, cdra)); }
Definition at line 123 of file glue_list_map.cpp.
References current_comparison, default_routine(), generic_compare(), and sort().
Referenced by glue_list_map().
{ routine old_comparison= current_comparison; current_comparison= is<routine> (f)? as<routine> (f): default_routine (f); list<generic> r= sort (l, generic_compare); current_comparison= old_comparison; return r; }
generic lit | ( | const char * | s | ) |
Definition at line 33 of file literal.cpp.
Referenced by glue_document(), glue_double(), glue_dynamic(), glue_int(), glue_list_generic(), glue_port(), glue_routine(), glue_syntactic(), glue_table_generic(), and glue_vector_generic().
{ return new generic_concrete_rep<literal> (literal (s)); }
Definition at line 35 of file literal.cpp.
{ return new generic_concrete_rep<literal> (literal (s)); }
Definition at line 22 of file literal.cpp.
References as_string().
Referenced by as_lisp(), as_math(), as_string(), as_texmacs(), compare_sub(), concat_append(), is_alpha(), scheme_to_tm(), serialize(), source_error(), source_exception(), texmacs_expand(), and texmacs_to_scheme().
{ return as_string (as<literal> (g)); }
Definition at line 433 of file system.cpp.
References decode_name(), and var_load().
{ return var_load (decode_name (orig_file_name), s); }
Definition at line 462 of file system.cpp.
References decode_name(), and var_load().
{ return var_load (file_path, decode_name (file_name), s); }
Definition at line 476 of file system.cpp.
References as_charp(), decode_name(), free_charp(), and sort().
{ string name= decode_name (orig_name); DIR* dp; char* temp= as_charp (name); dp= opendir (temp); free_charp (temp); dir= vector<string> (); if (dp == NULL) return true; struct dirent* ep; while (true) { ep= readdir (dp); if (ep == NULL) break; dir << string (ep->d_name); } (void) closedir (dp); sort (dir); return false; }
string load_path | ( | ) |
Definition at line 115 of file system.cpp.
References get_env(), prefix_dir(), and user_dir().
Referenced by path_name(), and var_load().
{ string path= get_env ("MMX_LOAD_PATH"); if (path != "" && path[0] != ':') path= ":" * path; path= ".:" * user_dir () * "/mmx:" * prefix_dir () * "/share:" * prefix_dir () * "/share/mmx" * path; return path; }
Replace upcase by locase for first letter.
Definition at line 441 of file string.cpp.
References copy(), is_upcase(), and N().
Referenced by GLUE_18().
Definition at line 1084 of file vector.hpp.
{ return unary_map<log_op> (v); }
double log | ( | const double & | x | ) | [inline] |
Definition at line 46 of file double.hpp.
Referenced by acosh(), asinh(), atanh(), GLUE_35(), log_op::op(), set_log2(), and log_op::set_op().
{ return std::log (x); }
Definition at line 438 of file generic.cpp.
References ACC_LOG, ACC_UNARY, current_ev, and GEN_LOG.
{ ACC_UNARY (ACC_LOG, x1); return current_ev->apply (GEN_LOG, x1); }
double log2 | ( | const double & | x | ) | [inline] |
Definition at line 47 of file double.hpp.
Referenced by magnitude(), log2_op::op(), and log2_op::set_op().
{ return ::log2 (x); }
C mmx::log2_cst | ( | ) | [inline] |
Definition at line 737 of file type_props.hpp.
References C, and set_log2().
nat mmx::log_2 | ( | nat | p | ) | [inline] |
nat mmx::log_3 | ( | nat | p | ) | [inline] |
Definition at line 803 of file generic.cpp.
References current_ev.
Referenced by log_op::op_init().
{ return current_ev->apply ("log_init", x1, x2); }
Definition at line 1162 of file vector.hpp.
{
return unary_map<lower_op> (v); }
C mmx::lower | ( | const C & | x | ) | [inline] |
Definition at line 911 of file type_props.hpp.
Referenced by lower_op::Center_type(), and lower_op::set_op().
{ return x; }
Definition at line 841 of file generic.cpp.
References current_ev.
{ return current_ev->apply ("lres", x1, x2); }
C mmx::lshift2 | ( | const C & | x, |
const S & | y | ||
) | [inline] |
Definition at line 359 of file defaults.hpp.
Referenced by lshift2_op::op(), and lshift2_op::set_op().
{ return x << y; }
C mmx::lshift2 | ( | const C & | x | ) | [inline] |
Definition at line 361 of file defaults.hpp.
{ return lshift2<C,int> (x, 1); }
void mmx::lshift2 | ( | C & | x, |
const C & | y, | ||
const S & | z | ||
) | [inline] |
Definition at line 365 of file defaults.hpp.
{ x= y << z; }
void mmx::lshift2_assign | ( | C & | x, |
const S & | y | ||
) | [inline] |
Definition at line 833 of file generic.cpp.
References current_ev.
{ return current_ev->apply ("lshiftz", x1, x2); }
void mmx::lshiftz | ( | C & | x, |
const C & | y, | ||
const S & | z | ||
) | [inline] |
Definition at line 382 of file defaults.hpp.
{ x= y << z; }
C mmx::lshiftz | ( | const C & | x, |
const S & | y | ||
) | [inline] |
Definition at line 376 of file defaults.hpp.
Referenced by sqrt_op::def(), quo_op::def(), div_op::def(), invert_op::def(), lshiftz_op::op(), rshiftz(), and lshiftz_op::set_op().
{ return x << y; }
C mmx::lshiftz | ( | const C & | x | ) | [inline] |
Definition at line 378 of file defaults.hpp.
{ return lshiftz<C,int> (x, 1); }
void mmx::lshiftz_assign | ( | C & | x, |
const S & | y | ||
) | [inline] |
Definition at line 380 of file defaults.hpp.
Referenced by rshiftz_assign(), and lshiftz_op::set_op().
{ x <<= y; }
double mmx::magnitude | ( | const C & | x | ) | [inline] |
Definition at line 701 of file defaults.hpp.
References exponent().
Referenced by GLUE_42(), magnitude_op::op(), max_magnitude_op::set_op(), and magnitude_op::set_op().
{ return (double) exponent (x); }
double magnitude | ( | const generic & | x | ) |
Definition at line 784 of file generic.cpp.
References ASSERT, current_ev, and GEN_MAGNITUDE.
{ generic r= current_ev->apply (GEN_MAGNITUDE, x); ASSERT (is<double> (r), "Double return value expected"); return as<double> (r); }
STMPL double mmx::magnitude | ( | const double & | x | ) | [inline] |
double mmx::magnitude | ( | const vector< C, V > & | v | ) | [inline] |
Definition at line 1146 of file vector.hpp.
{
return big<max_magnitude_op> (v); }
generic mmx::make_abstract | ( | const T & | x | ) | [inline] |
Definition at line 53 of file routine.hpp.
References generic_converter< T >::make_abstract().
{ return generic_converter<T>::make_abstract (x); }
B mmx::make_ball | ( | const C & | c, |
const R & | r | ||
) |
Definition at line 885 of file type_props.hpp.
References val.
{ return make_ball_helper<B,C,R>::val (c, r); }
Definition at line 97 of file document.cpp.
References make_document().
Referenced by GLUE_12().
{ return make_document (v, true); }
Definition at line 48 of file routine.hpp.
References generic_converter< T >::make_concrete().
{ return generic_converter<T>::make_concrete (x); }
Definition at line 71 of file document.cpp.
References as_document(), as_documents(), as_generic(), cdr(), compound_to_vector(), gen(), GEN_ROW, is_func(), and N().
Referenced by make_block(), and make_inline().
{ //mmout << "v= " << v << indent << lf; vector<generic> r; if (block) r << generic ("$cr"); for (nat i=0; i<N(v); i++) { generic x= as_generic (v[i]); //mmout << "v[" << i << "] = " << x << ": " << type_name (x) << lf; if (is_func (x, GEN_ROW)) { vector<document> a= as_documents (cdr (compound_to_vector (x))); r << as_generic (make_document (a)); if (i != N(v) - 1) r << generic ("$lf"); } else r << x; } //mmout << unindent; //mmout << "r= " << r << lf; if (N (r) == 1) return as_document (r[0]); else return as_document (gen ("$concat", r)); }
Definition at line 92 of file document.cpp.
References make_document().
Referenced by GLUE_11().
{ return make_document (v); }
B mmx::make_interval | ( | const C & | l, |
const C & | r | ||
) |
Definition at line 907 of file type_props.hpp.
References val.
{ return make_interval_helper<B,C>::val (l, r); }
Definition at line 58 of file literal.hpp.
References as_string(), and C.
Definition at line 55 of file document.cpp.
References as_document(), and gen().
Referenced by GLUE_10(), GLUE_9(), and make_math().
{ return as_document (gen ("$math", x)); }
Definition at line 60 of file document.cpp.
References as_generic(), and make_math().
{ return make_math (as_generic (x)); }
Definition at line 65 of file document.cpp.
References as_document(), as_generics(), gen(), and GEN_ROW.
Referenced by GLUE_13().
{ vector<generic> r= as_generics (v); return as_document (gen (GEN_ROW, r)); }
Definition at line 102 of file document.cpp.
References as_document(), as_generics(), and gen().
Referenced by GLUE_5(), and GLUE_6().
{ return as_document (gen ("tm$" * fun, as_generics (v))); }
Definition at line 107 of file document.cpp.
References as_document(), as_generics(), as_string(), and gen().
{ return as_document (gen ("tm$" * as_string (fun), as_generics (v))); }
Definition at line 45 of file document.cpp.
References as_document(), and gen().
Referenced by GLUE_7(), GLUE_8(), and make_text().
{ return as_document (gen ("$text", x)); }
Definition at line 50 of file document.cpp.
References as_generic(), and make_text().
{ return make_text (as_generic (x)); }
chain<D> mmx::map | ( | const function_1< D, Argument(S1) > & | fun, |
const chain< S1 > & | c1, | ||
const format< D > & | fm | ||
) |
table<C2,T2> mmx::map | ( | const function_1< T2, Argument(T1) > & | funT, |
const function_1< C2, Argument(C1) > & | funC, | ||
const table< C1, T1 > & | t, | ||
const format< T2 > & | fmT, | ||
const format< C2 > & | fmC | ||
) |
Definition at line 586 of file table.hpp.
References busy(), entries(), I(), and simplify().
{ table<C2,T2> r (funC (I(t)), fmT); for (iterator<T1> it= entries (t); busy (it); ++it) r[funT(*it)]= funC (t[*it]); simplify (r); return r; }
D vector<D> mmx::map | ( | const function_1< D, Argument(S1) > & | fun, |
const vector< S1 > & | v1 | ||
) |
Definition at line 873 of file vector.hpp.
References ASSERT, CF(), is_non_scalar(), map(), N(), and n.
Definition at line 884 of file vector.hpp.
References ASSERT, CF(), is_non_scalar(), map(), N(), and n.
vector<D> mmx::map | ( | const function_1< D, Argument(S1) > & | fun, |
const vector< S1 > & | v1, | ||
const format< D > & | fm | ||
) |
Definition at line 895 of file vector.hpp.
References ASSERT, is_non_scalar(), N(), and n.
Definition at line 907 of file vector.hpp.
References ASSERT, is_non_scalar(), N(), and n.
vector<D> mmx::map | ( | const function_3< D, Argument(S1), Argument(S2), Argument(S3) > & | fun, |
const vector< S1 > & | v1, | ||
const vector< S2 > & | v2, | ||
const vector< S3 > & | v3 | ||
) |
Definition at line 933 of file vector.hpp.
References ASSERT, is_non_scalar(), n, and N().
{ format<D> fm; //= map (fun, CF(v1), CF(v2), CF(v3)); ASSERT (is_non_scalar (v1), "non-scalar vector expected"); ASSERT (is_non_scalar (v2), "non-scalar vector expected"); ASSERT (is_non_scalar (v3), "non-scalar vector expected"); ASSERT (N(v1) == N(v2) && N(v2) == N(v3), "lengths don't match"); nat n= N(v1); nat l= default_aligned_size<D> (n); D* r= mmx_formatted_new<D> (l, fm); for (nat i=0; i<n; i++) r[i]= fun (v1[i], v2[i], v3[i]); return vector<D> (r, n, l, fm); }
format<R> mmx::map | ( | const function_1< R, C > & | fun, |
const format< C > & | fm | ||
) |
Definition at line 184 of file function.hpp.
References format_function_helper< FT, R, C, Fun >::op().
{ typedef function_1<R,Argument(C) > Fun; typedef typename format<R>::FT FT; return format_function_helper<FT,R,C,Fun>::op (fun, fm); }
Definition at line 191 of file function.hpp.
References C, and format_function_helper< FT, R, C, Fun >::op().
{ typedef R (*Fun) (const C&); typedef typename format<R>::FT FT; return format_function_helper<FT,R,C,Fun>::op (fun, fm); }
list<D> mmx::map | ( | const function_1< D, Argument(S1) > & | fun, |
const list< S1 > & | l1, | ||
const format< D > & | fm | ||
) |
vector<D> mmx::map | ( | const function_2< D, Argument(S1), Argument(S2) > & | fun, |
const vector< S1 > & | v1, | ||
const vector< S2 > & | v2 | ||
) |
Definition at line 918 of file vector.hpp.
References ASSERT, is_non_scalar(), n, and N().
{ format<D> fm; //= map (fun, CF(v1), CF(v2)); ASSERT (is_non_scalar (v1), "non-scalar vector expected"); ASSERT (is_non_scalar (v2), "non-scalar vector expected"); ASSERT (N(v1) == N(v2), "lengths don't match"); nat n= N(v1); nat l= default_aligned_size<D> (n); D* r= mmx_formatted_new<D> (l, fm); for (nat i=0; i<n; i++) r[i]= fun (v1[i], v2[i]); return vector<D> (r, n, l, fm); }
static table<string, string, exact_eq_table> mmx::math_symbol_table | ( | ) | [static] |
Definition at line 24 of file math_printer.cpp.
References GEN_ACCESS, GEN_AND, GEN_APPEND, GEN_CATALAN, GEN_COMPOSE, GEN_DELTA, GEN_DERIVATIVE, GEN_DIV, GEN_DOT, GEN_DOWNTO, GEN_E, GEN_EQUAL, GEN_EQUIV, GEN_EULER, GEN_FACTORIAL, GEN_GTR, GEN_GTREQ, GEN_GTRGTR, GEN_I, GEN_IMPLIES, GEN_IN, GEN_INFINITY, GEN_INTO, GEN_LESS, GEN_LESSEQ, GEN_LESSLESS, GEN_MAPSTO, GEN_MINUS, GEN_MOD, GEN_NOT, GEN_OR, GEN_OVER, GEN_PARTIAL, GEN_PI, GEN_PLUS, GEN_POWER, GEN_PRIME, GEN_RANGE, GEN_ROW, GEN_SCOPE, GEN_SEQAND, GEN_SEQOR, GEN_SIZE, GEN_SQTUPLE, GEN_TIMES, GEN_TO, GEN_TRANSTYPE, GEN_TUPLE, GEN_UNEQUAL, GEN_VWHERE, GEN_WHERE, GEN_XOR, and SET_OPNAME.
Referenced by as_math().
{ table<string, string, exact_eq_table> t; SET_OPNAME (GEN_ACCESS, "_"); // or "%sqaccess" SET_OPNAME (GEN_AND, "/\\"); SET_OPNAME (GEN_CATALAN, "%mathcatalan"); SET_OPNAME (GEN_COMPOSE, "%circ"); SET_OPNAME (GEN_APPEND, "%join"); SET_OPNAME (GEN_DELTA, "%delta"); SET_OPNAME (GEN_DERIVATIVE, "D"); SET_OPNAME (GEN_DOT, "%dotaccess"); SET_OPNAME (GEN_DIV, "div"); SET_OPNAME (GEN_E, "%mathe"); SET_OPNAME (GEN_EQUAL, "="); SET_OPNAME (GEN_EQUIV, "<=>"); SET_OPNAME (GEN_EULER, "%matheuler"); SET_OPNAME (GEN_FACTORIAL, "factorial"); SET_OPNAME (GEN_GTR, ">"); SET_OPNAME (GEN_GTREQ, ">="); SET_OPNAME (GEN_GTRGTR, ">>"); SET_OPNAME (GEN_I, "%mathi"); SET_OPNAME (GEN_IMPLIES, "=>"); SET_OPNAME (GEN_IN, "%in"); SET_OPNAME (GEN_INFINITY, "%infty"); SET_OPNAME (GEN_INTO, "->"); SET_OPNAME (GEN_LESS, "<"); SET_OPNAME (GEN_LESSEQ, "<="); SET_OPNAME (GEN_LESSLESS, "<<"); SET_OPNAME (GEN_MAPSTO, "#{:->}#"); SET_OPNAME (GEN_MINUS, "-"); SET_OPNAME (GEN_MOD, "mod"); SET_OPNAME (GEN_NOT, "!"); SET_OPNAME (GEN_OR, "\\/"); SET_OPNAME (GEN_OVER, "/"); SET_OPNAME (GEN_PARTIAL, "%partial"); SET_OPNAME (GEN_PI, "%mathpi"); SET_OPNAME (GEN_PLUS, "+&"); SET_OPNAME (GEN_POWER, "^"); SET_OPNAME (GEN_PRIME, "%prime"); SET_OPNAME (GEN_RANGE, "%ldots"); // problem with iterator flattening SET_OPNAME (GEN_SCOPE, "%colons"); SET_OPNAME (GEN_TO, "to"); SET_OPNAME (GEN_DOWNTO, "downto"); SET_OPNAME (GEN_ROW, "row"); SET_OPNAME (GEN_SEQAND, "and"); SET_OPNAME (GEN_SEQOR, "or"); SET_OPNAME (GEN_SIZE, "%card"); SET_OPNAME (GEN_SQTUPLE, "list"); SET_OPNAME (GEN_TIMES, "*&"); SET_OPNAME (GEN_TRANSTYPE, "#{:>}#"); SET_OPNAME (GEN_TUPLE, "tuple"); //SET_OPNAME (GEN_TYPE, "#{:}#"); SET_OPNAME (GEN_UNEQUAL, "!="); SET_OPNAME (GEN_VWHERE, "|"); SET_OPNAME (GEN_WHERE, "||"); SET_OPNAME (GEN_XOR, "%veebar"); t["alpha"] = "%alpha"; t["beta"] = "%beta"; t["gamma"] = "%gamma"; t["delta"] = "%delta"; t["epsilon"] = "%varepsilon"; t["zeta"] = "%zeta"; t["eta"] = "%eta"; t["theta"] = "%theta"; t["iota"] = "%iota"; t["kappa"] = "%kappa"; t["lambda"] = "%lambda"; t["mu"] = "%mu"; t["nu"] = "%nu"; t["xi"] = "%xi"; t["omicron"] = "%omicron"; t["pi"] = "%pi"; t["rho"] = "%rho"; t["sigma"] = "%sigma"; t["tau"] = "%tau"; t["upsilon"] = "%upsilon"; t["phi"] = "%varphi"; t["chi"] = "%chi"; t["psi"] = "%psi"; t["omega"] = "%omega"; t["Alpha"] = "%Alpha"; t["Beta"] = "%Beta"; t["Gamma"] = "%Gamma"; t["Delta"] = "%Delta"; t["Epsilon"] = "%Epsilon"; t["Zeta"] = "%Zeta"; t["Eta"] = "%Eta"; t["Theta"] = "%Theta"; t["Iota"] = "%Iota"; t["Kappa"] = "%Kappa"; t["Lambda"] = "%Lambda"; t["Mu"] = "%Mu"; t["Nu"] = "%Nu"; t["Xi"] = "%Xi"; t["Omicron"] = "%Omicron"; t["Pi"] = "%Pi"; t["Rho"] = "%Rho"; t["Sigma"] = "%Sigma"; t["Tau"] = "%Tau"; t["Upsilon"] = "%Upsilon"; t["Phi"] = "%Phi"; t["Chi"] = "%Chi"; t["Psi"] = "%Psi"; t["Omega"] = "%Omega"; return t; }
Definition at line 727 of file generic.cpp.
References current_ev, and GEN_MAX.
{ return current_ev->apply (GEN_MAX, x1, x2); }
source_position mmx::max | ( | const source_position & | p1, |
const source_position & | p2 | ||
) | [inline] |
Definition at line 53 of file source_track.hpp.
References source_position::position.
{
return p1.position > p2.position? p1: p2;
};
C mmx::max | ( | const C & | x, |
const C & | y | ||
) |
Definition at line 511 of file defaults.hpp.
Referenced by as_double(), exponent(), formatting_port_rep::format(), GLUE_20(), GLUE_29(), max_op::op(), REP_STRUCT_1(), max_magnitude_op::set_op(), max_exponent_op::set_op(), max_op::set_op(), source_locate(), string_to_floating(), sup(), and wait_port_event().
{ return x>y? x: y; }
C mmx::maximal_cst | ( | ) | [inline] |
Definition at line 757 of file type_props.hpp.
References C, and set_maximal().
{ C r; set_maximal (r); return r; }
void mmx::mem_copy | ( | char * | d, |
char * | s, | ||
nat | n | ||
) | [inline] |
Definition at line 112 of file string.hpp.
References n.
Referenced by input_output_string_port_rep::read(), input_string_port_rep::read(), and posix_port_rep::read().
list<C> mmx::merge | ( | const list< C > & | head, |
const list< C > & | tail, | ||
int(*)(const C &, const C &) | cmp | ||
) |
Definition at line 41 of file dynamic.cpp.
References N().
Definition at line 132 of file chain.hpp.
Referenced by balance_left(), balance_right(), binary_test(), cAr(), car(), cDr(), cdr(), copy(), binary_helper< chain< C > >::disassemble(), iterate(), map(), operator*(), range(), reverse(), shift_left(), shift_right(), sort_sub(), unary_hash(), and binary_helper< chain< C > >::write_bis().
{ return c.rep->m; }
Definition at line 220 of file syntactic.cpp.
References GEN_MINUS, GEN_PLUS, is_func(), migrate_sub(), and signed_decompose().
Referenced by ordered_sum().
{ int i= 0, found= -1; syntactic h= g; while (is_func (h, GEN_PLUS, 2) || is_func (h, GEN_MINUS, 2)) { if (is_func (h, GEN_PLUS, 2)) found= i; if (maximal == 0) return g; h= h[1]; maximal--; i++; } if (found == -1) return g; syntactic abs_h; int sgn_h; signed_decompose (h, abs_h, sgn_h); if (sgn_h >= 0) return g; return migrate_sub (g, found); }
Definition at line 205 of file syntactic.cpp.
References GEN_MINUS, is_func(), signed_decompose(), and syn().
Referenced by migrate_negate(), and migrate_sub().
{ if (is_func (g, GEN_MINUS, 2)) return syn (GEN_MINUS, migrate_sub (g[1], h), g[2]); syntactic abs_g; int sgn_g; signed_decompose (g, abs_g, sgn_g); return syn (GEN_MINUS, h, abs_g); }
Definition at line 214 of file syntactic.cpp.
References migrate_sub(), and syn().
{ if (found == 0) return migrate_sub (g[1], g[2]); return syn (g[0], migrate_sub (g[1], found-1), g[2]); }
Definition at line 725 of file generic.cpp.
References current_ev, and GEN_MIN.
{ return current_ev->apply (GEN_MIN, x1, x2); }
source_position mmx::min | ( | const source_position & | p1, |
const source_position & | p2 | ||
) | [inline] |
Definition at line 48 of file source_track.hpp.
References source_position::position.
{
return p1.position < p2.position? p1: p2;
};
C mmx::min | ( | const C & | x, |
const C & | y | ||
) |
Definition at line 510 of file defaults.hpp.
Referenced by add_indentation(), composite_port_rep::can_write(), get_indentation(), GLUE_19(), GLUE_28(), INDIRECT_IMPL_1(), inf(), min_op::op(), composite_port_rep::read(), REP_STRUCT_1(), min_precision_op::set_op(), min_op::set_op(), source_locate(), tokenize(), and composite_port_rep::wait().
{ return x<y? x: y; }
C mmx::minimal_cst | ( | ) | [inline] |
Definition at line 759 of file type_props.hpp.
References C, and set_minimal().
{ C r; set_minimal (r); return r; }
bool mkdir | ( | const string & | orig_name | ) |
Definition at line 519 of file system.cpp.
References decode_name(), and var_mkdir().
Referenced by var_mkdir().
{ return var_mkdir (decode_name (name)); }
void mmx::mmx_classical_delete | ( | C * | Ptr | ) | [inline] |
C* mmx::mmx_classical_new | ( | nat | n | ) | [inline] |
nat mmx::mmx_cpu_time | ( | ) | [inline] |
string mmx::mmx_cpu_time_unit | ( | ) | [inline] |
void mmx::mmx_delete | ( | C * | Ptr, |
nat | n | ||
) | [inline] |
Definition at line 285 of file fast_new.hpp.
References C, mmx_free(), and n.
Referenced by vector< observer >::vector().
{ #ifdef BASIX_ENABLE_VERIFY void* ptr= (void*) Ptr; //printf ("{--%p}", ptr); fflush (stdout); ptr= (void*) (((char*) ptr) - 16); //printf ("{-%p}", ptr); fflush (stdout); if (*((nat*) ptr) != n) printf ("[%u should be %u]\n", n, *((nat*) ptr)); assert (*((nat*) ptr) == n); C* ctr= Ptr+n-1; for (nat i=0; i<n; i++, ctr--) ctr -> ~C(); mmx_free (ptr, n * sizeof (C) + 16); #else C* ctr= Ptr+n-1; for (nat i=0; i<n; i++, ctr--) ctr -> ~C(); mmx_free ((void*) Ptr, n * sizeof (C)); #endif }
void mmx::mmx_delete_one | ( | C * | ptr | ) | [inline] |
Definition at line 315 of file fast_new.hpp.
{ mmx_delete<C> (ptr, 1); }
T* mmx::mmx_formatted_new | ( | nat | l, |
const format< T > & | fm | ||
) | [inline] |
Definition at line 501 of file type_props.hpp.
{ typedef typename format<T>::FT FT; return formatted_new_helper<FT,T>::op (l, fm); }
void mmx::mmx_free | ( | void * | ptr, |
size_t | old_size | ||
) | [inline] |
Definition at line 208 of file fast_new.hpp.
References mmx_free_thread_safe(), mmx_free_thread_unsafe(), and threads_active.
Referenced by free_charp(), mmx_classical_delete(), mmx_delete(), and REP_STRUCT< C >::~string_rep().
{ threads_active ? mmx_free_thread_safe (ptr, old_size) : mmx_free_thread_unsafe (ptr, old_size); }
void mmx::mmx_free_thread_safe | ( | void * | ptr, |
size_t | old_size | ||
) | [inline] |
Definition at line 193 of file fast_new.hpp.
References memory_lock, and mmx_free_thread_unsafe().
Referenced by mmx_free().
{ mutex_lock lock (memory_lock); mmx_free_thread_unsafe (ptr, old_size); }
void mmx::mmx_free_thread_unsafe | ( | register void * | ptr, |
register size_t | sz | ||
) |
Referenced by mmx_free(), and mmx_free_thread_safe().
int mmx_lex | ( | generic * | lval, |
parse_instance * | obj | ||
) |
Definition at line 79 of file mmx_lexer.cpp.
References ADD_POS, HAS, IN, INC_LINE, INC_POS, is_alpha(), keyword(), n, pos, PREFIX, produce, s, SAVE_START, SET_PREV, and test.
{ if (pos == n) { s= NULL; *lval= generic (); return 0; } SET_PREV; char c= s[pos]; while ((c<=' ') || (c>'~')) { if ((c == '\n') || (c == '\r')) INC_LINE else INC_POS; if (pos == n) { s= NULL; *lval= generic (); return 0; } c= s[pos]; } SAVE_START; INC_POS; switch (c) { case '!': test ('=', NOT_EQUAL); if ((pos<n) && (s[pos]=='<')) { INC_POS; test ('=', NOT_LEQ); produce (NOT_LESS); } if ((pos<n) && (s[pos]=='>')) { INC_POS; test ('=', NOT_GEQ); produce (NOT_GREATER); } produce (NOT); case '\042': while (pos<n) { if ((s[pos]=='\\') && ((pos+2)<n)) { ADD_POS(2); continue; } if (s[pos]=='\n' || (s[pos]=='\r')) { INC_LINE; continue; } if (s[pos]=='\042') { INC_POS; break; } INC_POS; } produce (STRING); case '#': produce (SIZE); case '$': goto identifier; case '%': produce (PERCENT); case '&': produce (AMPERSAND); case '\047': produce (QUOTE); case '(': case ')': produce (c); case '*': test ('=', TIMES_ASSIGN); produce (TIMES); case '+': test ('=', PLUS_ASSIGN); test ('+', INC); produce (PLUS); case ',': produce (c); case '-': test ('=', MINUS_ASSIGN); test ('-', DEC); test ('>', INTO); produce (MINUS); case '.': test ('.', RANGE); produce (ACCESS); case '/': test ('\\', AND); if (s[pos]=='/') { INC_POS; while ((pos<n) && (s[pos]!='\n')) { INC_POS; } if (pos<n) { INC_LINE; } return mmx_lex (lval, obj); } if (s[pos]=='{') { nat level= 1; INC_POS; while ((pos+1<n) && (level>0)) { if (s[pos]=='\n' || (s[pos]=='\r')) { INC_LINE; continue; } if ((s[pos]=='/') && (s[pos+1]=='{')) { level++; ADD_POS(2); continue; } if ((s[pos]=='}') && (s[pos+1]=='/')) { level--; ADD_POS(2); continue; } INC_POS; } if (level>0) pos=n; return mmx_lex (lval, obj); } if (s[pos] == '\"') { INC_POS; while ((pos+1<n) && ((s[pos]!='\"') || (s[pos+1]!='/'))) { if (s[pos]=='\n' || (s[pos]=='\r')) { INC_LINE; } else { INC_POS; } } if (pos+1 < n) { ADD_POS(2); } produce (STRING); } test ('=', OVER_ASSIGN); produce (OVER); case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': while ((pos<n) && (s[pos]>='0') && (s[pos]<='9')) INC_POS; if ((pos<n+1) && (s[pos]=='.') && (s[pos+1]>='0') && (s[pos+1]<='9')) { ADD_POS(2); while ((pos<n) && (s[pos]>='0') && (s[pos]<='9')) INC_POS; if ((pos<n+1) && ((s[pos]=='e') || (s[pos]=='E'))) { nat p= ((pos<n+2) && (s[pos+1]=='-') ? 2: 1); if ((s[pos+p]>='0') && (s[pos+p]<='9')) { ADD_POS(p); while ((pos<n) && (s[pos]>='0') && (s[pos]<='9')) INC_POS; } } produce (FLOATING); } else produce (INTEGER); case ':': if ((pos<n) && (s[pos]=='=')) { if ((pos+1<n) && (s[pos+1]=='>')) { ADD_POS(2); produce (ASSIGN_MACRO); } INC_POS; produce (ASSIGN); } test ('>', TRANSTYPE); test (':', SCOPE); if ((pos+1<n) && (s[pos]=='-') && (s[pos+1]=='>')) { ADD_POS(2); produce (MAPSTO); } produce (TYPE); case ';': produce (c); case '<': if ((pos<n) && (s[pos]=='<')) { if ((pos+1<n) && (s[pos+1]=='<')) { ADD_POS(2); produce (LEFT_FLUX_BIN); } if ((pos+1<n) && (s[pos+1]=='*')) { ADD_POS(2); produce (LEFT_FLUX_VAR); } if ((pos+1<n) && (s[pos+1]=='%')) { ADD_POS(2); produce (LEFT_FLUX_STR); } if ((pos+1<n) && (s[pos+1]=='=')) { ADD_POS(2); produce (LL_ASSIGN); } INC_POS; produce (LEFT_FLUX); } if ((pos+1<n) && (s[pos]=='=') && (s[pos+1]=='>')) { ADD_POS(2); produce (EQUIVALENT); } test ('=', LEQ); produce (LESS); case '=': if ((pos<n) && (s[pos]=='=')) { if ((pos+1<n) && (s[pos+1]=='>')) { ADD_POS(2); produce (DEFINE_MACRO); } INC_POS; produce (DEFINE); } test ('>', IMPLIES); produce (EQUAL); case '>': test ('<', APPEND); if ((pos<n) && (s[pos]=='>')) { if ((pos+1<n) && (s[pos+1]=='>')) { ADD_POS(2); produce (RIGHT_FLUX_BIN); } if ((pos+1<n) && (s[pos+1]=='=')) { ADD_POS(2); produce (GG_ASSIGN); } INC_POS; produce (RIGHT_FLUX); } test ('=', GEQ); produce (GREATER); case '?': goto identifier; case '@': test ('+', OPLUS); test ('-', OMINUS); test ('*', OTIMES); test ('/', OOVER); produce (COMPOSE); case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': goto identifier; case '[': produce (c); case '\\': test ('/', OR); produce (c); case ']': produce (c); case '^': test ('^', FILL); produce (POWER); case '_': goto identifier; case '`': produce (BACKQUOTE); case 'a': if (pos<n) { keyword ('b', "abstract", ABSTRACT); keyword ('d', "add", ADD); keyword ('n', "and", SEQAND); keyword ('s', "assume", ASSUME); } goto identifier; case 'b': if (pos<n) keyword ('r', "break", BREAK); goto identifier; case 'c': if ((pos+3)<n) { if (s[pos]=='a') { INC_POS; keyword ('s', "case", CASE); if (s[pos] == 't') { INC_POS; keyword ('c', "catch", CATCH); keyword ('e', "category", CATEGORY); } } keyword ('l', "class", CLASS); if ((s[pos]=='o') && (s[pos+1]=='n')) { ADD_POS(2); keyword ('c', "concrete", CONCRETE); if (((pos+1)<n) && s[pos]=='s' && s[pos+1]=='t') { ADD_POS(2); keyword ('a', "constant", CONSTANT); keyword ('r', "constructor", CONSTRUCTOR); } keyword ('t', "continue", CONTINUE); } } goto identifier; case 'd': if (pos<n) { keyword ('e', "destructor", DESTRUCTOR); if (s[pos]=='i') { INC_POS; keyword ('r', "direct", DIRECT); keyword ('v', "div", DIV); } if (s[pos]=='o') { INC_POS; if ((pos >= n) || (!is_alpha (s[pos]))) produce (DO); keyword ('w', "downto", DOWNTO); } } goto identifier; case 'e': if ((pos+1)<n) { keyword ('l', "else", ELSE); keyword ('v', "evolutive", EVOLUTIVE); if (s[pos]=='x') { INC_POS; keyword ('i', "exists", EXISTS); keyword ('p', "export", EXPORT); if (((pos+2)<n) && (s[pos]=='t') && (s[pos+1]=='e')) { ADD_POS(2); keyword ('n', "extend", EXTEND); keyword ('r', "extern", EXTERN); } } } goto identifier; case 'f': if (pos<n) { if ((pos+1<n) && (s[pos]=='o') && (s[pos+1]=='r')) { if ((pos+2<n) && (s[pos+2]=='a')) { keyword ('o', "forall", FORALL); } else if ((pos+2<n) && (s[pos+2]=='e')) { keyword ('o', "foreign", FOREIGN); } else { keyword ('o', "for", FOR); } } keyword ('r', "from", FROM); } goto identifier; case 'g': if (pos<n) keyword ('e', "generate", GENERATE); goto identifier; case 'h': if (pos<n) { keyword ('a', "has", HAS); keyword ('i', "hidden", HIDDEN); keyword ('o', "holds", HOLDS); } goto identifier; case 'i': if (pos<n) { keyword ('f', "if", IF); keyword ('m', "import", IMPORT); if (s[pos]=='n') { INC_POS; if ((pos >= n) || (!is_alpha (s[pos]))) produce (IN); keyword ('d', "indirect", INDIRECT); keyword ('f', "infix", INFIX); keyword ('h', "inherit", INHERIT); keyword ('l', "inline", INLINE); keyword ('p', "inplace", INPLACE); if ((pos+3<n) && (s[pos]=='t') && (s[pos+1]=='e') && (s[pos+2]=='r')) { ADD_POS(3); keyword ('a', "interactive", INTERACTIVE); keyword ('n', "intern", INTERN); } } } goto identifier; case 'j': if (pos<n) keyword ('o', "join", JOIN); goto identifier; case 'k': if (pos<n) keyword ('e', "keyword", KEYWORD); goto identifier; case 'l': if (pos<n) { keyword ('a', "lambda", LAMBDA); keyword ('i', "literal", LITERAL); if (((pos+1)<n) && (s[pos]=='o')) { INC_POS; keyword ('c', "locked", LOCKED); keyword ('o', "loop", LOOP); } } goto identifier; case 'm': if (pos<n) { keyword ('a', "macro", MACRO); keyword ('e', "method", METHOD); if (((pos+1)<n) && (s[pos]=='o') && (s[pos+1]=='d')) { if ((pos+2<n) && (s[pos+2]=='u')) { keyword ('o', "module", MODULE); } else { keyword ('o', "mod", MOD); } } keyword ('u', "mutable", MUTABLE); } goto identifier; case 'n': goto identifier; case 'o': if (pos<n) { keyword ('p', "operator", OPERATOR); keyword ('r', "or", SEQOR); keyword ('u', "outline", OUTLINE); } goto identifier; case 'p': if ((pos+1)<n) { keyword ('a', "packed", PACKED); keyword ('e', "penalty", PENALTY); keyword ('o', "postfix", POSTFIX); if (s[pos]=='r') { INC_POS; keyword ('e', "prefix", PREFIX); keyword ('i', "private", PRIVATE); keyword ('o', "protected", PROTECTED); } keyword ('u', "public", PUBLIC); } goto identifier; case 'q': if (pos<n) keyword ('u', "quo", QUO); goto identifier; case 'r': if ((pos+1)<n) { keyword ('a', "raise", RAISE); if (s[pos]=='e') { INC_POS; keyword ('m', "rem", REM); keyword ('t', "return", RETURN); } } goto identifier; case 's': if (pos<n) { keyword ('e', "sequel", SEQUEL); keyword ('p', "split", SPLIT); keyword ('t', "step", STEP); } goto identifier; case 't': if ((pos+1)<n) { if (s[pos]=='h') { INC_POS; keyword ('e', "then", THEN); keyword ('i', "this", THIS); } keyword ('r', "try", TRY); keyword ('o', "to", TO); } goto identifier; case 'u': if (((pos+1)<n) && (s[pos]=='n')) { INC_POS; keyword ('p', "unpacked", UNPACKED); keyword ('t', "until", UNTIL); } goto identifier; case 'v': if (((pos+1)<n) && (s[pos]=='a')) { INC_POS; keyword ('l', "value", VALUE); } goto identifier; case 'w': if (pos<n) { keyword ('h', "while", WHILE); keyword ('i', "with", WITH); } goto identifier; case 'x': if (pos<n) keyword ('o', "xor", XOR); goto identifier; case 'y': if (pos<n) keyword ('i', "yield", YIELD); goto identifier; case 'z': goto identifier; case '{': produce (c); case '|': test ('|', VWHERE); produce (WHERE); case '}': produce (c); case '~': test ('>', CONVERTS); produce (TILDA); default: return mmx_lex (lval, obj); identifier: while ((pos<n) && is_alpha (s[pos])) INC_POS; produce (IDENTIFIER); } }
void* mmx::mmx_malloc | ( | size_t | sz | ) | [inline] |
Definition at line 198 of file fast_new.hpp.
References mmx_malloc_thread_safe(), mmx_malloc_thread_unsafe(), and threads_active.
Referenced by as_charp(), mmx_classical_new(), and mmx_new().
{ return threads_active ? mmx_malloc_thread_safe (sz) : mmx_malloc_thread_unsafe (sz); }
void* mmx::mmx_malloc_thread_safe | ( | size_t | new_size | ) | [inline] |
Definition at line 183 of file fast_new.hpp.
References memory_lock, and mmx_malloc_thread_unsafe().
Referenced by mmx_malloc().
{ mutex_lock lock (memory_lock); return mmx_malloc_thread_unsafe (new_size); }
void* mmx::mmx_malloc_thread_unsafe | ( | register size_t | sz | ) |
Referenced by mmx_malloc(), and mmx_malloc_thread_safe().
C* mmx::mmx_new | ( | nat | n | ) | [inline] |
Definition at line 234 of file fast_new.hpp.
References C, mmx_malloc(), and n.
Referenced by REP_STRUCT_2().
{ #ifdef BASIX_ENABLE_VERIFY void* ptr= mmx_malloc (n * sizeof (C) + 16); *((nat*) ptr)= n; //printf ("{+%p}", ptr); fflush (stdout); ptr= (void*) (((char*) ptr) + 16); //printf ("{++%p}", ptr); fflush (stdout); #else void* ptr= mmx_malloc (n * sizeof (C)); #endif C* ctr= (C*) ptr; for (nat i=0; i<n; i++, ctr++) (void) new ((void*) ctr) C (); return (C*) ptr; }
C* mmx::mmx_new | ( | nat | n, |
const T1 & | a1, | ||
const T2 & | a2 | ||
) | [inline] |
Definition at line 268 of file fast_new.hpp.
References C, mmx_malloc(), and n.
{ #ifdef BASIX_ENABLE_VERIFY void* ptr= mmx_malloc (n * sizeof (C) + 16); *((nat*) ptr)= n; //printf ("{..+%p}", ptr); fflush (stdout); ptr= (void*) (((char*) ptr) + 16); //printf ("{..++%p}", ptr); fflush (stdout); #else void* ptr= mmx_malloc (n * sizeof (C)); #endif C* ctr= (C*) ptr; for (nat i=0; i<n; i++, ctr++) (void) new ((void*) ctr) C (a1, a2); return (C*) ptr; }
C* mmx::mmx_new | ( | nat | n, |
const T1 & | a1 | ||
) | [inline] |
Definition at line 251 of file fast_new.hpp.
References C, mmx_malloc(), and n.
{ #ifdef BASIX_ENABLE_VERIFY void* ptr= mmx_malloc (n * sizeof (C) + 16); *((nat*) ptr)= n; //printf ("{.+%p}", ptr); fflush (stdout); ptr= (void*) (((char*) ptr) + 16); //printf ("{.++%p}", ptr); fflush (stdout); #else void* ptr= mmx_malloc (n * sizeof (C)); #endif C* ctr= (C*) ptr; for (nat i=0; i<n; i++, ctr++) (void) new ((void*) ctr) C (a1); return (C*) ptr; }
C* mmx::mmx_new_one | ( | ) | [inline] |
Definition at line 305 of file fast_new.hpp.
{
return mmx_new<C> (1);
}
C* mmx::mmx_new_one | ( | const T1 & | a1 | ) | [inline] |
Definition at line 310 of file fast_new.hpp.
{
return mmx_new<C> (1, a1);
}
generic mmx::mmx_parse | ( | const string & | file_name, |
nat | input_number, | ||
const string & | s, | ||
list< generic > & | errors | ||
) |
void* mmx::mmx_realloc | ( | void * | ptr, |
size_t | old_size, | ||
size_t | new_size | ||
) | [inline] |
Definition at line 203 of file fast_new.hpp.
References mmx_realloc_thread_safe(), mmx_realloc_thread_unsafe(), and threads_active.
{ return threads_active ? mmx_realloc_thread_safe (ptr, old_size, new_size) : mmx_realloc_thread_unsafe (ptr, old_size, new_size);}
void* mmx::mmx_realloc_thread_safe | ( | void * | ptr, |
size_t | old_size, | ||
size_t | new_size | ||
) | [inline] |
Definition at line 188 of file fast_new.hpp.
References memory_lock, and mmx_realloc_thread_unsafe().
Referenced by mmx_realloc().
{ mutex_lock lock (memory_lock); return mmx_realloc_thread_unsafe (ptr, old_size, new_size); }
void* mmx::mmx_realloc_thread_unsafe | ( | register void * | old_ptr, |
register size_t | old_sz, | ||
register size_t | new_sz | ||
) |
Referenced by mmx_realloc(), and mmx_realloc_thread_safe().
nat mmx_time | ( | ) |
Relative time of day.
size_t mmx_used_bytes | ( | ) |
nat mmx_user_time | ( | ) |
User time of the current process and its terminated children.
Definition at line 51 of file timer.cpp.
{ #if defined(__MINGW__) || defined(__MINGW32__) return 0; #else struct rusage used; nat t; getrusage(RUSAGE_SELF, &used); t = (nat) ((time_t) ((used.ru_utime.tv_sec * 1000) + (used.ru_utime.tv_usec / 1000))); getrusage(RUSAGE_CHILDREN, &used); return t + (nat) ((time_t) ((used.ru_utime.tv_sec * 1000) + (used.ru_utime.tv_usec / 1000))); #endif }
string mmx::mmx_user_time_unit | ( | ) | [inline] |
double mmx_var_time | ( | ) |
void mmx::mul | ( | R & | x, |
const C1 & | y1, | ||
const C2 & | y2 | ||
) | [inline] |
Definition at line 56 of file operators.hpp.
Referenced by lmul_op::set_op(), rmul_op::set_op(), and mul_op::set_op().
{ x= y1 * y2; }
void mmx::mul_add | ( | R & | x, |
const C1 & | y1, | ||
const C2 & | y2 | ||
) | [inline] |
Definition at line 60 of file operators.hpp.
Referenced by lmul_add_op::set_op(), rmul_add_op::set_op(), and mul_add_op::set_op().
{ x += y1 * y2; }
T mmx::mul_operator | ( | const T & | x, |
const T & | y | ||
) |
Definition at line 31 of file operators.hpp.
{ return x*y; }
void mmx::mul_sub | ( | R & | x, |
const C1 & | y1, | ||
const C2 & | y2 | ||
) | [inline] |
Definition at line 775 of file generic.cpp.
References current_ev, and GEN_MULTIPLICATIVE_ERROR.
Referenced by multiplicative_error_op::Abs_type(), GLUE_47(), and multiplicative_error_op::set_op().
{ return current_ev->apply (GEN_MULTIPLICATIVE_ERROR, x); }
unary_return_type_helper<abs_op, C >::RET mmx::multiplicative_error | ( | const C & | x | ) | [inline] |
Definition at line 870 of file type_props.hpp.
References rounding_error().
{ return rounding_error (x); }
nat mmx::N | ( | const generic & | g | ) | [inline] |
Definition at line 156 of file generic.hpp.
{
return g->get_length (); }
Definition at line 135 of file chain.hpp.
Referenced by _mul_add(), inspector< compound >::access(), add_indentation(), add_modes(), append(), composed_routine_rep::apply(), identity_routine_rep::apply(), apply(), quintary_routine_rep< void, S1, S2, S3, S4, S5 >::apply(), quintary_routine_rep< D, S1, S2, S3, S4, S5 >::apply(), quaternary_routine_rep< void, S1, S2, S3, S4 >::apply(), quaternary_routine_rep< D, S1, S2, S3, S4 >::apply(), ternary_routine_rep< void, S1, S2, S3 >::apply(), ternary_routine_rep< D, S1, S2, S3 >::apply(), binary_routine_rep< void, S1, S2 >::apply(), binary_routine_rep< D, S1, S2 >::apply(), unary_routine_rep< void, S1 >::apply(), unary_routine_rep< D, S1 >::apply(), nullary_routine_rep< void >::apply(), as_charp(), as_cpp(), as_documents(), as_double(), as_generics(), as_int(), as_lisp(), as_math(), as_texmacs(), as_vector(), binary_helper< table< C, T, V > >::assemble(), binary_helper< sparse_vector< C, T, V > >::assemble(), binary_helper< list< C > >::assemble(), binary_helper< heap< C > >::assemble(), binary_helper< chain< C > >::assemble(), assign(), balance_left(), balance_right(), binary_map(), binary_map_optimized(), binary_map_scalar(), binary_test(), binary_test_scalar(), input_string_port_rep::busy(), composite_port_rep::busy(), posix_port_rep::busy(), input_output_string_port_rep::can_read(), input_string_port_rep::can_read(), composite_port_rep::can_read(), posix_port_rep::can_read(), composite_port_rep::can_write(), canonical_name(), cAr(), cDr(), cdr(), collect(), compare_numeric(), compare_sub(), composite_port_rep::component(), components(), compose(), composed_routine_rep::composed_routine_rep(), composite_port(), concat_append(), cons(), contains(), copy(), as_helper< vector< T, TV >, vector< F, FV > >::cv(), fast_helper< vector< C, V > >::dd(), decode_name(), destroy(), detach(), solve_vector_lde_op::diff_op(), binary_helper< chain< C > >::disassemble(), documentify(), dot(), ends(), composite_port_rep::error_flag(), composite_port_rep::error_message(), escape(), eval_system(), input_output_string_port_rep::expression(), input_string_port_rep::expression(), composite_port_rep::expression(), extend(), extract(), extract_mod(), socket_port_rep::feed(), find(), flatten(), composite_port_rep::flush(), formatting_port_rep::format(), get_directory(), get_extension(), get_file_source(), get_indentation(), get_interactive_number(), get_interactive_source(), GLUE_4(), GLUE_5(), hash(), identity_routine(), insert(), inside_append(), is_alpha(), is_applicable(), is_atom(), vector_iterator_rep< C, V >::is_busy(), heap_iterator_rep< C >::is_busy(), is_C0(), is_func(), composite_port_rep::is_input_port(), is_nil(), is_numeric(), composite_port_rep::is_output_port(), inspector< compound >::length(), list< cleaner >::list(), list_append_several(), list_apply(), list_map(), list_map_n(), locase(), locase_first(), make_document(), map(), message(), N(), nullary_set(), operator*(), operator<(), operator<<(), vector< C, V >::operator<<(), operator<=(), operator>(), operator>=(), vector< observer >::operator[](), ordered_product(), ordered_sum(), parse_instance::parse_instance(), parse_lisp(), path_name(), print_mmx(), range(), input_output_string_port_rep::read(), input_string_port_rep::read(), composite_port_rep::read(), posix_port_rep::read(), reads(), recompose(), relative_name(), remove(), REP_STRUCT_1(), REP_STRUCT_2(), replace(), replace_lf(), resolve_name(), reverse(), scheme_to_tm(), search_backwards(), search_forwards(), serialize(), signed_decompose(), size(), binary_helper< vector< C, V > >::size(), binary_helper< sparse_vector< C, T, V > >::size(), binary_helper< heap< C > >::size(), sort(), sort_leq(), source_exception(), source_locate(), starts(), store_interactive_number(), string_to_floating(), string_to_numeric(), strip_directory(), strip_extension(), texmacs_expand(), texmacs_to_scheme(), tokenize(), type_name(), un_try_catch(), unary_hash(), unary_map(), unary_set(), unary_set_scalar(), underlined(), unescape(), unquote(), upcase(), upcase_first(), updater_rep::update(), fast_helper< vector< C, V > >::uu(), var_load(), vector< observer >::vector(), vector_append_several(), vector_map(), vector_map_1(), vector_map_2(), vector_map_n(), vector_size(), composite_port_rep::wait(), WRAP_BINARY_IMPL_1(), WRAP_INDIRECT_IMPL(), composite_port_rep::write(), binary_helper< vector< C, V > >::write(), binary_helper< table< C, T, V > >::write(), binary_helper< sparse_vector< C, T, V > >::write(), binary_helper< string >::write(), write(), binary_helper< heap< C > >::write(), binary_helper< chain< C > >::write(), xgen_sub(), and dynamic_rep::~dynamic_rep().
{ return (c.rep == NULL? 0: c.rep->size); }
Definition at line 202 of file vector.hpp.
{ return v->n; }
nat mmx::N | ( | const vector< C, vector_fixed< V, S > > & | v | ) | [inline] |
V nat N | ( | const sparse_vector< C, T, V > & | v | ) | [inline] |
Definition at line 97 of file sparse_vector.hpp.
{ return v.rep->n; }
C mmx::nan_cst | ( | ) | [inline] |
void mmx::neg | ( | R & | x | ) | [inline] |
void mmx::neg | ( | R & | x, |
const C1 & | y1 | ||
) | [inline] |
Definition at line 50 of file operators.hpp.
{ x= -y1; }
T mmx::neg_operator | ( | const T & | x | ) |
Definition at line 28 of file operators.hpp.
{ return -x; }
Definition at line 203 of file alias.hpp.
References alias_type_info().
Referenced by define_user_type().
{ int mode= 2; alias_type_info (id, mode); return id; }
generic_alias<C> mmx::new_genalias | ( | const alias< generic > & | a | ) | [inline] |
Definition at line 130 of file alias.hpp.
{ return generic_alias<C> (a); }
Definition at line 210 of file alias.hpp.
References alias_type_info().
{ int mode= 3; alias_type_info (id, mode); return id; }
Definition at line 112 of file tuple.hpp.
References tuple_type_info().
{ bool mode= true; tuple_type_info (id, mode); return id; }
nat new_type_id | ( | ) |
Definition at line 31 of file generic.cpp.
References ASSERT.
Referenced by alias_type_info(), define_user_type(), global_type_id(), new_type_id(), and tuple_type_info().
nat new_type_id | ( | const char * | s | ) |
Definition at line 38 of file generic.cpp.
References contains(), inside_set(), new_type_id(), and s.
{ static table<nat, string> t; if (!contains (t, s)) { nat id= new_type_id (); inside_set (t, s, id); return id; } return t[s]; }
Definition at line 767 of file generic.cpp.
References current_ev, and GEN_NEXT_ABOVE.
{ return current_ev->apply (GEN_NEXT_ABOVE, x); }
double next_above | ( | const double & | x | ) | [inline] |
Definition at line 83 of file double.hpp.
Referenced by GLUE_39().
{ return nextafter (x, HUGE_VAL); }
double mmx::next_below | ( | const double & | x | ) | [inline] |
Definition at line 84 of file double.hpp.
Referenced by GLUE_40().
{ return nextafter (x, -HUGE_VAL); }
Definition at line 769 of file generic.cpp.
References current_ev, and GEN_NEXT_BELOW.
{ return current_ev->apply (GEN_NEXT_BELOW, x); }
nat mmx::next_power_of_three | ( | nat | p | ) | [inline] |
nat mmx::next_power_of_two | ( | nat | p | ) | [inline] |
void noop | ( | ) |
Definition at line 172 of file routine.hpp.
Referenced by define().
{ return new nullary_routine_rep<D> (name, fun); }
Definition at line 712 of file generic.cpp.
References current_ev, and GEN_NUMERATOR.
Referenced by numerator_op::Numerator_type(), numerator_op::op(), and numerator_op::set_op().
{ return current_ev->apply (GEN_NUMERATOR, x); }
Definition at line 436 of file syntactic.cpp.
References GEN_NUMERATOR, and syn().
{ return syn (GEN_NUMERATOR, g1); }
string mmx::numeric_as_string | ( | const C & | x | ) |
void mmx::numeric_to_string | ( | const C & | x, |
string & | s | ||
) |
Definition at line 150 of file string.hpp.
{ if (x == 0) s << '0'; else if (x <= 0) { // NOTE x < 0 would be nicer, but yields warnings s << '-'; numeric_to_string (-x, s); } else { if (x >= 10) numeric_to_string (x/10, s); s << (char) (((char) '0') + ((char) ((int) (x%10)))); } }
STMPL void numeric_to_string | ( | const float & | x, |
string & | s | ||
) |
Definition at line 209 of file string.cpp.
References floating_to_string().
{ floating_to_string (x, s, "%1.8e"); }
STMPL void numeric_to_string | ( | const double & | x, |
string & | s | ||
) |
Definition at line 211 of file string.cpp.
References floating_to_string().
{ floating_to_string (x, s, "%1.17le"); }
STMPL void numeric_to_string | ( | const long double & | x, |
string & | s | ||
) |
Definition at line 213 of file string.cpp.
References floating_to_string().
{ floating_to_string (x, s, "%1.21Le"); }
Definition at line 83 of file generic_object.cpp.
References as_object(), scalar_to_alias(), and type().
Referenced by define_user_type().
{ nat alias_id= scalar_to_alias (type (x)); return as_object (as<generic> (new_alias<generic> (x)), alias_id); }
Definition at line 74 of file generic_object.cpp.
Referenced by define_user_type().
{
return x == y; }
Definition at line 78 of file generic_object.cpp.
References apply(), as_generic(), flatten(), type(), and type_name().
Referenced by define_user_type().
Definition at line 95 of file generic_object.cpp.
References as_generic(), and type().
Referenced by define_user_type().
{ nat alias_id= type (x); return as<alias<generic> > (as_generic (x, alias_id)); }
Definition at line 86 of file generic_object.cpp.
References as(), as_generic(), get_alias(), and type().
Referenced by define_user_type().
{ nat alias_id= type (x); return get_alias (as<alias<generic> > (as_generic (x, alias_id))); }
Definition at line 89 of file generic_object.cpp.
References as(), as_generic(), set_alias(), and type().
Referenced by define_user_type().
{ nat alias_id= type (x); return set_alias (as<alias<generic> > (as_generic (x, alias_id)), y); }
Definition at line 92 of file generic_object.cpp.
References as_object(), get_alias(), scalar_to_alias(), and type().
Referenced by define_user_type().
{ nat alias_id= scalar_to_alias (type (get_alias (x))); return as_object (as<generic> (x), alias_id); }
Definition at line 76 of file generic_object.cpp.
Referenced by define_user_type().
{
return x != y; }
Definition at line 57 of file alias.hpp.
Referenced by alias_binary_access_rep< C, R, A, B >::open(), and alias_unary_access_rep< C, R, A >::open().
{ return a->open (); }
Definition at line 139 of file mmx_printer.cpp.
References gen().
Referenced by mmx_printer::pp_E0().
{ return gen ("$operate", g, h); }
bool operator!= | ( | const generic & | x1, |
const int & | x2 | ||
) |
Definition at line 580 of file generic.cpp.
{ return !(x1 == x2); }
Definition at line 103 of file symbol.hpp.
{
return (*s1) != (*s2); }
Definition at line 53 of file document.hpp.
{
return (*c1) != (*c2); }
Definition at line 579 of file generic.cpp.
{ return !(x1 == x2); }
bool mmx::operator!= | ( | const symbol< C, equal_table > & | s1, |
const symbol< C, equal_table > & | s2 | ||
) | [inline] |
bool mmx::operator!= | ( | const exception & | e1, |
const exception & | e2 | ||
) | [inline] |
Definition at line 41 of file exception.hpp.
{
return (*e1) != (*e2); }
bool mmx::operator!= | ( | const syntactic & | c1, |
const syntactic & | c2 | ||
) | [inline] |
Definition at line 56 of file syntactic.hpp.
{
return (*c1) != (*c2); }
Definition at line 46 of file literal.hpp.
{
return as_symbol (c1) != as_symbol (c2); }
Definition at line 49 of file compound.hpp.
{
return as_symbol (c1) != as_symbol (c2); }
bool operator!= | ( | const int & | x1, |
const generic & | x2 | ||
) |
Definition at line 582 of file generic.cpp.
{ return x2 != x1; }
Definition at line 839 of file generic.cpp.
References current_ev, and GEN_AND.
{ return current_ev->apply (GEN_AND, x1, x2); }
Definition at line 1035 of file vector.hpp.
{
return binary_map<and_op> (v, w); }
Definition at line 393 of file generic.cpp.
References ACC_BINARY, ACC_MUL, current_ev, and GEN_TIMES.
{ ACC_BINARY (ACC_MUL, x1, x2); return current_ev->apply (GEN_TIMES, x1, x2); }
Definition at line 408 of file generic.cpp.
{ return x1 * generic (x2); }
Definition at line 251 of file syntactic.cpp.
References exact_eq(), frac_flag, GEN_OVER, GEN_TIMES, is_func(), and syn().
{ if (frac_flag && is_func (g1, GEN_OVER, 2)) { if (is_func (g2, GEN_OVER, 2)) return syn (GEN_OVER, g1[1] * g2[1], g1[2] * g2[2]); else return syn (GEN_OVER, g1[1] * g2, g1[2]); } if (frac_flag && is_func (g2, GEN_OVER, 2)) return syn (GEN_OVER, g1 * g2[1], g2[2]); if (exact_eq (g1, 0)) return 0; if (exact_eq (g2, 0)) return 0; if (exact_eq (g1, 1)) return g2; if (exact_eq (g2, 1)) return g1; if (exact_eq (g1, -1)) return -g2; if (exact_eq (g2, -1)) return -g1; return syn (GEN_TIMES, g1, g2); }
Definition at line 416 of file generic.cpp.
{ return generic (x1) * x2; }
Definition at line 318 of file chain.hpp.
References balance_left(), balance_right(), cAr(), car(), cDr(), cdr(), Chain, left(), middle(), N(), and right().
{ nat nl= N (l), nr= N (r); if (nl < nr) { if (nl == 0) return r; if (nr < 2*nl + 3) return Chain (l, car (r), cdr (r)); Chain br= balance_right (r); return Chain (l * left (br), middle (br), right (br)); } else { if (nr == 0) return l; if (nl < 2*nr + 3) return Chain (cDr (l), cAr (l), r); Chain bl= balance_left (l); return Chain (left (bl), middle (bl), right (bl) * r); } }
Definition at line 1001 of file vector.hpp.
{
return binary_map<mul_op> (v, w); }
Definition at line 1009 of file vector.hpp.
{
return binary_map_scalar<rmul_op> (v, c); }
Definition at line 381 of file iterator.hpp.
References Iterator.
{ return Iterator (new join_iterator_rep<C> (it1, it2)); }
sparse_vector<C,T,V> mmx::operator* | ( | const sparse_vector< C, T, V > & | t, |
const C & | sc | ||
) | [inline] |
Definition at line 291 of file sparse_vector.hpp.
{
return binary_map_scalar<rmul_op> (t, sc); }
sparse_vector<C,T,V> mmx::operator* | ( | const C & | sc, |
const sparse_vector< C, T, V > & | t | ||
) | [inline] |
Definition at line 294 of file sparse_vector.hpp.
{
return binary_map_scalar<lmul_op> (t, sc); }
sparse_vector<C,T,V> mmx::operator* | ( | const sparse_vector< C, T, V > & | t, |
const sparse_vector< C, T, V > & | u | ||
) | [inline] |
Definition at line 264 of file sparse_vector.hpp.
{
return binary_map<mul_op,C,T,V> (t, u); }
Definition at line 1014 of file vector.hpp.
{
return binary_map_scalar<lmul_op> (v, c); }
Definition at line 1017 of file vector.hpp.
{
return binary_map_scalar<lmul_op> (v, c); }
Definition at line 1012 of file vector.hpp.
{
return binary_map_scalar<rmul_op> (v, c); }
C& mmx::operator*= | ( | C & | x, |
const D & | y | ||
) | [inline] |
Definition at line 334 of file defaults.hpp.
{ return x= x*y; }
Definition at line 1042 of file vector.hpp.
{
return unary_set<mul_op> (v, w); }
Definition at line 1046 of file vector.hpp.
{
return unary_set_scalar<rmul_op> (v, c); }
Definition at line 404 of file generic.cpp.
{ return x1 + generic (x2); }
Definition at line 977 of file vector.hpp.
{
return binary_map<add_op> (v, w); }
Definition at line 979 of file vector.hpp.
References Vector.
{ return binary_map<add_op> (Vector (v), w); }
Definition at line 381 of file generic.cpp.
References ACC_ADD, ACC_BINARY, current_ev, and GEN_PLUS.
{ ACC_BINARY (ACC_ADD, x1, x2); return current_ev->apply (GEN_PLUS, x1, x2); }
Definition at line 168 of file syntactic.cpp.
References exact_eq(), GEN_MINUS, GEN_PLUS, is_func(), signed_decompose(), and syn().
{ if (exact_eq (g1, 0)) return g2; if (exact_eq (g2, 0)) return g1; if (is_func (g2, GEN_MINUS, 1)) return g1 - g2[1]; if (is_func (g2, GEN_PLUS, 2)) return (g1 + g2[1]) + g2[2]; if (is_func (g2, GEN_MINUS, 2)) return (g1 + g2[1]) - g2[2]; syntactic abs_g2; int sgn_g2; signed_decompose (g2, abs_g2, sgn_g2); if (sgn_g2 < 0) return syn (GEN_MINUS, g1, abs_g2); else return syn (GEN_PLUS, g1, abs_g2); }
Definition at line 412 of file generic.cpp.
{ return generic (x1) + x2; }
Definition at line 987 of file vector.hpp.
References Vector_int.
{ return binary_map<add_op> (w, Vector_int (v)); }
Definition at line 982 of file vector.hpp.
References Vector_int.
{ return binary_map<add_op> (Vector_int (v), w); }
Definition at line 984 of file vector.hpp.
References Vector.
{ return binary_map<add_op> (w, Vector (v)); }
sparse_vector<C,T,V> mmx::operator+ | ( | const sparse_vector< C, T, V > & | t, |
const sparse_vector< C, T, V > & | u | ||
) | [inline] |
Definition at line 258 of file sparse_vector.hpp.
{
return binary_map_optimized<add_op,C,T,V> (t, u); }
C& mmx::operator+= | ( | C & | x, |
const D & | y | ||
) | [inline] |
Definition at line 330 of file defaults.hpp.
{ return x= x+y; }
Definition at line 1038 of file vector.hpp.
{
return unary_set<add_op> (v, w); }
Definition at line 184 of file syntactic.cpp.
References exact_eq(), GEN_MINUS, GEN_PLUS, is_func(), signed_decompose(), and syn().
{ if (exact_eq (g2, 0)) return g1; if (is_func (g2, GEN_MINUS, 1)) return g1 + g2[1]; if (is_func (g2, GEN_PLUS, 2)) return (g1 - g2[1]) - g2[2]; if (is_func (g2, GEN_MINUS, 2)) return (g1 - g2[1]) + g2[2]; syntactic abs_g2; int sgn_g2; signed_decompose (g2, abs_g2, sgn_g2); if (exact_eq (g1, 0)) { if (sgn_g2 > 0) return syn (GEN_MINUS, abs_g2); else return abs_g2; } else { if (sgn_g2 > 0) return syn (GEN_MINUS, g1, abs_g2); else return syn (GEN_PLUS, g1, abs_g2); } }
Definition at line 363 of file generic.cpp.
References ACC_NEGATE, ACC_UNARY, current_ev, and GEN_MINUS.
{ ACC_UNARY (ACC_NEGATE, x1); return current_ev->apply (GEN_MINUS, x1); }
Definition at line 153 of file syntactic.cpp.
References exact_eq(), GEN_MINUS, GEN_PLUS, is_func(), signed_decompose(), and syn().
{ if (exact_eq (g, 0)) return g; if (is_func (g, GEN_MINUS, 1)) return g[1]; if (is_func (g, GEN_PLUS, 2)) return (-g[1]) - g[2]; if (is_func (g, GEN_MINUS, 2)) return (-g[1]) + g[2]; syntactic abs_g; int sgn_g; signed_decompose (g, abs_g, sgn_g); if (sgn_g > 0) return syn (GEN_MINUS, abs_g); else return abs_g; }
Definition at line 387 of file generic.cpp.
References ACC_BINARY, ACC_SUB, current_ev, and GEN_MINUS.
{ ACC_BINARY (ACC_SUB, x1, x2); return current_ev->apply (GEN_MINUS, x1, x2); }
Definition at line 414 of file generic.cpp.
{ return generic (x1) - x2; }
sparse_vector<C,T,V> mmx::operator- | ( | const sparse_vector< C, T, V > & | t | ) | [inline] |
Definition at line 187 of file sparse_vector.hpp.
{
return unary_map<neg_op,C,T,V> (t); }
Definition at line 989 of file vector.hpp.
{
return binary_map<sub_op> (v, w); }
Definition at line 999 of file vector.hpp.
References Vector_int.
{ return binary_map<sub_op> (Vector_int (v), w); }
Definition at line 994 of file vector.hpp.
References Vector_int.
{ return binary_map<sub_op> (v, Vector_int (w)); }
Definition at line 975 of file vector.hpp.
{
return unary_map<neg_op> (v); }
Definition at line 996 of file vector.hpp.
References Vector.
{ return binary_map<sub_op> (Vector (v), w); }
Definition at line 991 of file vector.hpp.
References Vector.
{ return binary_map<sub_op> (v, Vector (w)); }
Definition at line 406 of file generic.cpp.
{ return x1 - generic (x2); }
sparse_vector<C,T,V> mmx::operator- | ( | const sparse_vector< C, T, V > & | t, |
const sparse_vector< C, T, V > & | u | ||
) | [inline] |
Definition at line 261 of file sparse_vector.hpp.
{
return binary_map_optimized<sub_op,C,T,V> (t, u); }
Definition at line 1040 of file vector.hpp.
{
return unary_set<sub_op> (v, w); }
C& mmx::operator-= | ( | C & | x, |
const D & | y | ||
) | [inline] |
Definition at line 332 of file defaults.hpp.
{ return x= x-y; }
Definition at line 410 of file generic.cpp.
{ return x1 / generic (x2); }
Definition at line 418 of file generic.cpp.
{ return generic (x1) / x2; }
sparse_vector<C,T,V> mmx::operator/ | ( | const sparse_vector< C, T, V > & | t, |
const C & | sc | ||
) | [inline] |
Definition at line 297 of file sparse_vector.hpp.
{
return binary_map_scalar<rdiv_op> (t, sc); }
Definition at line 1022 of file vector.hpp.
{
return binary_map_scalar<rdiv_op> (v, c); }
Definition at line 1027 of file vector.hpp.
{
return binary_map_scalar<ldiv_op> (v, c); }
sparse_vector<C,T,V> mmx::operator/ | ( | const C & | sc, |
const sparse_vector< C, T, V > & | t | ||
) | [inline] |
Definition at line 300 of file sparse_vector.hpp.
{
return binary_map_scalar<ldiv_op> (t, sc); }
Definition at line 269 of file syntactic.cpp.
References exact_eq(), frac_flag, GEN_OVER, is_func(), and syn().
Definition at line 399 of file generic.cpp.
References ACC_BINARY, ACC_DIV, current_ev, and GEN_OVER.
{ ACC_BINARY (ACC_DIV, x1, x2); return current_ev->apply (GEN_OVER, x1, x2); }
Definition at line 1003 of file vector.hpp.
{
return binary_map<div_op> (v, w); }
Definition at line 1019 of file vector.hpp.
{
return binary_map_scalar<rdiv_op> (v, c); }
Definition at line 1024 of file vector.hpp.
{
return binary_map_scalar<ldiv_op> (v, c); }
Definition at line 1044 of file vector.hpp.
{
return unary_set<div_op> (v, w); }
C& mmx::operator/= | ( | C & | x, |
const D & | y | ||
) | [inline] |
Definition at line 336 of file defaults.hpp.
{ return x= x/y; }
Definition at line 1048 of file vector.hpp.
{
return unary_set_scalar<rdiv_op> (v, c); }
Definition at line 624 of file generic.cpp.
References ACC_LESS, ACC_TEST, as_bool(), current_ev, and GEN_LESS.
{ ACC_TEST (ACC_LESS, x1, x2); return as_bool (current_ev->apply (GEN_LESS, x1, x2)); }
bool operator< | ( | const generic & | x1, |
const int & | x2 | ||
) |
Definition at line 647 of file generic.cpp.
{ return x1 < generic (x2); }
bool operator< | ( | const int & | x1, |
const generic & | x2 | ||
) |
Definition at line 655 of file generic.cpp.
{ return generic (x1) < x2; }
port mmx::operator<< | ( | const port & | out, |
const print_format & | fm | ||
) | [inline] |
port mmx::operator<< | ( | const port & | out, |
const charp & | s | ||
) | [inline] |
Definition at line 143 of file port.hpp.
References string_as_mmx(), and write().
{ write (out, string_as_mmx (s)); return out; }
port mmx::operator<< | ( | const port & | out, |
const const_charp & | s | ||
) | [inline] |
Definition at line 149 of file port.hpp.
References string_as_mmx(), and write().
{ write (out, string_as_mmx (s)); return out; }
Definition at line 792 of file generic.cpp.
References current_ev, and GEN_LESSLESS.
{ return current_ev->apply (GEN_LESSLESS, x1, x2); }
port mmx::operator<< | ( | const port & | out, |
const char & | c | ||
) | [inline] |
Definition at line 155 of file port.hpp.
References string_as_mmx(), and write().
{ write (out, string_as_mmx (c)); return out; }
Definition at line 441 of file syntactic.cpp.
References GEN_LESSLESS, and syn().
{ return syn (GEN_LESSLESS, x1, x2); }
port mmx::operator<< | ( | const port & | out, |
const string & | s | ||
) | [inline] |
Definition at line 137 of file port.hpp.
References string_as_mmx(), and write().
{ write (out, string_as_mmx (s)); return out; }
Definition at line 213 of file cpp_printer.cpp.
port operator<< | ( | const port & | out, |
const C & | x | ||
) | [inline] |
Definition at line 131 of file port.hpp.
References output_as_mmx(), and write().
{ write (out, output_as_mmx (as<generic> (x))); return out; }
static string& mmx::operator<< | ( | string & | out, |
print_controls | pc | ||
) | [static] |
Definition at line 193 of file cpp_printer.cpp.
References INDENT, indentation_level, inside(), LF, N(), and UNINDENT.
{ switch (pc) { case LF: out << "\n"; for (nat i=0; i<indentation_level; i++) out << " "; break; case INDENT: indentation_level++; out << " "; break; case UNINDENT: indentation_level--; if (N(out) >= 2 && out[N(out)-2] == ' ' && out[N(out)-1] == ' ') inside (out) -> resize (N(out) - 2); break; } return out; }
Definition at line 218 of file cpp_printer.cpp.
References mmerr, and type_name().
Definition at line 630 of file generic.cpp.
References ACC_LESSEQ, ACC_TEST, as_bool(), current_ev, and GEN_LESSEQ.
{ ACC_TEST (ACC_LESSEQ, x1, x2); return as_bool (current_ev->apply (GEN_LESSEQ, x1, x2)); }
bool mmx::operator<= | ( | const table< C, T, V > & | t, |
const K & | c | ||
) | [inline] |
Definition at line 1055 of file vector.hpp.
{
return binary_test<lesseq_op> (v, w); }
bool mmx::operator<= | ( | const vector< C, V > & | v, |
const C & | c | ||
) |
Definition at line 1064 of file vector.hpp.
{
return binary_test_scalar<lesseq_op> (v, c); }
bool mmx::operator<= | ( | const vector< int, V > & | v, |
const int & | c | ||
) |
Definition at line 1067 of file vector.hpp.
{
return binary_test_scalar<lesseq_op> (v, c); }
bool operator<= | ( | const generic & | x1, |
const int & | x2 | ||
) |
Definition at line 649 of file generic.cpp.
{ return x1 <= generic (x2); }
bool operator<= | ( | const int & | x1, |
const generic & | x2 | ||
) |
Definition at line 657 of file generic.cpp.
{ return generic (x1) <= x2; }
bool mmx::operator== | ( | const vector< int, V > & | v, |
const int & | c | ||
) |
Definition at line 1062 of file vector.hpp.
{
return binary_test_scalar<equal_op> (v, c); }
Definition at line 101 of file symbol.hpp.
{
return (*s1) == (*s2); }
bool operator== | ( | const int & | x1, |
const generic & | x2 | ||
) |
Definition at line 581 of file generic.cpp.
{ return x2 == x1; }
bool mmx::operator== | ( | const table< C, T, V > & | t, |
const K & | c | ||
) | [inline] |
Definition at line 51 of file document.hpp.
{
return (*c1) == (*c2); }
Definition at line 554 of file generic.cpp.
References as_bool(), current_ev, GEN_EQUAL, is_nil(), and same_type().
{ if (same_type (x1, x2)) return x1->is_equal (x2); else { routine* cv= x1->acc_construct (x2->acc_id ()); if (cv != NULL && !is_nil (*cv)) return x1 -> is_equal ((*cv) (x2)); cv= x2->acc_construct (x1->acc_id ()); if (cv != NULL && !is_nil (*cv)) return (*cv) (x1) -> is_equal (x2); } return as_bool (current_ev->apply (GEN_EQUAL, x1, x2)); }
bool mmx::operator== | ( | const syntactic & | c1, |
const syntactic & | c2 | ||
) | [inline] |
Definition at line 54 of file syntactic.hpp.
{
return (*c1) == (*c2); }
bool mmx::operator== | ( | const vector< C, V > & | v, |
const C & | c | ||
) |
Definition at line 1059 of file vector.hpp.
{
return binary_test_scalar<equal_op> (v, c); }
Definition at line 44 of file literal.hpp.
{
return as_symbol (c1) == as_symbol (c2); }
bool operator== | ( | const generic & | x1, |
const int & | x2 | ||
) |
Definition at line 569 of file generic.cpp.
References is_nil().
{ if (is<int> (x1)) return as<int> (x1) == x2; else { routine* cv= x1->acc_construct (accelerator<int>::id); if (cv != NULL && !is_nil (*cv)) return x1 -> is_equal ((*cv) (as<generic> (x2))); } return x1 == generic (x2); }
bool mmx::operator== | ( | const exception & | e1, |
const exception & | e2 | ||
) | [inline] |
Definition at line 39 of file exception.hpp.
{
return (*e1) == (*e2); }
bool mmx::operator== | ( | const symbol< C, equal_table > & | s1, |
const symbol< C, equal_table > & | s2 | ||
) | [inline] |
Definition at line 47 of file compound.hpp.
{
return as_symbol (c1) == as_symbol (c2); }
bool operator> | ( | const generic & | x1, |
const int & | x2 | ||
) |
Definition at line 651 of file generic.cpp.
{ return x1 > generic (x2); }
Definition at line 636 of file generic.cpp.
References ACC_GTR, ACC_TEST, as_bool(), current_ev, and GEN_GTR.
{ ACC_TEST (ACC_GTR, x1, x2); return as_bool (current_ev->apply (GEN_GTR, x1, x2)); }
bool operator> | ( | const int & | x1, |
const generic & | x2 | ||
) |
Definition at line 659 of file generic.cpp.
{ return generic (x1) > x2; }
bool mmx::operator>= | ( | const table< C, T, V > & | t, |
const K & | c | ||
) | [inline] |
bool operator>= | ( | const generic & | x1, |
const int & | x2 | ||
) |
Definition at line 653 of file generic.cpp.
{ return x1 >= generic (x2); }
bool mmx::operator>= | ( | const vector< int, V > & | v, |
const int & | c | ||
) |
Definition at line 1072 of file vector.hpp.
{
return binary_test_scalar<gtreq_op> (v, c); }
Definition at line 1057 of file vector.hpp.
{
return binary_test<gtreq_op> (v, w); }
bool operator>= | ( | const int & | x1, |
const generic & | x2 | ||
) |
Definition at line 661 of file generic.cpp.
{ return generic (x1) >= x2; }
bool mmx::operator>= | ( | const vector< C, V > & | v, |
const C & | c | ||
) |
Definition at line 1069 of file vector.hpp.
{
return binary_test_scalar<gtreq_op> (v, c); }
Definition at line 642 of file generic.cpp.
References ACC_GTREQ, ACC_TEST, as_bool(), current_ev, and GEN_GTREQ.
{ ACC_TEST (ACC_GTREQ, x1, x2); return as_bool (current_ev->apply (GEN_GTREQ, x1, x2)); }
port mmx::operator>> | ( | const port & | in, |
char & | c | ||
) | [inline] |
Definition at line 794 of file generic.cpp.
References current_ev, and GEN_GTRGTR.
{ return current_ev->apply (GEN_GTRGTR, x1, x2); }
Definition at line 443 of file syntactic.cpp.
References GEN_GTRGTR, and syn().
{ return syn (GEN_GTRGTR, x1, x2); }
Definition at line 837 of file generic.cpp.
References current_ev, and GEN_OR.
{ return current_ev->apply (GEN_OR, x1, x2); }
Definition at line 1033 of file vector.hpp.
{
return binary_map<or_op> (v, w); }
Definition at line 147 of file cpp_printer.cpp.
References CPP_ACCESS, CPP_AND, CPP_ARROW, CPP_ASSIGN, CPP_BITWISE_AND, CPP_BITWISE_OR, CPP_BITWISE_XOR, CPP_COMPLEMENT, CPP_EQUAL, CPP_GTR, CPP_GTREQ, CPP_GTRGTR, CPP_GTRGTREQ(), CPP_LESS, CPP_LESSEQ, CPP_LESSLESS, CPP_LESSLESSEQ(), CPP_MINUS, CPP_MINUS_ASSIGN, CPP_MOD, CPP_MOD_ASSIGN, CPP_NOT, CPP_OR, CPP_OVER, CPP_OVER_ASSIGN, CPP_PLUS, CPP_PLUS_ASSIGN, CPP_PREDEC, CPP_PREINC, CPP_TIMES, CPP_TIMES_ASSIGN, CPP_UNEQUAL, and SET_OPNAME.
{ table<string, string> t; SET_OPNAME (CPP_PLUS, "+") SET_OPNAME (CPP_MINUS, "-"); SET_OPNAME (CPP_TIMES, "*"); SET_OPNAME (CPP_OVER, "/"); SET_OPNAME (CPP_MOD, "%"); SET_OPNAME (CPP_AND, "&&"); SET_OPNAME (CPP_OR, "||"); SET_OPNAME (CPP_NOT, "!"); SET_OPNAME (CPP_BITWISE_AND, "&"); SET_OPNAME (CPP_BITWISE_OR, "|"); SET_OPNAME (CPP_BITWISE_XOR, "^"); SET_OPNAME (CPP_ASSIGN, "="); SET_OPNAME (CPP_LESS, "<"); SET_OPNAME (CPP_GTR, ">"); SET_OPNAME (CPP_PLUS_ASSIGN, "+="); SET_OPNAME (CPP_MINUS_ASSIGN, "-="); SET_OPNAME (CPP_TIMES_ASSIGN, "*="); SET_OPNAME (CPP_OVER_ASSIGN, "/="); SET_OPNAME (CPP_MOD_ASSIGN, "%="); SET_OPNAME (CPP_LESSLESS, "<<"); SET_OPNAME (CPP_LESSLESSEQ, "<<="); SET_OPNAME (CPP_GTRGTR, ">>"); SET_OPNAME (CPP_GTRGTREQ, ">>="); SET_OPNAME (CPP_EQUAL, "=="); SET_OPNAME (CPP_UNEQUAL, "!="); SET_OPNAME (CPP_LESSEQ, "<="); SET_OPNAME (CPP_GTREQ, ">="); SET_OPNAME (CPP_PREINC, "++"); SET_OPNAME (CPP_PREDEC, "--"); SET_OPNAME (CPP_ACCESS, "[]"); SET_OPNAME (CPP_COMPLEMENT, "~"); SET_OPNAME (CPP_ARROW, "->"); return t; }
Definition at line 362 of file syntactic.cpp.
References copy(), N(), and set_frac_flag().
{ vector<syntactic> w= copy (v); sort_leq<product_less_op> (w); bool old= set_frac_flag (true); syntactic r= 1; for (nat i=0; i<N(w); i++) r= r * w[i]; (void) set_frac_flag (old); return r; }
Definition at line 336 of file syntactic.cpp.
References copy(), migrate_negate(), and N().
{ vector<syntactic> w= copy (v); sort_leq<sum_less_op> (w); syntactic r= 0; for (nat i=0; i<N(w); i++) r= r + w[i]; return migrate_negate (r, 5); }
Definition at line 916 of file mmx_printer.cpp.
References as_generic(), as_mmx(), DATA_BEGIN, DATA_END, flatten(), flatten_as_texmacs_scheme(), and math_mode.
Referenced by operator<<().
{ if (math_mode) { string r; r << DATA_BEGIN << "scheme:"; r << flatten_as_texmacs_scheme (g); r << DATA_END; return r; } else { generic f= as_generic (flatten (g)); return as_mmx (f); } }
Definition at line 96 of file file_port.cpp.
References as_charp(), decode_name(), error_port(), and free_charp().
Referenced by GLUE_3(), and save().
{ string name_s= decode_name (name); char* temp= as_charp (name_s); FILE* f= fopen (temp, "w"); free_charp (temp); if (f == NULL) return error_port ("file '" * name * "' not writable"); return output_file_port (f, true, name); }
Definition at line 70 of file file_port.cpp.
{ return (port_rep*) new file_port_rep (1, f, close_flag, name); }
observer mmx::output_observer | ( | dynamic_rep * | arg | ) |
Definition at line 85 of file dynamic.cpp.
References observer.
Referenced by flatten().
{ return observer (new output_observer_rep (arg)); }
port output_string_port | ( | string & | s | ) |
Definition at line 40 of file string_port.cpp.
{ return (port_rep*) new output_string_port_rep (s); }
static generic mmx::parse_lisp | ( | const string & | s, |
nat & | pos, | ||
bool | unquote_flag, | ||
bool | fun_flag | ||
) | [static] |
Definition at line 19 of file lisp_parser.cpp.
References N(), parse_lisp(), pos, s, start, unquote(), and vector_to_compound().
{ while (pos < N(s) && s[pos] == ' ') pos++; if (s[pos] == '(') { vector<generic> v; pos++; while (pos < N(s) && s[pos] != ')') { bool fun= (N(v) == 0); v << parse_lisp (s, pos, unquote_flag, fun); while (pos < N(s) && s[pos] == ' ') pos++; } if (pos < N(s)) pos++; return vector_to_compound (v); } else if (unquote_flag && !fun_flag && pos < N(s) && s[pos] == '\"') { nat start= pos; pos++; while (pos < N(s) && s[pos] != '\"') if (s[pos] == '\\') pos += 2; else pos++; if (pos < N(s)) pos++; return generic (unquote (s (start, pos))); } else { nat start= pos; while (pos < N(s) && s[pos] != ' ' && s[pos] != '(' && s[pos] != ')') pos++; return generic (s (start, pos)); } }
Definition at line 50 of file lisp_parser.cpp.
References pos.
Referenced by flatten_as_tm(), and parse_lisp().
{ nat pos= 0; return parse_lisp (s, pos, unquote_flag, false); }
Definition at line 185 of file system.cpp.
References canonical_name(), file_exists(), get_env(), init_system(), load_path(), n, N(), and start.
Referenced by dl_find(), and resolve_name().
{ //mmout << "path_name " << file_path << ", " << file_name << "\n"; if (N (file_name) > 0 && file_name[0] == '/') { if (file_exists (file_name)) return canonical_name (file_name); else return ""; } else { nat i, n= N(file_path), start= 0; for (i=0; i<=n; i++) if ((i==n) || (file_path[i] == ':')) { string ss= file_path (start, i); if ((N(ss) > 0) && (ss[0] == '$')) { init_system (); if (ss == "$MMX_LOAD_PATH") ss= load_path (); else ss= get_env (ss (1, N(ss))); string r= path_name (ss, file_name); if (r != "") return r; } else { if (ss == "" || ss == ".") ss= get_env ("PWD"); if (ss[N(ss)-1] != '/') ss= ss * "/"; if (file_exists (ss * file_name)) return canonical_name (ss * file_name); } start= i+1; } return ""; } }
C mmx::pi_cst | ( | ) | [inline] |
Definition at line 66 of file pipe_port.cpp.
References composite_port(), IN, OUT, STDERR, STDIN, STDOUT, and system().
Referenced by GLUE_6().
{ int pp_in [2]; // for data going to the child int pp_out[2]; // for data coming from the child int pp_err[2]; // for error messages coming from the child int e1 = pipe (pp_in ); (void) e1; int e2 = pipe (pp_out); (void) e2; int e3 = pipe (pp_err); (void) e3; int pid= fork (); if (pid==0) { // the child setsid(); close (pp_in [OUT]); close (pp_out [IN ]); close (pp_err [IN ]); dup2 (pp_in [IN ], STDIN ); close (pp_in [IN ]); dup2 (pp_out [OUT], STDOUT); close (pp_out [OUT]); dup2 (pp_err [OUT], STDERR); close (pp_err [OUT]); system (cmd); exit (127); // exit (system (cmd) != 0); } else { // the main process int in = pp_in [OUT]; close (pp_in [IN]); int out= pp_out [IN ]; close (pp_out [OUT]); int err= pp_err [IN ]; close (pp_err [OUT]); port pin = pipe_port (1, in , pid, cmd, "in" ); port pout= pipe_port (2, out, pid, cmd, "out"); port perr= pipe_port (2, err, pid, cmd, "err"); return composite_port (vec<port> (pin, pout, perr), vec<string> ("in", "out", "err")); } }
Definition at line 57 of file pipe_port.cpp.
{ return (port_rep*) new pipe_port_rep (kind, fd, pid, cmd, role); }
Definition at line 741 of file generic.cpp.
References exp(), and Imaginary.
Referenced by polar_op::set_op().
Definition at line 135 of file mmx_printer.cpp.
References gen().
{ return gen ("$postfix", g, op); }
Definition at line 1096 of file vector.hpp.
{
return binary_map_scalar<lpow_op> (v, w); }
double pow | ( | const double & | x, |
const int & | y | ||
) | [inline] |
Definition at line 533 of file generic.cpp.
References ACC_BINARY, ACC_POW, current_ev, and GEN_POWER.
{ ACC_BINARY (ACC_POW, x1, x2); return current_ev->apply (GEN_POWER, x1, x2); }
double pow | ( | const int & | x, |
const double & | y | ||
) | [inline] |
Definition at line 289 of file syntactic.cpp.
References abs(), exact_eq(), frac_flag, GEN_OVER, GEN_POWER, GEN_SQRT, pow(), signed_decompose(), and syn().
{ if (exact_eq (g1, 0)) return 0; if (exact_eq (g1, 1)) return 1; if (exact_eq (g2, 0)) return 1; if (exact_eq (g2, 1)) return g1; if (exact_eq (g2, syn (GEN_OVER, syntactic (1), syntactic (2)))) return syn (GEN_SQRT, g1); if (frac_flag) { syntactic abs; int sgn; signed_decompose (g2, abs, sgn); if (sgn < 0) return syn (GEN_OVER, 1, pow (g1, abs)); } return syn (GEN_POWER, g1, g2); }
double pow | ( | const double & | x, |
const double & | y | ||
) | [inline] |
Definition at line 61 of file double.hpp.
Referenced by apply(), GLUE_11(), GLUE_36(), lpow_op::op(), pow_op::op(), pow(), lpow_op::set_op(), and pow_op::set_op().
{ return std::pow (x, y); }
Definition at line 1092 of file vector.hpp.
{
return binary_map<pow_op> (v, w); }
Definition at line 1094 of file vector.hpp.
{
return binary_map_scalar<rpow_op> (v, w); }
Definition at line 763 of file generic.cpp.
References ASSERT, current_ev, and GEN_PRECISION.
{ generic r= current_ev->apply (GEN_PRECISION, x); ASSERT (is<int> (r), "Int return value expected"); return as<int> (r); }
Definition at line 1141 of file vector.hpp.
{
return big<min_precision_op> (v); }
xnat mmx::precision | ( | const double & | x | ) | [inline] |
Definition at line 82 of file double.hpp.
Referenced by GLUE_38(), precision_op::op(), min_precision_op::set_op(), and precision_op::set_op().
{ (void) x; return 51; }
Definition at line 137 of file mmx_printer.cpp.
References gen().
{ return gen ("$prefix", op, g); }
string prefix_dir | ( | ) |
Definition at line 100 of file system.cpp.
References BASIX_PREFIX, eval_system(), file_exists(), and get_env().
Referenced by dl_find(), load_path(), and sysconf_dir().
{ string dir= get_env ("MMX_PREFIX_DIR"); if (dir == "") dir= string (BASIX_PREFIX); if (!file_exists (dir)) dir= eval_system ("basix-config --prefix"); return dir; }
Definition at line 693 of file generic.cpp.
References current_ev.
{ return current_ev->apply ("'", x1); }
Definition at line 893 of file mmx_printer.cpp.
References concat(), GEN_BEGIN, is_C0(), is_func(), N(), and mmx_printer::pp_E0().
Referenced by as_mmx(), as_snippet(), as_texmacs_scheme(), and as_texmacs_snippet().
{ vector<generic> v; mmx_printer pp; if (is_func (g, GEN_BEGIN)) for (nat i=1; i<N(g); i++) v << pp.pp_C0 (g[i], i<N(g)-1); else if (is_C0 (g)) v << pp.pp_C0 (g); else v << pp.pp_E0 (g); return concat (v); }
Definition at line 487 of file syntactic.cpp.
References syn().
Referenced by mv_project_op::op(), project_helper< R >::op(), project_op::Project_type(), and mv_project_op::set_op().
{ return syn ("project", x, y); }
T promote | ( | const F & | x, |
const T & | y | ||
) | [inline] |
Definition at line 629 of file type_props.hpp.
Referenced by acosh(), asinh(), atan2(), atanh(), binpow(), clear(), common_part(), cosh(), invert(), is_exact_zero(), promote_scalar_helper< empty_format, F, T >::op(), promote_scalar_helper< FT, F, T >::op(), promote(), quo(), rem(), rounding_error(), set_infinity(), set_nan(), set_pi(), and sinh().
bool mmx::promote | ( | const F & | x, |
const bool & | |||
) | [inline] |
Definition at line 29 of file defaults.hpp.
{ return as<bool> (x); }
char mmx::promote | ( | const F & | x, |
const char & | |||
) | [inline] |
Definition at line 31 of file defaults.hpp.
{ return as<char> (x); }
signed char mmx::promote | ( | const F & | x, |
const signed char & | |||
) | [inline] |
Definition at line 33 of file defaults.hpp.
{ return as<signed char> (x); }
unsigned char mmx::promote | ( | const F & | x, |
const unsigned char & | |||
) | [inline] |
Definition at line 35 of file defaults.hpp.
{ return as<unsigned char> (x); }
int mmx::promote | ( | const F & | x, |
const int & | |||
) | [inline] |
Definition at line 37 of file defaults.hpp.
{ return as<int> (x); }
unsigned int mmx::promote | ( | const F & | x, |
const unsigned int & | |||
) | [inline] |
Definition at line 39 of file defaults.hpp.
{ return as<unsigned int> (x); }
long int mmx::promote | ( | const F & | x, |
const long int & | |||
) | [inline] |
Definition at line 41 of file defaults.hpp.
{ return as<long int> (x); }
unsigned long int mmx::promote | ( | const F & | x, |
const unsigned long int & | |||
) | [inline] |
Definition at line 43 of file defaults.hpp.
{
return as<unsigned long int> (x); }
long long int mmx::promote | ( | const F & | x, |
const long long int & | |||
) | [inline] |
Definition at line 46 of file defaults.hpp.
{ return as<long long int> (x); }
unsigned long long int mmx::promote | ( | const F & | x, |
const unsigned long long int & | |||
) | [inline] |
Definition at line 48 of file defaults.hpp.
{
return as<unsigned long long int> (x); }
float mmx::promote | ( | const F & | x, |
const float & | |||
) | [inline] |
Definition at line 51 of file defaults.hpp.
{ return as<float> (x); }
double mmx::promote | ( | const F & | x, |
const double & | |||
) | [inline] |
Definition at line 53 of file defaults.hpp.
{ return as<double> (x); }
T mmx::promote | ( | const F & | x, |
const format< T > & | fm | ||
) | [inline] |
Definition at line 636 of file type_props.hpp.
References get_sample(), and promote().
{ return promote (x, get_sample (fm)); }
scalar_type_helper< T >::val mmx::promote_scalar | ( | const F & | x, |
const T & | y | ||
) | [inline] |
Definition at line 477 of file type_props.hpp.
References T.
Referenced by zero_scalar().
{ return promote_scalar_helper<typename format<T>::FT,F,T>::op (x, y); }
Definition at line 191 of file heap.hpp.
Referenced by heap_iterator_rep< C >::advance(), binary_test(), operator>>(), unary_hash(), and binary_helper< heap< C > >::write().
{
h.secure(); return h.rep->Pull (); }
void push | ( | heap< C > & | h, |
const C & | x | ||
) | [inline] |
Definition at line 189 of file heap.hpp.
Referenced by binary_helper< heap< C > >::assemble(), operator<<(), and binary_helper< heap< C > >::read().
{ h.secure(); h.rep->Push (x); }
routine mmx::quaternary_routine | ( | const generic & | name, |
D(*)(const S1 &, const S2 &, const S3 &, const S4 &) | f | ||
) |
Definition at line 368 of file routine.hpp.
Referenced by define().
{ return new quaternary_routine_rep<D,S1,S2,S3,S4> (name, f); }
routine mmx::quintary_routine | ( | const generic & | name, |
D(*)(const S1 &, const S2 &, const S3 &, const S4 &, const S5 &) | f | ||
) |
Definition at line 429 of file routine.hpp.
Referenced by define().
{ return new quintary_routine_rep<D,S1,S2,S3,S4,S5> (name, f); }
signed char mmx::quo | ( | const signed char & | n, |
const signed char & | m | ||
) | [inline] |
long long int mmx::quo | ( | const long long int & | n, |
const long long int & | m | ||
) | [inline] |
unsigned short int mmx::quo | ( | const unsigned short int & | n, |
const unsigned short int & | m | ||
) | [inline] |
unsigned int mmx::quo | ( | const unsigned int & | n, |
const unsigned int & | m | ||
) | [inline] |
unsigned long int mmx::quo | ( | const unsigned long int & | n, |
const unsigned long int & | m | ||
) | [inline] |
unsigned long long int mmx::quo | ( | const unsigned long long int & | n, |
const unsigned long long int & | m | ||
) | [inline] |
unsigned char mmx::quo | ( | const unsigned char & | n, |
const unsigned char & | m | ||
) | [inline] |
Definition at line 1005 of file vector.hpp.
{
return binary_map<quo_op> (v, w); }
short int mmx::quo | ( | const short int & | n, |
const short int & | m | ||
) | [inline] |
long int mmx::quo | ( | const long int & | n, |
const long int & | m | ||
) | [inline] |
Definition at line 1029 of file vector.hpp.
{
return binary_map_scalar<rquo_op> (v, c); }
C mmx::quo | ( | const C & | x, |
const D & | y | ||
) | [inline] |
Definition at line 339 of file defaults.hpp.
References promote().
Referenced by quo_op::def(), GLUE_11(), rquo_op::op(), quo_op::op(), rquo_op::set_op(), quo_op::set_op(), and skew_quo().
Definition at line 708 of file generic.cpp.
References current_ev, and GEN_DIV.
{ return current_ev->apply (GEN_DIV, x1, x2); }
Add " around s.
Definition at line 483 of file string.cpp.
References escape().
Referenced by as_lisp(), input_output_string_port_rep::expression(), input_string_port_rep::expression(), output_string_port_rep::expression(), error_port_rep::expression(), flatten(), GLUE_19(), and texmacs_to_scheme().
{ return "\"" * escape (s) * "\""; }
Definition at line 435 of file syntactic.cpp.
References GEN_RADIUS, and syn().
{ return syn (GEN_RADIUS, g1); }
Definition at line 1160 of file vector.hpp.
{
return unary_map<radius_op> (v); }
Definition at line 822 of file generic.cpp.
References current_ev.
Referenced by radius_op::Radius_type(), and radius_op::set_op().
{ return current_ev->apply ("radius", x1); }
unary_return_type_helper<abs_op, C >::RET mmx::radius | ( | const C & | x | ) | [inline] |
Definition at line 890 of file type_props.hpp.
{ return 0; }
Definition at line 335 of file chain.hpp.
References ASSERT, C, Chain, is_nil(), left(), middle(), N(), n, and right().
Referenced by cDr(), cdr(), detach(), GLUE_7(), GLUE_8(), range(), and store_interactive_number().
{ if (start >= end) return Chain (); ASSERT (!is_nil (c), "non-empty chain expected"); nat n= N (left (c)); if (end <= n) return range (left (c), start, end); if (start > n) return range (right (c), start-n-1, end-n-1); Chain l= range (left (c), start, n); C m= middle (c); Chain r= range (right (c), 0, end-n-1); if (N(l) < 2*(N(r) + 1) && N(r) < 2*(N(l) + 1)) return Chain (l, m, r); return l * Chain (m) * r; }
Definition at line 24 of file generic_utils.cpp.
References compound_to_vector(), range(), and vector_to_compound().
{ return vector_to_compound (range (compound_to_vector (g), start, end)); }
iterator<C> mmx::range_iterator | ( | const C & | start, |
const C & | end, | ||
const C & | step = C(1) , |
||
bool | strict = true |
||
) |
Definition at line 352 of file iterator.hpp.
References Iterator.
{ return Iterator (new range_iterator_rep<C> (start, end, step, strict)); }
void mmx::raw_read | ( | M & | m, |
const char * | p, | ||
nat | n | ||
) |
Definition at line 798 of file type_props.hpp.
References busy(), n, and VERIFY.
Referenced by raw_read_length().
void mmx::raw_read_length | ( | M & | m, |
nat & | l | ||
) |
Definition at line 815 of file type_props.hpp.
References raw_read().
void mmx::raw_write | ( | M & | m, |
const char * | p, | ||
nat | n | ||
) |
void mmx::raw_write_length | ( | M & | m, |
nat | l | ||
) |
Definition at line 806 of file type_props.hpp.
References raw_write().
Definition at line 733 of file generic.cpp.
References current_ev, and GEN_RE.
{ return current_ev->apply (GEN_RE, x1); }
C mmx::Re | ( | const C & | x | ) | [inline] |
Definition at line 712 of file defaults.hpp.
Referenced by Re_op::op(), Re_op::Real_type(), and Re_op::set_op().
{ return x; }
Definition at line 1154 of file vector.hpp.
{ return unary_map<Re_op> (v); }
Definition at line 206 of file vector.hpp.
{ return v[i]; }
The same as l[i].
Definition at line 157 of file list.hpp.
Referenced by inspector< compound >::access(), alias_getter(), alias_setter(), alias_specializer(), alias_type_info(), binary_read_generic(), composed_routine_rep::composed_routine_rep(), alias_binary_access_rep< C, R, A, B >::get(), alias_unary_access_rep< C, R, A >::get(), get_file_source(), GLUE_17(), operator>>(), binary_helper< string >::read(), binary_helper< bool >::read(), binary_helper< chain< C > >::read(), source_locate(), tuple_type_info(), and unary_set().
{ return l[i]; }
void mmx::read | ( | const port & | p, |
char * | s, | ||
nat | n | ||
) | [inline] |
string mmx::read | ( | const port & | p, |
nat | n | ||
) | [inline] |
The same as car.
Definition at line 142 of file list.hpp.
References car().
Referenced by binary_test(), table_iterator_rep< C, T, V >::current(), entries_iterator_rep< C, T, V >::current(), list_iterator_rep< C >::current(), memoizer< V >::end(), flatten(), list_apply(), restore_evaluator(), reverse(), and unary_hash().
{ return car (l); }
The same as cdr.
Definition at line 147 of file list.hpp.
References cdr().
Referenced by table_iterator_rep< C, T, V >::advance(), entries_iterator_rep< C, T, V >::advance(), list_iterator_rep< C >::advance(), binary_test(), memoizer< V >::end(), flatten(), list_apply(), restore_evaluator(), reverse(), and unary_hash().
{ return cdr (l); }
Definition at line 213 of file table.hpp.
Referenced by REP_STRUCT_2(), and unary_set().
{
t->lazy_initialize ();
return *t->init;
}
const C& mmx::read_only | ( | const C & | c | ) | [inline] |
Definition at line 758 of file defaults.hpp.
Referenced by list< cleaner >::operator[]().
{
return c;
}
Definition at line 501 of file string.cpp.
References N().
Referenced by replace(), search_backwards(), and search_forwards().
Definition at line 20 of file glue_vector_map.cpp.
References apply(), eval(), is_a_scalar(), and vector< C, V >::scalar().
Definition at line 30 of file glue_list_map.cpp.
References apply(), and eval().
Referenced by list_append_several(), list_map(), vector_append_several(), and vector_map().
Reconstruct string from pieces in using as a separator.
Definition at line 562 of file string.cpp.
Referenced by add_indentation(), get_file_source(), and get_interactive_source().
void mmx::register_glue | ( | const string & | s, |
void(*)() | f | ||
) |
Definition at line 113 of file glue.cpp.
References glue_table, and inside_set().
{ inside_set (glue_table (), s, f); }
void mmx::register_glue | ( | const string & | , |
void(*)(void) | |||
) |
Referenced by glue_basix(), glue_list_map(), and glue_vector_map().
Definition at line 278 of file system.cpp.
References canonical_name(), and N().
Referenced by resolve_name().
{ string file_name= name; if (base != "" && file_name != "" && file_name[0] != '/') { int i; for (i= N(base)-1; i>=0; i--) if (base[i] == '/') break; file_name= base (0, i+1) * file_name; } return canonical_name (file_name); }
unsigned long long int mmx::rem | ( | const unsigned long long int & | n, |
const unsigned long long int & | m, | ||
unsigned long long int & | q | ||
) | [inline] |
short int mmx::rem | ( | const short int & | n, |
const short int & | m, | ||
short int & | q | ||
) | [inline] |
long int mmx::rem | ( | const long int & | n, |
const long int & | m, | ||
long int & | q | ||
) | [inline] |
C mmx::rem | ( | const C & | x, |
const D & | y | ||
) | [inline] |
Definition at line 342 of file defaults.hpp.
References promote().
Referenced by GLUE_12(), rrem_op::op(), rem_op::op(), rrem_op::set_op(), rem_op::set_op(), and skew_rem().
long long int mmx::rem | ( | const long long int & | n, |
const long long int & | m | ||
) | [inline] |
signed char mmx::rem | ( | const signed char & | n, |
const signed char & | m | ||
) | [inline] |
long long int mmx::rem | ( | const long long int & | n, |
const long long int & | m, | ||
long long int & | q | ||
) | [inline] |
unsigned short int mmx::rem | ( | const unsigned short int & | n, |
const unsigned short int & | m, | ||
unsigned short int & | q | ||
) | [inline] |
unsigned long int mmx::rem | ( | const unsigned long int & | n, |
const unsigned long int & | m | ||
) | [inline] |
unsigned long int mmx::rem | ( | const unsigned long int & | n, |
const unsigned long int & | m, | ||
unsigned long int & | q | ||
) | [inline] |
unsigned char mmx::rem | ( | const unsigned char & | n, |
const unsigned char & | m | ||
) | [inline] |
signed char mmx::rem | ( | const signed char & | n, |
const signed char & | m, | ||
signed char & | q | ||
) | [inline] |
Definition at line 1031 of file vector.hpp.
{
return binary_map_scalar<rrem_op> (v, c); }
unsigned int mmx::rem | ( | const unsigned int & | n, |
const unsigned int & | m | ||
) | [inline] |
unsigned long long int mmx::rem | ( | const unsigned long long int & | n, |
const unsigned long long int & | m | ||
) | [inline] |
unsigned char mmx::rem | ( | const unsigned char & | n, |
const unsigned char & | m, | ||
unsigned char & | q | ||
) | [inline] |
short int mmx::rem | ( | const short int & | n, |
const short int & | m | ||
) | [inline] |
unsigned int mmx::rem | ( | const unsigned int & | n, |
const unsigned int & | m, | ||
unsigned int & | q | ||
) | [inline] |
long int mmx::rem | ( | const long int & | n, |
const long int & | m | ||
) | [inline] |
unsigned short int mmx::rem | ( | const unsigned short int & | n, |
const unsigned short int & | m | ||
) | [inline] |
Definition at line 1007 of file vector.hpp.
{
return binary_map<rem_op> (v, w); }
int mmx::rem | ( | const int & | n, |
const int & | m, | ||
int & | q | ||
) | [inline] |
Definition at line 710 of file generic.cpp.
References current_ev, and GEN_MOD.
{ return current_ev->apply (GEN_MOD, x1, x2); }
class vector_rep< C, vector_fixed< V, S > > mmx::REP_STRUCT_1 | ( | C | ) |
Definition at line 318 of file vector.hpp.
References C, Format, FVector, is_a_scalar(), is_non_scalar(), LESSGTR, N(), n, seg(), val, Vector, and VERIFY.
{ C* a; public: /* inline vector_rep (C* a2, nat n, bool dummy): a (a2) { VERIFY (n == S::val, "wrong size"); (void) n; (void) dummy; } inline vector_rep (C* a2, nat n, nat l, bool dummy): a (a2) { VERIFY (n == S::val, "wrong size"); VERIFY ((l == aligned_size<C,V> (S::val)), "wrong allocated size"); (void) n; (void) l; (void) dummy; } */ inline vector_rep (C* a2, nat n, bool dummy, const Format& fm): Format (fm), a (a2) { VERIFY (n == S::val, "wrong size"); (void) n; (void) dummy; } inline vector_rep (C* a2, nat n, nat l, bool dummy, const Format& fm): Format (fm), a (a2) { VERIFY (n == S::val, "wrong size"); VERIFY ((l == aligned_size<C,V> (S::val)), "wrong allocated size"); (void) n; (void) l; (void) dummy; } inline virtual ~vector_rep () { mmx_delete<C> (a, aligned_size<C,V> (S::val)); } friend class FVector; friend nat N LESSGTR (const FVector& v); friend C* seg LESSGTR (FVector& v); friend const C* seg LESSGTR (const FVector& v); friend bool is_a_scalar LESSGTR (const Vector& v); friend bool is_non_scalar LESSGTR (const Vector& v); };
class vector_rep mmx::REP_STRUCT_1 | ( | C | ) |
Definition at line 46 of file vector.hpp.
References C, copy(), Format, is_a_scalar(), is_non_scalar(), LESSGTR, max(), min(), N(), n, seg(), and Vector.
{ public: typedef implementation<vector_linear,V> Vec; private: C* a; // entries of vector nat n; // dimension of vector nat l; // allocated number of entries bool scalar_flag; // is the vector a scalar value? public: inline vector_rep (C* a2, nat n2, bool flag, const Format& fm): Format (fm), a (a2), n (n2), l (n2), scalar_flag (flag) {} inline vector_rep (C* a2, nat n2, nat l2, bool flag, const Format& fm): Format (fm), a (a2), n (n2), l (l2), scalar_flag (flag) {} inline ~vector_rep () { mmx_delete<C> (a, l); } void resize (nat n2) { nat l2; if (n2 > l) l2= aligned_size<C,V> (max (n2, l<<1)); else if (n2 < (l >> 1)) l2= aligned_size<C,V> (n2); else { n= n2; return; } C* b= mmx_new<C> (l2); Vec::copy (b, a, min (n, n2)); mmx_delete<C> (a, l); a= b; n= n2; l= l2; } friend class Vector; friend nat N LESSGTR (const Vector& v); friend C* seg LESSGTR (Vector& v); friend const C* seg LESSGTR (const Vector& v); friend bool is_a_scalar LESSGTR (const Vector& v); friend bool is_non_scalar LESSGTR (const Vector& v); };
class iterator_rep mmx::REP_STRUCT_1 | ( | C | ) |
Definition at line 38 of file iterator.hpp.
References busy(), C, copy(), done(), ERROR, exact_hash(), Format, hash(), init(), Iterator, Iterator_rep, and LESSGTR.
{ protected: virtual bool is_busy () = 0; virtual bool is_done () { return !is_busy (); } virtual bool is_init () { ERROR ("not implemented (is_init)"); return false; } virtual void advance () = 0; virtual void regress () { ERROR ("not implemented (regress)"); } virtual C current () = 0; virtual Iterator_rep* clone () { ERROR ("not implemented (clone)"); return NULL; } public: inline iterator_rep () {} inline iterator_rep (const Format& fm): Format (fm) {} virtual ~iterator_rep () {} friend class Iterator; friend bool busy LESSGTR (const Iterator& it); friend bool done LESSGTR (const Iterator& it); friend bool init LESSGTR (const Iterator& it); friend nat hash LESSGTR (const Iterator& it); friend nat exact_hash LESSGTR (const Iterator& it); friend Iterator copy LESSGTR (const Iterator& it); };
class table_rep mmx::REP_STRUCT_2 | ( | C | , |
T | |||
) |
Definition at line 64 of file table.hpp.
References C, contains(), Format1, Format2, get_format(), I(), init(), LESSGTR, mmx_new(), N(), n, read_I(), reset(), simplify(), size(), T, Table, and Table_rep.
{ nat size; // size of table (nr of entries) nat n; // nr of keys (a power of two) C* init; // default entry list<pair<T,C> >* a; // the array of entries public: Table_rep (nat n2, const Format1& fm1, const Format2& fm2): encapsulate1<Format1 > (fm1), encapsulate2<Format2 > (fm2), size (0), n (n2), init (NULL), a (mmx_new<list<pair<T,C> > > (n)) { //mmout << "[+init=" << init << "," << this //<< "]" << flush_now; } Table_rep (const C& init2, nat n2, const Format2& fm2): encapsulate1<Format1 > (get_format (init2)), encapsulate2<Format2 > (fm2), size (0), n (n2), init (mmx_new_one<C> (init2)), a (mmx_new<list<pair<T,C> > > (n)) { //mmout << "[+init=" << init << "," << this //<< ";" << ((int*) ((void*) init))[-1] //<< "]" << flush_now; } ~Table_rep () { //mmout << "[-init=" << init << "," << this; //if (init != NULL) //mmout << ";" << ((int*) ((void*) init))[-1]; //mmout << "]" << flush_now; if (init != NULL) mmx_delete_one<C> (init); mmx_delete<list<pair<T,C> > > (a, n); } inline void lazy_initialize () const { if (init == NULL) { *((C**) ((void*) &init))= mmx_new_one<C> (); //mmout << "[:init=" << init << "," << this //<< ";" << ((int*) ((void*) init))[-1] //<< "]" << flush_now; } } void resize (nat n); void reset (const T& x); bool contains (const T& x) const; bool get (const T& x, C& y) const; const C& get (const T& x) const; C& set (const T& x); void simplify (); double complexity () const; friend class Table; friend class entries_iterator_rep<C,T,V>; friend class table_iterator_rep<C,T,V>; friend C& I LESSGTR (Table& t); friend const C& I LESSGTR (const Table& t); friend const C& read_I LESSGTR (const Table& t); friend nat N LESSGTR (const Table& t); friend bool operator == LESSGTR (const Table& t1, const Table& t2); };
Definition at line 576 of file string.cpp.
References n.
Referenced by add_indentation(), and source_string_unindented().
Definition at line 359 of file mmx_texmacs.cpp.
References ERROR, gen(), is_func(), mmout, N(), and type_name().
Referenced by as_snippet(), as_texmacs_scheme(), and as_texmacs_snippet().
{ if (is<literal> (g)) return g; else if (is_func (g, "$concat")) { bool block= false; vector<generic> d; vector<generic> c; for (nat i=1; i<N(g); i++) { if (is_func (g[i], "$lf", 0)) { if (N(c) == 0) d << generic (""); else if (N(c) == 1) d << c; else if (N(c) > 1) d << gen ("$concat", c); c= vector<generic> (); } else if (is_func (g[i], "$cr", 0)) block= true; else c << replace_lf (g[i]); } if (N(c) == 1) d << c; else if (N(c) != 0) d << gen ("$concat", c); if (N(d) != 1 || block) return gen ("$document", d); return d[0]; } else if (is<compound> (g)) { vector<generic> v; for (nat i=1; i<N(g); i++) v << replace_lf (g[i]); return gen (g[0], v); } else { mmout << "g= " << g << ": " << type_name (g) << "\n"; ERROR ("TeXmacs document expected"); } }
void mmx::reset | ( | table< C, T, V > & | t, |
const K & | x | ||
) | [inline] |
Definition at line 164 of file table.hpp.
References inside().
Referenced by alias_reset(), REP_STRUCT_2(), reset(), source_delete(), unary_set(), and posix_port_rep::~posix_port_rep().
void mmx::reset | ( | table< C, T, V > & | t, |
const T & | x | ||
) | [inline] |
Definition at line 290 of file system.cpp.
References canonical_name(), file_exists(), get_directory(), N(), path_name(), and relative_name().
{ //mmout << "Resolve " << base << ", " << name << "\n"; string r= relative_name (base, name); if (file_exists (r)) return r; if (get_directory (name) != ".") { r= relative_name (canonical_name (base * "/.."), name); if (file_exists (r)) return r; } r= path_name ("$MMX_LOAD_PATH", name); if (r != "") return r; nat i; for (i=0; i<N(name); i++) if (name[i] == '/') break; if (i == N(name)) return ""; string d= name (0, i); string f= name (i+1, N(name)); r= path_name ("$MMX_LOAD_PATH", d * "/mmx/" * f); if (r != "") return r; r= path_name ("$MMX_LOAD_PATH", d * "/glue/" * f); if (r != "") return r; return ""; }
void restore_evaluator | ( | ) |
Definition at line 79 of file evaluator.cpp.
References ASSERT, current_ev, is_nil(), read_car(), read_cdr(), and stack_ev.
{ //assert (!ev_lock); //ev_lock= true; //{ ASSERT (!is_nil (stack_ev), "empty evaluator stack"); /* if (N(stack_ev) < 6) mmout << "[" << N (stack_ev)-1 << ":" << inside (current_ev) << "-" << inside (car (stack_ev)) << "]" << flush_now; */ evaluator aux_ev= current_ev; // only destroy current_ev on exit current_ev= read_car (stack_ev); stack_ev = read_cdr (stack_ev); //} //ev_lock= false; }
observer mmx::result_observer | ( | dynamic_rep * | arg, |
const updater & | u | ||
) |
Definition at line 169 of file dynamic.cpp.
References observer.
{ return observer (new result_observer_rep (arg, u)); }
Definition at line 201 of file chain.hpp.
References Chain, is_nil(), left(), middle(), and right().
Referenced by GLUE_8(), GLUE_9(), reverse_op::op(), and reverse_op::set_op().
Definition at line 678 of file vector.hpp.
References C, CF(), is_a_scalar(), N(), n, seg(), and Vector.
Definition at line 133 of file chain.hpp.
Referenced by balance_left(), balance_right(), binary_test(), cAr(), cDr(), cdr(), copy(), binary_helper< chain< C > >::disassemble(), iterate(), map(), operator*(), range(), reverse(), shift_left(), shift_right(), unary_hash(), and binary_helper< chain< C > >::write_bis().
{ return c.rep->r; }
double round | ( | const double & | x | ) | [inline] |
Definition at line 128 of file double.hpp.
References floor().
Referenced by round_op::op(), and round_op::set_op().
{ return std::floor (x + 0.5); }
Definition at line 754 of file generic.cpp.
References current_ev, and GEN_ROUND.
{ return current_ev->apply (GEN_ROUND, x); }
double rounding_error | ( | const double & | x | ) | [inline] |
Definition at line 85 of file double.hpp.
References abs().
Referenced by rounding_error_op::Abs_type(), additive_error(), elementary_error(), GLUE_45(), multiplicative_error(), and rounding_error_op::set_op().
{ return ldexp (abs (x), -50) + __DBL_MIN__; }
Definition at line 771 of file generic.cpp.
References current_ev, and GEN_ROUNDING_ERROR.
{ return current_ev->apply (GEN_ROUNDING_ERROR, x); }
unary_return_type_helper<abs_op, C >::RET mmx::rounding_error | ( | const C & | x | ) | [inline] |
Definition at line 843 of file generic.cpp.
References current_ev.
{ return current_ev->apply ("rres", x1, x2); }
void mmx::rshift2 | ( | C & | x, |
const C & | y, | ||
const S & | z | ||
) | [inline] |
Definition at line 373 of file defaults.hpp.
{ x= y >> z; }
C mmx::rshift2 | ( | const C & | x, |
const S & | y | ||
) | [inline] |
Definition at line 367 of file defaults.hpp.
Referenced by rshift2_op::op(), and rshift2_op::set_op().
{ return x >> y; }
C mmx::rshift2 | ( | const C & | x | ) | [inline] |
Definition at line 369 of file defaults.hpp.
{ return rshift2<C,int> (x, 1); }
void mmx::rshift2_assign | ( | C & | x, |
const S & | y | ||
) | [inline] |
Definition at line 835 of file generic.cpp.
References current_ev.
{ return current_ev->apply ("rshiftz", x1, x2); }
void mmx::rshiftz | ( | C & | x, |
const C & | y, | ||
const S & | z | ||
) | [inline] |
C mmx::rshiftz | ( | const C & | x, |
const S & | y | ||
) | [inline] |
Definition at line 384 of file defaults.hpp.
References lshiftz().
Referenced by sqrt_op::def(), quo_op::def(), div_op::def(), invert_op::def(), rshiftz_op::op(), and rshiftz_op::set_op().
{ return lshiftz (x, -y); }
C mmx::rshiftz | ( | const C & | x | ) | [inline] |
Definition at line 386 of file defaults.hpp.
{ return rshiftz<C,int> (x, 1); }
void mmx::rshiftz_assign | ( | C & | x, |
const S & | y = 1 |
||
) | [inline] |
Definition at line 388 of file defaults.hpp.
References lshiftz_assign().
Referenced by rshiftz_op::set_op().
{ lshiftz_assign (x, -y); }
void mmx::safe_free | ( | register void * | ptr | ) | [inline] |
Definition at line 126 of file fast_new.hpp.
{ //printf ("Free : %p, %p\n", ptr, // *((void**) ((void*) (((char*) ptr) - sizeof (void*))))); free (*((void**) ((void*) (((char*) ptr) - sizeof (void*))))); }
void* mmx::safe_malloc | ( | register size_t | sz | ) |
bool mmx::same_type | ( | const generic & | x1, |
const generic & | x2 | ||
) | [inline] |
Definition at line 184 of file generic.hpp.
Referenced by convert(), exact_eq(), and operator==().
{
return x1->same_type (x2); }
Definition at line 467 of file system.cpp.
References decode_name(), error_flag(), output_file_port(), and s.
{ string file_name= decode_name (orig_file_name); port f= output_file_port (file_name); if (error_flag (f)) return true; f << s; return false; }
Definition at line 196 of file alias.hpp.
References alias_type_info().
Referenced by object_alias(), and object_specialize_alias().
{ int mode= 1; alias_type_info (id, mode); return id; }
Definition at line 519 of file mmx_texmacs.cpp.
References cdr(), compound_to_vector(), ends(), ERROR, is_func(), literal_to_string(), n, N(), spaces(), unquote(), and write().
Referenced by flatten_as_tm().
{ //mmout << "Converting " << g << "\n"; if (is<literal> (g)) write (s, unquote (literal_to_string (g))); else if (is_func (g, "concat")) { for (nat i=1; i<N(g); i++) scheme_to_tm (s, g[i], indent); } else if (is_func (g, "document")) { for (nat i=1; i<N(g); i++) { if (i>1) { if (ends (s, "\n")) s << "\\;"; s << "\n\n" << spaces (indent); } scheme_to_tm (s, g[i], indent); } } else if (is<compound> (g) && N(g) > 0 && is<literal> (g[0])) { string func= literal_to_string (g[0]); vector<generic> args= cdr (compound_to_vector (g)); int i, last, n=N(args); for (i=n-1; i>=0; i--) if (is_func (args[i], "document")) break; last= i; if (last >= 0) { for (i=0; i<=n; i++) { bool flag= (i<n) && is_func (args[i], "document"); if (i==0) s << "<\\" << func; else if (i==last+1) s << "</" << func; else if (is_func (args[i-1], "document")) s << "<|" << func; if (i==n) { s << ">"; break; } if (flag) { s << ">"; if (!ends (s, "\n")) s << "\n" << spaces (indent + 2); scheme_to_tm (s, args[i], indent + 2); if (!ends (s, "\n")) s << "\n" << spaces (indent); } else { s << "|"; scheme_to_tm (s, args[i], indent); } } } else { s << "<" << func; for (i=0; i<n; i++) { s << "|"; scheme_to_tm (s, args[i], indent); } s << ">"; } } else ERROR ("invalid scheme markup"); }
C2 mmx::second | ( | const triple< C1, C2, C3 > & | t | ) | [inline] |
Definition at line 41 of file triple.hpp.
{ return t.x2; }
C2 mmx::second | ( | const pair< C1, C2 > & | p | ) | [inline] |
Definition at line 207 of file vector.hpp.
{ return v->a; }
Definition at line 208 of file vector.hpp.
References is_non_scalar(), and VERIFY.
Referenced by append(), binary_map(), binary_map_scalar(), binary_test(), binary_test_scalar(), cons(), dot(), insert(), inside_append(), nullary_set(), vector< C, V >::operator<<(), range(), REP_STRUCT_1(), reverse(), unary_map(), unary_set(), unary_set_scalar(), and vector< observer >::vector().
{ VERIFY (is_non_scalar (v), "non-scalar vector expected"); v.secure(); return v->a; }
void select_evaluator | ( | const evaluator & | ev | ) |
Definition at line 61 of file evaluator.cpp.
References cons(), current_ev, and stack_ev.
{ //assert (!ev_lock); //ev_lock= true; //{ /* if (N(stack_ev) < 6) mmout << "[" << N (stack_ev) << ":" << inside (current_ev) << "+" << inside (ev) << "]" << flush_now; */ stack_ev = cons (current_ev, stack_ev); current_ev= ev; //} //ev_lock= false; }
Definition at line 304 of file iterator.hpp.
References C, get_format(), and Iterator.
{ C* a= mmx_new<C> (5); a[0]= c1; a[1]= c2; a[2]= c3; a[3]= c4; a[4]= c5; return Iterator (new finite_iterator_rep<C> (a, 5, get_format (c1))); }
Definition at line 288 of file iterator.hpp.
References C, get_format(), and Iterator.
{ C* a= mmx_new<C> (3); a[0]= c1; a[1]= c2; a[2]= c3; return Iterator (new finite_iterator_rep<C> (a, 3, get_format (c1))); }
Definition at line 281 of file iterator.hpp.
References C, get_format(), and Iterator.
{ C* a= mmx_new<C> (2); a[0]= c1; a[1]= c2; return Iterator (new finite_iterator_rep<C> (a, 2, get_format (c1))); }
iterator<C> mmx::seq | ( | const C & | c1, |
const C & | c2, | ||
const C & | c3, | ||
const C & | c4, | ||
const C & | c5, | ||
const C & | c6 | ||
) |
Definition at line 313 of file iterator.hpp.
References C, get_format(), and Iterator.
{ C* a= mmx_new<C> (6); a[0]= c1; a[1]= c2; a[2]= c3; a[3]= c4; a[4]= c5; a[5]= c6; return Iterator (new finite_iterator_rep<C> (a, 6, get_format (c1))); }
Definition at line 274 of file iterator.hpp.
References C, get_format(), and Iterator.
{ C* a= mmx_new<C> (1); a[0]= c1; return Iterator (new finite_iterator_rep<C> (a, 1, get_format (c1))); }
Definition at line 295 of file iterator.hpp.
References C, get_format(), and Iterator.
{ C* a= mmx_new<C> (4); a[0]= c1; a[1]= c2; a[2]= c3; a[3]= c4; return Iterator (new finite_iterator_rep<C> (a, 4, get_format (c1))); }
Definition at line 172 of file mmx_printer.cpp.
References as_string(), contains(), GEN_MINUS, GEN_PLUS, INDENT, is_func(), LF, literal_to_string(), mmx_symbol_table(), N(), starts(), texmacs_expand(), UNINDENT, and VARINDENT.
Referenced by as_mmx(), and serialize().
{ if (is<literal> (g)) { static table<generic,generic> t= mmx_symbol_table (); if (contains (t, g)) s << literal_to_string (t[g]); else if (g == "$spc") s << " "; else if (g == "$lf") s << LF; else if (g == "$cr"); else s << literal_to_string (g); } else if (is_func (g, "$concat") || is_func (g, "$bracket") || is_func (g, "$prefix") || is_func (g, "$postfix")) for (nat i=1; i<N(g); i++) serialize (s, g[i]); else if (is_func (g, "$infix", 3)) { serialize (s, g[1]); if (g[2] != "^" && g[2] != "^^") s << " "; serialize (s, g[2]); if (g[2] != "^" && g[2] != "^^") s << " "; serialize (s, g[3]); } else if (is_func (g, "$bigop") && N(g) >= 3) { if (g[1] == GEN_PLUS && is_func (g[2], GEN_MINUS, 1)) { s << "-"; serialize (s, g[2][1]); } else serialize (s, g[2]); for (nat i=3; i<N(g); i++) { if (g[1] == GEN_PLUS && is_func (g[i], GEN_MINUS, 1)) { s << " " << "-" << " "; serialize (s, g[i][1]); } else { s << " "; serialize (s, g[1]); s << " "; serialize (s, g[i]); } } } else if (is_func (g, "$keyword", 1)) serialize (s, g[1]); else if (is_func (g, "$operate", 2) || is_func (g, "$keyword", 2)) { serialize (s, g[1]); s << " "; serialize (s, g[2]); } else if (is_func (g, "$hlist") || is_func (g, "$vlist")) { if (N(g) == 1) return; serialize (s, g[1]); for (nat i=2; i<N(g); i++) { if (g[0] == "$hlist") s << ", "; else s << "; "; serialize (s, g[i]); } } else if (is_func (g, "$indent")) { s << INDENT; for (nat i=1; i<N(g); i++) serialize (s, g[i]); s << UNINDENT; } else if (is_func (g, "$varindent")) { serialize (s, g[1]); s << VARINDENT; for (nat i=2; i<N(g); i++) serialize (s, g[i]); s << UNINDENT; } else if (is_func (g, "$text", 1)) serialize (s, g[1]); else if (is_func (g, "$math", 1)) serialize (s, g[1]); else if (is_func (g, "$dynamic", 2)) { s << "< "; serialize (s, g[1]); s << " | "; serialize (s, g[2]); s << " >"; } else if (is<compound> (g) && is<literal> (g[0]) && starts (as_string (as<literal> (g[0])), "tm$")) { generic h= texmacs_expand (g); serialize (s, h); } else { serialize (s, g[0]); s << " ("; for (nat i=1; i<N(g); i++) { if (i != 1) s << ", "; serialize (s, g[i]); } s << ")"; } }
Definition at line 272 of file mmx_printer.cpp.
References s, and serialize().
void set_accuracy | ( | double & | x | ) | [inline] |
Definition at line 33 of file double.hpp.
Referenced by accuracy_cst(), and accuracy_as_op::set_op().
{ x= __DBL_EPSILON__; }
void mmx::set_accuracy | ( | vector< C, V > & | v | ) |
Definition at line 961 of file vector.hpp.
{ nullary_set<accuracy_as_op> (v); }
void set_accuracy | ( | generic & | x | ) |
void set_accuracy | ( | syntactic & | x | ) |
Definition at line 103 of file syntactic.cpp.
References as_syntactic(), and GEN_ACCURACY.
{ x= as_syntactic (GEN_ACCURACY); }
Definition at line 89 of file alias.cpp.
References alias_setter(), type(), and val.
{ routine r; alias_setter (type (a), r); return r->apply (a, val); }
Definition at line 59 of file alias.hpp.
Referenced by object_set_alias(), and set_genalias().
{
a->open ()= c; a->close (); return c; }
void mmx::set_as | ( | generic & | r, |
const C & | x | ||
) | [inline] |
Definition at line 563 of file generic.hpp.
Referenced by implementation< vector_linear, V, vector_naive >::clear(), promote(), set_as(), set_false(), set_one(), as_op::set_op(), set_true(), set_zero(), and vector< observer >::vector().
{
r= new generic_concrete_rep<C> (x);
}
void mmx::set_as | ( | vector< C, V > & | r, |
const T & | x | ||
) | [inline] |
Definition at line 221 of file iterator.hpp.
References CF().
{ r= iterator<T> (new as_iterator_rep<T,F> (x, CF(r))); }
void mmx::set_as | ( | generic & | r, |
const generic & | x | ||
) | [inline] |
Definition at line 573 of file generic.hpp.
{ r= x; }
void mmx::set_as | ( | C & | r, |
const generic & | x | ||
) | [inline] |
Definition at line 568 of file generic.hpp.
{ r= ((generic_concrete_rep<C>*) inspect(x)) -> rep; }
void mmx::set_as | ( | list< C > & | r, |
const T & | x | ||
) | [inline] |
void mmx::set_as | ( | T & | r, |
const F & | x | ||
) | [inline] |
Definition at line 624 of file type_props.hpp.
{ r= as_helper<T,F>::cv (x); }
void set_catalan | ( | generic & | x | ) |
Definition at line 254 of file generic.cpp.
References GEN_CATALAN.
Referenced by catalan_cst(), and catalan_as_op::set_op().
{ x= GEN_CATALAN; }
void set_catalan | ( | syntactic & | x | ) |
Definition at line 107 of file syntactic.cpp.
References as_syntactic(), and GEN_CATALAN.
{ x= as_syntactic (GEN_CATALAN); }
void mmx::set_catalan | ( | vector< C, V > & | v | ) |
Definition at line 955 of file vector.hpp.
{ nullary_set<catalan_as_op> (v); }
void set_euler | ( | syntactic & | x | ) |
Definition at line 106 of file syntactic.cpp.
References as_syntactic(), and GEN_EULER.
{ x= as_syntactic (GEN_EULER); }
void set_euler | ( | double & | x | ) | [inline] |
Definition at line 36 of file double.hpp.
Referenced by euler_cst(), and euler_as_op::set_op().
{ x= 0.5772156649015328606065120900824024L; }
void set_euler | ( | generic & | x | ) |
void mmx::set_euler | ( | vector< C, V > & | v | ) |
Definition at line 954 of file vector.hpp.
{ nullary_set<euler_as_op> (v); }
void mmx::set_false | ( | T & | x | ) | [inline] |
Definition at line 725 of file type_props.hpp.
References set_as().
Referenced by or_is_nan_op::set_neutral(), or_is_fuzz_op::set_neutral(), or_is_infinite_op::set_neutral(), and or_op::set_neutral().
{ set_as (x, false); }
bool set_frac_flag | ( | bool | new_val | ) |
Definition at line 244 of file syntactic.cpp.
References frac_flag.
Referenced by ordered_product().
void set_fuzz | ( | syntactic & | x | ) |
Definition at line 110 of file syntactic.cpp.
References as_syntactic(), and GEN_FUZZ.
{ x= as_syntactic (GEN_FUZZ); }
void set_fuzz | ( | generic & | x | ) |
void mmx::set_fuzz | ( | vector< C, V > & | v | ) |
Definition at line 958 of file vector.hpp.
{ nullary_set<fuzz_as_op> (v); }
void set_fuzz | ( | double & | x | ) | [inline] |
Definition at line 30 of file double.hpp.
Referenced by fuzz_cst(), and fuzz_as_op::set_op().
{ x= 0.0; }
generic mmx::set_genalias | ( | const generic_alias< C > & | a, |
const generic & | c | ||
) | [inline] |
Definition at line 136 of file alias.hpp.
References set_alias().
Referenced by WRAP_WRAPPED_IMPL().
{ return set_alias (*a, c); }
void set_imaginary | ( | generic & | x | ) |
Definition at line 255 of file generic.cpp.
References GEN_I.
Referenced by imaginary_cst(), and imaginary_as_op::set_op().
{ x= GEN_I; }
void set_imaginary | ( | syntactic & | x | ) |
Definition at line 108 of file syntactic.cpp.
References as_syntactic(), and GEN_I.
{ x= as_syntactic (GEN_I); }
void mmx::set_imaginary | ( | vector< C, V > & | v | ) |
Definition at line 956 of file vector.hpp.
{ nullary_set<imaginary_as_op> (v); }
void set_infinity | ( | syntactic & | x | ) |
Definition at line 111 of file syntactic.cpp.
References as_syntactic(), and GEN_INFINITY.
{ x= as_syntactic (GEN_INFINITY); }
void set_infinity | ( | generic & | x | ) |
void set_infinity | ( | double & | x | ) | [inline] |
Definition at line 29 of file double.hpp.
Referenced by infinity_cst(), and infinity_as_op::set_op().
{ x= HUGE_VAL; }
void mmx::set_infinity | ( | T & | x | ) | [inline] |
Definition at line 731 of file type_props.hpp.
References promote(), and times_infinity().
{ x= times_infinity (promote (1, x)); }
void mmx::set_infinity | ( | vector< C, V > & | v | ) |
Definition at line 962 of file vector.hpp.
{ nullary_set<infinity_as_op> (v); }
void set_largest | ( | syntactic & | x | ) |
Definition at line 102 of file syntactic.cpp.
References as_syntactic(), and GEN_LARGEST.
{ x= as_syntactic (GEN_LARGEST); }
void set_largest | ( | generic & | x | ) |
void set_largest | ( | double & | x | ) | [inline] |
Definition at line 32 of file double.hpp.
Referenced by largest_cst(), and largest_as_op::set_op().
{ x= nextafter (HUGE_VAL, 0.0); }
void mmx::set_largest | ( | vector< C, V > & | v | ) |
Definition at line 960 of file vector.hpp.
{ nullary_set<largest_as_op> (v); }
void set_log2 | ( | generic & | x | ) |
void set_log2 | ( | double & | x | ) | [inline] |
Definition at line 34 of file double.hpp.
Referenced by log2_cst(), and log2_as_op::set_op().
{ x= 0.6931471805599453094172321214581766L; }
void set_log2 | ( | syntactic & | x | ) |
Definition at line 105 of file syntactic.cpp.
References as_syntactic(), and log().
{ x= log (as_syntactic (2)); }
void mmx::set_log2 | ( | vector< C, V > & | v | ) |
Definition at line 953 of file vector.hpp.
{ nullary_set<log2_as_op> (v); }
void set_maximal | ( | double & | x | ) | [inline] |
Definition at line 27 of file double.hpp.
{ x= HUGE_VAL; }
void set_maximal | ( | long int & | x | ) | [inline] |
void set_maximal | ( | long unsigned int & | x | ) | [inline] |
void set_maximal | ( | int & | x | ) | [inline] |
Definition at line 19 of file int.hpp.
Referenced by maximal_cst(), inf_op::set_neutral(), min_op::set_neutral(), and maximal_as_op::set_op().
{ x= (int) (((nat) (-1)) >> 1); }
void mmx::set_maximal | ( | vector< C, V > & | v | ) |
Definition at line 963 of file vector.hpp.
{ nullary_set<maximal_as_op> (v); }
void set_maximal | ( | syntactic & | x | ) |
Definition at line 112 of file syntactic.cpp.
References as_syntactic(), and GEN_INFINITY.
{ x= as_syntactic (GEN_INFINITY); }
void set_maximal | ( | generic & | x | ) |
void mmx::set_minimal | ( | vector< C, V > & | v | ) |
Definition at line 964 of file vector.hpp.
{ nullary_set<minimal_as_op> (v); }
void set_minimal | ( | int & | x | ) | [inline] |
Definition at line 21 of file int.hpp.
Referenced by minimal_cst(), min_precision_op::set_neutral(), max_magnitude_op::set_neutral(), max_exponent_op::set_neutral(), sup_op::set_neutral(), max_op::set_neutral(), and minimal_as_op::set_op().
{ x= (int) ((((nat) (-1)) >> 1) + 1); }
void set_minimal | ( | syntactic & | x | ) |
Definition at line 113 of file syntactic.cpp.
References as_syntactic(), and GEN_INFINITY.
{ x= -as_syntactic (GEN_INFINITY); }
void set_minimal | ( | double & | x | ) | [inline] |
Definition at line 28 of file double.hpp.
{ x= -HUGE_VAL; }
void set_minimal | ( | generic & | x | ) |
void set_minimal | ( | long int & | x | ) | [inline] |
void set_minimal | ( | long unsigned int & | x | ) | [inline] |
void set_nan | ( | syntactic & | x | ) |
Definition at line 109 of file syntactic.cpp.
References as_syntactic(), and GEN_NAN.
{ x= as_syntactic (GEN_NAN); }
void mmx::set_nan | ( | T & | x | ) | [inline] |
Definition at line 729 of file type_props.hpp.
References promote().
void set_nan | ( | double & | x | ) | [inline] |
Definition at line 26 of file double.hpp.
Referenced by nan_cst(), and nan_as_op::set_op().
{ x= NAN; }
void set_nan | ( | generic & | x | ) |
void mmx::set_nan | ( | vector< C, V > & | v | ) |
Definition at line 957 of file vector.hpp.
{ nullary_set<nan_as_op> (v); }
void mmx::set_one | ( | T & | x | ) | [inline] |
Definition at line 723 of file type_props.hpp.
References set_as().
Referenced by lcm_op::set_neutral(), and mul_op::set_neutral().
{ set_as (x, (int) 1); }
void set_pi | ( | syntactic & | x | ) |
Definition at line 104 of file syntactic.cpp.
References as_syntactic(), and GEN_PI.
{ x= as_syntactic (GEN_PI); }
void set_pi | ( | generic & | x | ) |
void mmx::set_pi | ( | T & | x | ) | [inline] |
void set_pi | ( | double & | x | ) | [inline] |
Definition at line 35 of file double.hpp.
Referenced by pi_cst(), and pi_as_op::set_op().
{ x= 3.1415926535897932384626433832795029L; }
void mmx::set_pi | ( | vector< C, V > & | v | ) |
Definition at line 952 of file vector.hpp.
{ nullary_set<pi_as_op> (v); }
void set_smallest | ( | double & | x | ) | [inline] |
Definition at line 31 of file double.hpp.
Referenced by smallest_as_op::set_op(), and smallest_cst().
{ x= nextafter (0.0, HUGE_VAL); }
void mmx::set_smallest | ( | vector< C, V > & | v | ) |
Definition at line 959 of file vector.hpp.
{ nullary_set<smallest_as_op> (v); }
void set_smallest | ( | syntactic & | x | ) |
Definition at line 101 of file syntactic.cpp.
References as_syntactic(), and GEN_SMALLEST.
{ x= as_syntactic (GEN_SMALLEST); }
void set_smallest | ( | generic & | x | ) |
void set_top | ( | heap< C > & | h, |
const C & | x | ||
) | [inline] |
Definition at line 185 of file heap.hpp.
{ h.secure(); h.rep->Set_top (x); }
void mmx::set_true | ( | T & | x | ) | [inline] |
Definition at line 724 of file type_props.hpp.
References set_as().
Referenced by and_is_finite_op::set_neutral(), and and_op::set_neutral().
{ set_as (x, true); }
void mmx::set_zero | ( | T & | x | ) | [inline] |
Definition at line 722 of file type_props.hpp.
References set_as().
Referenced by gcd_op::set_neutral(), mul_sub_op::set_neutral(), mul_add_op::set_neutral(), and add_op::set_neutral().
{ set_as (x, (int) 0); }
Definition at line 824 of file generic.cpp.
References current_ev.
{ return current_ev->apply ("sharpen", x1); }
C mmx::sharpen | ( | const C & | x | ) | [inline] |
Definition at line 703 of file defaults.hpp.
Referenced by sharpen_op::op(), and sharpen_op::set_op().
{
return x; }
Definition at line 1166 of file vector.hpp.
{
return unary_map<sharpen_op> (v); }
void mmx::show_symbol_entries | ( | ) |
Definition at line 128 of file symbol.hpp.
{ Symbol_rep::show_symbol_entries (); }
int mmx::sign | ( | const unsigned char & | x | ) | [inline] |
Definition at line 469 of file defaults.hpp.
{ return (x == 0) ? 0 : 1; }
int mmx::sign | ( | const long long unsigned int & | x | ) | [inline] |
Definition at line 481 of file defaults.hpp.
{ return (x == 0) ? 0 : 1; }
int mmx::sign | ( | const short unsigned int & | x | ) | [inline] |
Definition at line 472 of file defaults.hpp.
{ return (x == 0) ? 0 : 1; }
int mmx::sign | ( | const long unsigned int & | x | ) | [inline] |
Definition at line 478 of file defaults.hpp.
{ return (x == 0) ? 0 : 1; }
int mmx::sign | ( | const C & | x | ) | [inline] |
Definition at line 462 of file defaults.hpp.
Referenced by atan2(), compare(), sign_op::op(), and sign_op::set_op().
{ if (x>0) return 1; if (x<0) return -1; return 0; }
int mmx::sign | ( | const unsigned int & | x | ) | [inline] |
Definition at line 475 of file defaults.hpp.
{ return (x == 0) ? 0 : 1; }
Definition at line 120 of file syntactic.cpp.
References as_string(), GEN_MINUS, GEN_OVER, GEN_TIMES, is_atom(), is_func(), N(), and s.
Referenced by migrate_negate(), migrate_sub(), operator+(), operator-(), and pow().
{ if (is_atom (g)) { const string s= as_string (g); if (N(s) > 1 && s[0] == '-' && (s[1] == '.' || (s[1] >= '0' && s[1] <= '9'))) { abs_g= syntactic (s (1, N(s))); sgn_g= -1; } else { abs_g= g; sgn_g= 1; } } else if (is_func (g, GEN_MINUS, 1)) { signed_decompose (g[1], abs_g, sgn_g); sgn_g= -sgn_g; } else if (is_func (g, GEN_TIMES, 2) || is_func (g, GEN_OVER, 2)) { syntactic a1, a2; int s1, s2; signed_decompose (g[1], a1, s1); signed_decompose (g[2], a2, s2); if (is_func (g, GEN_TIMES, 2)) abs_g= a1 * a2; else abs_g= a1 / a2; sgn_g= s1 * s2; } else { abs_g= g; sgn_g= 1; } }
void simplify | ( | table< C, T, V > & | t | ) | [inline] |
Definition at line 171 of file table.hpp.
Referenced by append(), binary_combine(), binary_map(), binary_map_scalar(), map(), REP_STRUCT_2(), unary_map(), and unary_set_scalar().
{ t.secure(); t.rep->simplify (); }
Definition at line 450 of file generic.cpp.
References ACC_SIN, ACC_UNARY, current_ev, and GEN_SIN.
{ ACC_UNARY (ACC_SIN, x1); return current_ev->apply (GEN_SIN, x1); }
double sin | ( | const double & | x | ) | [inline] |
Definition at line 49 of file double.hpp.
Referenced by cos_sin(), cos_op::diff_op(), GLUE_38(), sin_op::op(), trig_op::op(), sin_op::op_init(), sin_op::set_op(), and trig().
{ return std::sin (x); }
Definition at line 1086 of file vector.hpp.
{ return unary_map<sin_op> (v); }
C mmx::sinh | ( | const C & | x | ) | [inline] |
Definition at line 589 of file defaults.hpp.
References exp(), and promote().
Referenced by cosh_op::diff_op(), sinh_op::op(), sinh_op::op_init(), sinh_op::set_op(), and sinh().
double sinh | ( | const double & | x | ) | [inline] |
Definition at line 89 of file generic_utils.cpp.
References N(), n, and var_flatten().
Referenced by compare_sub(), and REP_STRUCT_2().
C mmx::skew_div | ( | const C & | x, |
const C & | y, | ||
bool | left = false |
||
) | [inline] |
C mmx::skew_quo | ( | const C & | x, |
const C & | y, | ||
bool | left = false |
||
) | [inline] |
C mmx::skew_rem | ( | const C & | x, |
const C & | y, | ||
bool | left = false |
||
) | [inline] |
Definition at line 709 of file type_props.hpp.
References get_format(), and get_sample().
{ return get_format (slow<T> (get_sample (fm))); }
T mmx::slow | ( | const typename fast_helper< T >::fast_type & | x | ) |
Definition at line 694 of file type_props.hpp.
Referenced by slow_op::op().
{
return fast_helper<T>::uu (x);
}
Definition at line 714 of file type_props.hpp.
References get_format(), and get_sample().
{ return get_format (slow_as<T,F> (get_sample (fm))); }
T mmx::slow_as | ( | const F & | x | ) |
Definition at line 699 of file type_props.hpp.
{
return fast_helper<T>::uu (x);
}
Definition at line 181 of file generic_utils.cpp.
References compare().
Referenced by product_less_op::op().
{ return compare (g1, g2, 1); }
C mmx::smallest_cst | ( | ) | [inline] |
Definition at line 749 of file type_props.hpp.
References C, and set_smallest().
{ C r; set_smallest (r); return r; }
Definition at line 146 of file socket_port.cpp.
References as_charp(), as_string(), error_port(), free_charp(), and socket_port().
Referenced by GLUE_5().
{ // getting host char* _host= as_charp (host); struct hostent *hp = gethostbyname (_host); free_charp (_host); if (hp == NULL) return error_port ("no connection for '" * host * "'"); // creating socket int fd= socket (AF_INET, SOCK_STREAM, 0); if (fd < 0) return error_port ("socket could not be created"); // connecting to socket struct sockaddr_in insock; string where= host * ":" * as_string (pnr); memset ((char*) &insock, 0, sizeof (insock)); insock.sin_family = AF_INET; insock.sin_port = htons ((unsigned short) pnr); memcpy ((char*) &insock.sin_addr, hp->h_addr, hp->h_length); if (connect (fd, (struct sockaddr*) &insock, sizeof (insock)) < 0) return error_port ("refused connection to '" * where * "'"); // testing whether it works int flags = O_NONBLOCK; if (fcntl (fd, F_SETFL, flags) < 0) return error_port ("non working connection to '" * where * "'"); return socket_port (host, pnr, 2, fd); }
Definition at line 84 of file socket_port.cpp.
Referenced by socket_port_rep::accept(), socket_client_port(), and socket_server_port().
{ return (port_rep*) new socket_port_rep (host, pnr, role, fd); }
Definition at line 93 of file socket_port.cpp.
References error_port(), and socket_port().
Referenced by GLUE_4().
{ // get the server int fd; if ((fd = socket (PF_INET, SOCK_STREAM, 0)) == -1) return error_port ("call to 'socket' failed"); // lose the pesky "address already in use" error message int yes= 1; if (setsockopt (fd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof (int)) == -1) return error_port ("call to 'setsockopt' failed"); // bind struct sockaddr_in local_address; local_address.sin_family = AF_INET; local_address.sin_addr.s_addr = INADDR_ANY; local_address.sin_port = htons (pnr); memset (local_address.sin_zero, '\0', sizeof local_address.sin_zero); if (bind (fd, (struct sockaddr *) &local_address, sizeof (local_address)) == -1) return error_port ("call to 'bind' failed"); // listen if (::listen (fd, 10) == -1) return error_port ("call to 'listen' failed"); return socket_port (host, pnr, 0, fd); }
Definition at line 701 of file generic.cpp.
References current_ev, and GEN_SOLVE.
{ return current_ev->apply (GEN_SOLVE, x1, x2); }
Definition at line 478 of file syntactic.cpp.
References syn().
{ return syn ("solve_lde_init", x, c); }
Definition at line 813 of file generic.cpp.
References current_ev.
Referenced by solve_matrix_lde_op::op_init(), and solve_vector_lde_op::op_init().
{ return current_ev->apply ("solve_lde_init", x1, x2); }
void mmx::sort | ( | vector< T > & | v | ) | [inline] |
Definition at line 49 of file vector_sort.hpp.
{ sort_leq<less_op> (v); }
Sort l increasingly wrt to cmp. cmp (x, y) < 0 iff x < y, cmp (x, y) = 0 iff x = y, cmp (x, y) > 0 iff x > y.
Definition at line 54 of file list_sort.hpp.
References List, merge(), N(), n, and split().
Referenced by list_sort(), load_directory(), and vector_sort().
Definition at line 79 of file vector_sort.hpp.
{ sort_leq<less_op> (v, sigma); }
void mmx::sort_leq | ( | vector< T > & | v | ) |
Definition at line 68 of file vector_sort.hpp.
References CF(), first(), N(), Pair, second(), and T.
{ typedef pair<T,nat> Pair; vector<Pair> tmp_v (Pair(T(),0), N(v)), merge_buf (Pair(T(),0), N(v)); for (nat i= 0; i < N(v); i++) tmp_v[i]= Pair (v[i], i); sort_sub<sort_op_pair_wrapper<Op> > (tmp_v, 0, N(v), merge_buf); sigma= fill<nat> (N(v), CF(v)); for (nat i= 0; i < N(v); i++) sigma[i]= second (tmp_v[i]); for (nat i= 0; i < N(v); i++) v[i] = first (tmp_v[i]); }
Definition at line 20 of file vector_sort.hpp.
References middle(), and start.
{ if (end-start <= 1) return; if (end-start == 2) { if (!Op::op (a[start], a[start+1])) { merge_buf[start]= a[start]; a[start]= a[start+1]; a[start+1]= merge_buf[start]; } return; } int middle= (start+end)>>1; sort_sub<Op> (a, start, middle, merge_buf); sort_sub<Op> (a, middle, end, merge_buf); int i,j,k; for (i=start, j=middle, k=start; (i<middle) && (j<end); ) if (Op::op (a[i], a[j])) merge_buf[k++]= a[i++]; else merge_buf[k++]= a[j++]; j=k; while (i!=middle) a[k++]= a[i++]; for (i=start; i<j; i++) a[i]= merge_buf[i]; }
Definition at line 217 of file source_track.cpp.
References as_string(), source_column(), source_exists(), source_file(), and source_line().
{ if (!source_exists (g)) return "Unknown location"; return source_file (g) * ":" * as_string (source_line (g, false)) * ":" * as_string (source_column (g, false)); }
int source_column | ( | const generic & | g, |
const bool & | last | ||
) |
Definition at line 209 of file source_track.cpp.
References source_location::begin, source_position::column, source_location::end, is_nil(), and source_locate().
Referenced by source_begin(), and source_end().
{ source_location l= source_locate (g); if (is_nil (l)) return 0; else if (last) return l.end.column; else return l.begin.column; }
void source_delete | ( | const generic & | g | ) |
Definition at line 129 of file source_track.cpp.
References reset(), and source_locs().
Referenced by source_extend().
{ reset (source_locs (), g); }
Definition at line 225 of file source_track.cpp.
References as_string(), source_column(), source_exists(), source_file(), and source_line().
{ if (!source_exists (g)) return "Unknown location"; return source_file (g) * ":" * as_string (source_line (g, true)) * ":" * as_string (source_column (g, true)); }
Definition at line 316 of file source_track.cpp.
References as_string(), source_location::begin, source_position::column, is_nil(), source_position::line, literal_to_string(), mmerr, s, source_file(), source_locate(), source_underlined(), and strip_directory().
Referenced by source_exception().
{ mmerr << ">>> g= " << g << "\n"; string s; source_location l= source_locate (g); if (is_nil (l) && is<literal> (g)) s << "Inside " << literal_to_string (g) << ": "; else if (is_nil (l)) s << "Unknown location: "; else s << strip_directory (source_file (g)) << ":" << as_string (l.begin.line + 1) << ":" << as_string (l.begin.column + 1) << ": "; s << msg << "\n" << source_underlined (g); return s; }
Definition at line 341 of file source_track.cpp.
References backtrace(), backtrace_depth, has_trace(), literal_to_string(), N(), source_error(), and trace_bottom().
Referenced by backtrace().
{ generic g= as<generic> (e); if (has_trace (g)) return backtrace (trace_bottom (g, backtrace_depth)); else { generic err= *e; if (is<literal> (err[1])) return source_error (literal_to_string (err[1]), err[N(err)-1]); else return source_error ("unknown", err[N(err)-1]); } }
bool source_exists | ( | const generic & | g | ) |
Definition at line 187 of file source_track.cpp.
References is_nil(), and source_locate().
Referenced by source_begin(), and source_end().
{ return !is_nil (source_locate (g)); }
Definition at line 134 of file source_track.cpp.
References source_location::obj, source_delete(), source_insert(), and source_locate().
Referenced by source_extend().
{ //mmout << "source extending " << g1 << " with " << g2 <<"\n"; source_location l; source_locate (g1, l); source_locate (g2, l); source_delete (g1); source_delete (g2); l.obj = g1; source_insert (g1, l); return g1; }
generic mmx::source_extend | ( | const generic & | g1, |
const generic & | g2, | ||
const generic & | g3 | ||
) | [inline] |
Definition at line 146 of file source_track.hpp.
References source_extend().
{ return source_extend (source_extend (g1, g2), g3); }
Definition at line 192 of file source_track.cpp.
References as_string(), source_location::file_name, source_location::input_number, is_nil(), and source_locate().
Referenced by source_begin(), source_end(), and source_error().
{ source_location l= source_locate (g); if (is_nil (l)) return ""; else if (l.file_name == "") return "input[" * as_string (l.input_number + 1) * "]"; else return l.file_name; }
void source_insert | ( | const generic & | g, |
const source_location & | l | ||
) |
Definition at line 124 of file source_track.cpp.
References source_locs().
Referenced by source_extend().
{ source_locs () [g] = l; }
int source_line | ( | const generic & | g, |
const bool & | last | ||
) |
Definition at line 201 of file source_track.cpp.
References source_location::begin, source_location::end, is_nil(), source_position::line, and source_locate().
Referenced by source_begin(), and source_end().
{ source_location l= source_locate (g); if (is_nil (l)) return 0; else if (last) return l.end.line; else return l.begin.line; }
void source_locate | ( | const generic & | g, |
source_location & | l | ||
) |
Definition at line 151 of file source_track.cpp.
References source_location::begin, contains(), source_location::end, source_location::file_name, source_location::input_number, is_nil(), max(), min(), N(), source_location::obj, read(), and source_locs().
Referenced by source_column(), source_error(), source_exists(), source_extend(), source_file(), source_line(), source_locate(), source_string(), source_string_unindented(), and source_underlined().
{ // mmout << "source_locate: " << g << " @ " << inside (g) << "\n"; source_location arg_l = l; if (source_locs () -> contains (g)) { source_location l1 = read (source_locs (), g); if (is_nil (l)) l = l1; else if (!is_nil (l1)) { l.obj = l1.obj; if (l.file_name == l1.file_name && l.input_number == l1.input_number) { l.begin = min (l.begin, l1.begin); l.end = max (l.end, l1.end); } // If the location is not 'connected', we leave l unchanged. } return; } if (is<compound> (g)) for (nat i=0; i<N(g); i++) source_locate (g[i], l); l.obj = g; }
source_location source_locate | ( | const generic & | g | ) |
Definition at line 176 of file source_track.cpp.
References source_locate().
{ source_location l; source_locate (g, l); return l; }
table<source_location, generic, gen_eq_table>& mmx::source_locs | ( | ) |
Definition at line 114 of file source_track.cpp.
Referenced by source_delete(), source_insert(), and source_locate().
{ static table<source_location, generic, gen_eq_table> t= table<source_location, generic, gen_eq_table> (); return t; }
Definition at line 233 of file source_track.cpp.
References source_location::begin, source_location::end, source_location::file_name, get_source(), source_location::input_number, is_nil(), source_position::position, and source_locate().
{ source_location l= source_locate (g); if (is_nil (l)) return ""; else { string src= get_source (l.file_name, l.input_number); return src (l.begin.position, l.end.position); } }
Definition at line 243 of file source_track.cpp.
References add_indentation(), source_location::begin, source_position::column, source_location::end, source_location::file_name, get_indentation(), get_source(), source_location::input_number, is_nil(), source_position::position, repeated(), source_locate(), and sub().
{ source_location l= source_locate (g); if (is_nil (l)) return ""; else { string src= get_source (l.file_name, l.input_number); string sub= src (l.begin.position, l.end.position); string bis= repeated (" ", l.begin.column) * sub; return add_indentation (bis, -((int) get_indentation (bis))); } }
Definition at line 309 of file source_track.cpp.
References source_location::begin, source_location::end, source_location::file_name, source_location::input_number, is_nil(), source_locate(), and underlined().
Referenced by source_error().
{ source_location l= source_locate (g); if (is_nil (l)) return ""; else return underlined (l.file_name, l.input_number, l.begin, l.end); }
Definition at line 492 of file mmx_texmacs.cpp.
Referenced by scheme_to_tm().
sparse_vector<C,T,V> mmx::sparse_mul_add | ( | const sparse_vector< C, T, V > & | v1, |
const sparse_vector< C, T, V > & | v2, | ||
const C & | x | ||
) | [inline] |
Definition at line 337 of file sparse_vector.hpp.
{
return _mul_add<mul_op> (v1, v2, x); }
Definition at line 847 of file generic.cpp.
References current_ev.
{ return current_ev->apply ("specialize", x1, x2); }
Definition at line 60 of file alias.cpp.
References alias_specializer(), as(), get_alias(), type(), and val.
{ generic val= get_alias (as<alias<generic> > (a)); routine r; alias_specializer (type (val), r); return r->apply (a); }
nat mmx::species_type | ( | const generic & | g | ) | [inline] |
Definition at line 154 of file generic.hpp.
Referenced by is_list(), is_table(), and is_vector().
{
return g->get_species_type (); }
Definition at line 426 of file generic.cpp.
References ACC_SQRT, ACC_UNARY, current_ev, and GEN_SQRT.
{ ACC_UNARY (ACC_SQRT, x1); return current_ev->apply (GEN_SQRT, x1); }
double sqrt | ( | const double & | x | ) | [inline] |
Definition at line 43 of file double.hpp.
Referenced by acosh(), asinh(), sqrt_op::def(), asinh_op::diff_op(), acosh_op::diff_op(), asin_op::diff_op(), acos_op::diff_op(), GLUE_33(), hypot(), sqrt_op::op(), and sqrt_op::set_op().
{ return std::sqrt (x); }
Definition at line 1082 of file vector.hpp.
{ return unary_map<sqrt_op> (v); }
Definition at line 801 of file generic.cpp.
References current_ev.
Referenced by sqrt_op::op_init().
{ return current_ev->apply ("sqrt_init", x1, x2); }
C mmx::square | ( | const C & | x | ) | [inline] |
Definition at line 552 of file defaults.hpp.
Referenced by acosh(), asinh(), binpow(), atanh_op::diff_op(), asinh_op::diff_op(), acosh_op::diff_op(), tanh_op::diff_op(), atan_op::diff_op(), asin_op::diff_op(), acos_op::diff_op(), tan_op::diff_op(), ldiv_op::diff_op(), div_op::diff_op(), invert_op::diff_op(), GLUE_21(), GLUE_6(), GLUE_8(), hypot(), square_op::op(), and square_op::set_op().
{
return x * x;
}
double square | ( | const double & | x | ) | [inline] |
Definition at line 122 of file double.hpp.
{ return x * x; }
Definition at line 369 of file generic.cpp.
References ACC_SQUARE, ACC_UNARY, current_ev, and GEN_TIMES.
{ ACC_UNARY (ACC_SQUARE, x1); return current_ev->apply (GEN_TIMES, x1, x1); }
Tell if s starts with what.
Definition at line 315 of file string.cpp.
Referenced by as_texmacs(), decode_name(), file_is_script(), GLUE_10(), serialize(), texmacs_expand(), texmacs_to_scheme(), and unquote().
Definition at line 25 of file exception.cpp.
References flatten_as_mmx(), gen(), and GEN_EXCEPTION.
{ exception exc (gen (GEN_EXCEPTION, msg * flatten_as_mmx (a), where)); return as<generic> (exc); }
Definition at line 20 of file exception.cpp.
References exception, gen(), and GEN_EXCEPTION.
Referenced by type_mismatch(), and wrong_nr_args().
{ return as<generic> (exception (gen (GEN_EXCEPTION, msg, where))); }
Definition at line 66 of file source_track.cpp.
References file_sources, and tokenize().
{ file_sources [file_name] = tokenize (data, "\n"); }
void store_interactive_number | ( | nat | n | ) |
Definition at line 34 of file source_track.cpp.
References ASSERT, interactive_sources, N(), and range().
{ ASSERT (n <= N(interactive_sources), "input number out of range"); interactive_sources= range (interactive_sources, 0, n); }
Definition at line 45 of file source_track.cpp.
References ASSERT, get_interactive_number(), interactive_sources, n, and tokenize().
{ ASSERT (n <= get_interactive_number (), "input number out of range"); vector<string> v= tokenize (data, "\n"); if (n == get_interactive_number ()) interactive_sources << v; else interactive_sources[n]= v; }
Definition at line 931 of file mmx_printer.cpp.
References s.
Referenced by operator<<().
{ //if (math_mode) { ... } return s; }
C mmx::string_as_numeric | ( | const string & | s | ) |
void mmx::string_to_floating | ( | const string & | s, |
C & | val, | ||
const char * | fm | ||
) | [inline] |
STMPL void string_to_numeric | ( | const string & | s, |
float & | val | ||
) |
Definition at line 215 of file string.cpp.
References string_to_floating().
{ string_to_floating (s, x, "%f"); }
STMPL void string_to_numeric | ( | const string & | s, |
double & | val | ||
) |
Definition at line 217 of file string.cpp.
References string_to_floating().
{ string_to_floating (s, x, "%lf"); }
void mmx::string_to_numeric | ( | const string & | s, |
C & | val | ||
) |
STMPL void string_to_numeric | ( | const string & | s, |
long double & | val | ||
) |
Definition at line 219 of file string.cpp.
References string_to_floating().
{ string_to_floating (s, x, "%Lf"); }
Definition at line 258 of file system.cpp.
References N().
{ for (int i= N(name)-1; i>=0; i--) if (name[i]=='.') return name (0, i); else if (name[i]=='/') return name; return name; }
mmx::STYPE_TO_TYPE | ( | template< typename C, typename V > | , |
scalar_type | , | ||
vector< C, V > | , | ||
C | |||
) |
void mmx::sub | ( | R & | x, |
const C1 & | y1, | ||
const C2 & | y2 | ||
) | [inline] |
Definition at line 54 of file operators.hpp.
Referenced by lsub_op::set_op(), rsub_op::set_op(), sub_op::set_op(), and source_string_unindented().
{ x= y1 - y2; }
T mmx::sub_operator | ( | const T & | x, |
const T & | y | ||
) |
Definition at line 30 of file operators.hpp.
{ return x-y; }
Definition at line 695 of file generic.cpp.
References current_ev, and GEN_SUBSTITUTE.
{ return current_ev->apply (GEN_SUBSTITUTE, x1, x2); }
C mmx::sup | ( | const C & | x, |
const C & | y | ||
) |
Definition at line 513 of file defaults.hpp.
References max().
Referenced by sup_op::op(), and sup_op::set_op().
{ return max (x, y); }
sparse_vector<C,T,V> mmx::sup | ( | const sparse_vector< C, T, V > & | t, |
const sparse_vector< C, T, V > & | u | ||
) | [inline] |
Definition at line 267 of file sparse_vector.hpp.
{
return binary_map<sup_op,C,T,V> (t, u); }
Definition at line 1053 of file vector.hpp.
{
return binary_map<sup_op> (v, w); }
void mmx::swap | ( | C & | x, |
C & | y | ||
) | [inline] |
nat mmx::symbolic_type | ( | const generic & | g | ) | [inline] |
Definition at line 152 of file generic.hpp.
{
return g->get_symbolic_type (); }
syntactic mmx::syn | ( | const char * | f, |
const syntactic & | a1 | ||
) | [inline] |
Definition at line 108 of file syntactic.hpp.
References as_syntactic(), and gen().
{ return as_syntactic (gen (generic (f), *a1)); }
syntactic mmx::syn | ( | const syntactic & | f, |
const vector< syntactic > & | a | ||
) | [inline] |
Definition at line 102 of file syntactic.hpp.
References as_syntactic(), and gen().
{ const vector<generic>* ptr= (vector<generic>*) ((void*) (&a)); return as_syntactic (gen (*f, *ptr)); }
syntactic mmx::syn | ( | const generic & | f, |
const syntactic & | a1 | ||
) | [inline] |
Definition at line 126 of file syntactic.hpp.
References as_syntactic(), and gen().
{ return as_syntactic (gen (f, *a1)); }
syntactic mmx::syn | ( | const generic & | f, |
const syntactic & | a1, | ||
const syntactic & | a2, | ||
const syntactic & | a3, | ||
const syntactic & | a4 | ||
) | [inline] |
Definition at line 134 of file syntactic.hpp.
References as_syntactic(), and gen().
{ return as_syntactic (gen (f, *a1, *a2, *a3, *a4)); }
syntactic mmx::syn | ( | const generic & | f | ) | [inline] |
Definition at line 124 of file syntactic.hpp.
References as_syntactic(), and gen().
{ return as_syntactic (gen (f)); }
syntactic mmx::syn | ( | const generic & | f, |
const syntactic & | a1, | ||
const syntactic & | a2, | ||
const syntactic & | a3 | ||
) | [inline] |
Definition at line 131 of file syntactic.hpp.
References as_syntactic(), and gen().
{ return as_syntactic (gen (f, *a1, *a2, *a3)); }
syntactic mmx::syn | ( | const char * | f | ) | [inline] |
Definition at line 106 of file syntactic.hpp.
References as_syntactic(), and gen().
{ return as_syntactic (gen (generic (f))); }
syntactic mmx::syn | ( | const syntactic & | f | ) | [inline] |
Definition at line 88 of file syntactic.hpp.
References as_syntactic(), and gen().
Referenced by abs(), access(), acos(), acos_init(), acosh(), arg(), asin(), asin_init(), asinh(), atan(), atan2(), atan_init(), atanh(), center(), conj(), cos(), cosh(), denominator(), derive(), exp(), input_output_string_port_rep::expression(), input_string_port_rep::expression(), output_string_port_rep::expression(), socket_port_rep::expression(), error_port_rep::expression(), pipe_port_rep::expression(), formatting_port_rep::expression(), file_port_rep::expression(), composite_port_rep::expression(), flatten(), gcd(), hypot(), Im(), inject(), integrate(), integrate_init(), lcm(), log(), log_init(), lshiftz(), migrate_sub(), numerator(), operator*(), operator+(), operator-(), operator/(), operator<<(), operator>>(), pow(), project(), radius(), Re(), rshiftz(), sin(), sinh(), solve_lde_init(), sqrt(), sqrt_init(), square(), tan(), tanh(), trig(), xderive(), and xgcd().
{ return as_syntactic (gen (*f)); }
syntactic mmx::syn | ( | const syntactic & | f, |
const syntactic & | a1 | ||
) | [inline] |
Definition at line 90 of file syntactic.hpp.
References as_syntactic(), and gen().
{ return as_syntactic (gen (*f, *a1)); }
syntactic mmx::syn | ( | const generic & | f, |
const vector< syntactic > & | a | ||
) | [inline] |
Definition at line 138 of file syntactic.hpp.
References as_syntactic(), and gen().
{ const vector<generic>* ptr= (vector<generic>*) ((void*) (&a)); return as_syntactic (gen (f, *ptr)); }
syntactic mmx::syn | ( | const syntactic & | f, |
const syntactic & | a1, | ||
const syntactic & | a2, | ||
const syntactic & | a3 | ||
) | [inline] |
Definition at line 95 of file syntactic.hpp.
References as_syntactic(), and gen().
{ return as_syntactic (gen (*f, *a1, *a2, *a3)); }
syntactic mmx::syn | ( | const char * | f, |
const syntactic & | a1, | ||
const syntactic & | a2 | ||
) | [inline] |
Definition at line 110 of file syntactic.hpp.
References as_syntactic(), and gen().
{ return as_syntactic (gen (generic (f), *a1, *a2)); }
syntactic mmx::syn | ( | const char * | f, |
const syntactic & | a1, | ||
const syntactic & | a2, | ||
const syntactic & | a3 | ||
) | [inline] |
Definition at line 113 of file syntactic.hpp.
References as_syntactic(), and gen().
{ return as_syntactic (gen (generic (f), *a1, *a2, *a3)); }
syntactic mmx::syn | ( | const char * | f, |
const vector< syntactic > & | a | ||
) | [inline] |
Definition at line 120 of file syntactic.hpp.
References as_syntactic(), and gen().
{ const vector<generic>* ptr= (vector<generic>*) ((void*) (&a)); return as_syntactic (gen (generic (f), *ptr)); }
syntactic mmx::syn | ( | const char * | f, |
const syntactic & | a1, | ||
const syntactic & | a2, | ||
const syntactic & | a3, | ||
const syntactic & | a4 | ||
) | [inline] |
Definition at line 116 of file syntactic.hpp.
References as_syntactic(), and gen().
{ return as_syntactic (gen (generic (f), *a1, *a2, *a3, *a4)); }
syntactic mmx::syn | ( | const generic & | f, |
const syntactic & | a1, | ||
const syntactic & | a2 | ||
) | [inline] |
Definition at line 128 of file syntactic.hpp.
References as_syntactic(), and gen().
{ return as_syntactic (gen (f, *a1, *a2)); }
syntactic mmx::syn | ( | const syntactic & | f, |
const syntactic & | a1, | ||
const syntactic & | a2, | ||
const syntactic & | a3, | ||
const syntactic & | a4 | ||
) | [inline] |
Definition at line 98 of file syntactic.hpp.
References as_syntactic(), and gen().
{ return as_syntactic (gen (*f, *a1, *a2, *a3, *a4)); }
syntactic mmx::syn | ( | const syntactic & | f, |
const syntactic & | a1, | ||
const syntactic & | a2 | ||
) | [inline] |
Definition at line 92 of file syntactic.hpp.
References as_syntactic(), and gen().
{ return as_syntactic (gen (*f, *a1, *a2)); }
string sysconf_dir | ( | ) |
Definition at line 108 of file system.cpp.
References get_env(), and prefix_dir().
{ string dir= get_env ("MMX_SYSCONF_DIR"); if (dir == "") dir= prefix_dir () * "/etc"; return dir; }
int system | ( | const string & | s | ) |
Definition at line 58 of file system.cpp.
References as_charp(), and free_charp().
Referenced by eval_system(), pipe_port(), and var_mkdir().
{ //mmout << "Execute] " << s << "\n"; char* _s= as_charp (s); int r= ::system (_s); free_charp (_s); return r; }
double tan | ( | const double & | x | ) | [inline] |
Definition at line 50 of file double.hpp.
Referenced by GLUE_39(), tan_op::op(), tan_op::op_init(), and tan_op::set_op().
{ return std::tan (x); }
Definition at line 1087 of file vector.hpp.
{ return unary_map<tan_op> (v); }
Definition at line 456 of file generic.cpp.
References ACC_TAN, ACC_UNARY, current_ev, and GEN_TAN.
{ ACC_UNARY (ACC_TAN, x1); return current_ev->apply (GEN_TAN, x1); }
C mmx::tanh | ( | const C & | x | ) | [inline] |
Definition at line 591 of file defaults.hpp.
References exp().
Referenced by tanh_op::op(), tanh_op::op_init(), tanh_op::set_op(), and tanh().
double tanh | ( | const double & | x | ) | [inline] |
void mmx::term_threads | ( | ) |
Definition at line 223 of file threads.cpp.
{}
Definition at line 315 of file routine.hpp.
Referenced by define().
{ return new ternary_routine_rep<D,S1,S2,S3> (name, f); }
static bool mmx::test_keyword | ( | const char * | k, |
parse_instance * | obj | ||
) | [static] |
Definition at line 65 of file mmx_lexer.cpp.
References INC_POS, is_alpha(), n, pos, RESTORE_START, and s.
void texmacs_command | ( | const string & | cmd | ) |
Definition at line 36 of file mmx_texmacs.cpp.
References texmacs_pending.
Referenced by texmacs_dynamic_event().
{ texmacs_pending << " " << cmd << "\n"; }
Definition at line 52 of file mmx_texmacs.cpp.
References as_generic(), as_texmacs_snippet(), flatten(), texmacs_command(), and val.
{ string v= as_texmacs_snippet (as_generic (flatten (val))); texmacs_command ("(locus-set \"" * id * "\" '" * v * ")"); }
Definition at line 397 of file mmx_texmacs.cpp.
References gen(), is_func(), literal_to_string(), N(), and starts().
Referenced by serialize().
{ if (is_func (g, "tm$with")) return texmacs_expand (g[N(g)-1]); else if (is_func (g, "tm$itemize", 1) || is_func (g, "tm$enumerate", 1)) return gen ("$indent", texmacs_expand (g[1])); else if (is_func (g, "tm$item", 0)) return generic ("* "); else if (is_func (g, "tm$folded", 2)) return gen ("$varindent", gen ("$concat", generic ("o "), texmacs_expand (g[1]))); else if (is_func (g, "tm$unfolded", 2)) return gen ("$varindent", gen ("$concat", generic ("* "), texmacs_expand (g[1]), generic ("$lf"), texmacs_expand (g[2]))); else if (is_func (g, "tm$folded-explain", 2)) return texmacs_expand (g[1]); else if (is_func (g, "tm$unfolded-explain", 2)) return gen ("$concat", texmacs_expand (g[1]), generic ("$lf"), generic ("$lf"), texmacs_expand (g[2])); else if (is_func (g, "tm$explain", 2)) return gen ("$concat", texmacs_expand (g[1]), generic ("$lf"), gen ("$indent", texmacs_expand (g[2]))); else if (is_func (g, "tm$explain-synopsis", 1)) return gen ("$concat", generic (" --- "), texmacs_expand (g[1])); else if (is<compound> (g)) { vector<generic> v; for (nat i=1; i<N(g); i++) v << texmacs_expand (g[i]); if (is<literal> (g[0]) && starts (literal_to_string (g[0]), "tm$")) { if (N(v) == 1) return v[0]; else return gen ("$concat", v); } else return gen (g[0], v); } else return g; }
string texmacs_flush_commands | ( | ) |
Definition at line 41 of file mmx_texmacs.cpp.
References DATA_BEGIN, DATA_END, s, and texmacs_pending.
{ if (texmacs_pending == "") return ""; string s= string (DATA_BEGIN) * "command:(begin" * texmacs_pending * ")" * string (DATA_END); texmacs_pending= ""; return s; }
Definition at line 99 of file mmx_texmacs.cpp.
References init().
Referenced by as_texmacs().
{ table<generic,generic> t; init (t, "/\\", "tm$wedge"); init (t, "mathcatalan", "tm$mathcatalan"); init (t, "@", "tm$circ"); init (t, "><", "tm$join"); init (t, "derivative", "D"); init (t, "mathe", "tm$mathe"); init (t, "<=>", "tm$Leftrightarrow"); init (t, "matheuler", "tm$matheuler"); init (t, ">", "tm$gtr"); init (t, ">=", "tm$geqslant"); init (t, ">>", "tm$gg"); init (t, "mathi", "tm$mathi"); init (t, "=>", "tm$Rightarrow"); init (t, "Infty", "tm$infty"); init (t, "->", "tm$rightarrow"); init (t, "<", "tm$less"); init (t, "<=", "tm$leqslant"); init (t, "<<", "tm$ll"); init (t, ":->", "tm$mapsto"); init (t, ".!", "!"); init (t, "!", "tm$neg"); init (t, "\\/", "tm$vee"); init (t, "partial", "tm$partial"); init (t, "mathpi", "tm$mathpi"); init (t, ".'", "'"); init (t, ".`", "`"); init (t, "..", "tm$ldots"); init (t, "::", "tm$colons"); init (t, ":>", "tm$transtype"); init (t, "!=", "tm$neq"); init (t, "|", "|"); init (t, "||", "tm$||"); init (t, "xor", "tm$veebar"); init (t, ":=", "tm$assign"); init (t, "+=", "tm$plusassign"); init (t, "-=", "tm$minusassign"); init (t, "*=", "tm$astassign"); init (t, "/=", "tm$overassign"); init (t, "alpha", "tm$alpha"); init (t, "beta", "tm$beta"); init (t, "gamma", "tm$gamma"); init (t, "delta", "tm$delta"); init (t, "epsilon", "tm$varepsilon"); init (t, "zeta", "tm$zeta"); init (t, "eta", "tm$eta"); init (t, "theta", "tm$theta"); init (t, "iota", "tm$iota"); init (t, "kappa", "tm$kappa"); init (t, "lambda", "tm$lambda"); init (t, "mu", "tm$mu"); init (t, "nu", "tm$nu"); init (t, "xi", "tm$xi"); init (t, "omicron", "tm$omicron"); init (t, "pi", "tm$pi"); init (t, "rho", "tm$rho"); init (t, "sigma", "tm$sigma"); init (t, "tau", "tm$tau"); init (t, "upsilon", "tm$upsilon"); init (t, "phi", "tm$varphi"); init (t, "chi", "tm$chi"); init (t, "psi", "tm$psi"); init (t, "omega", "tm$omega"); init (t, "Alpha", "tm$Alpha"); init (t, "Beta", "tm$Beta"); init (t, "Gamma", "tm$Gamma"); init (t, "Delta", "tm$Delta"); init (t, "Epsilon", "tm$Epsilon"); init (t, "Zeta", "tm$Zeta"); init (t, "Eta", "tm$Eta"); init (t, "Theta", "tm$Theta"); init (t, "Iota", "tm$Iota"); init (t, "Kappa", "tm$Kappa"); init (t, "Lambda", "tm$Lambda"); init (t, "Mu", "tm$Mu"); init (t, "Nu", "tm$Nu"); init (t, "Xi", "tm$Xi"); init (t, "Omicron", "tm$Omicron"); init (t, "Pi", "tm$Pi"); init (t, "Rho", "tm$Rho"); init (t, "Sigma", "tm$Sigma"); init (t, "Tau", "tm$Tau"); init (t, "Upsilon", "tm$Upsilon"); init (t, "Phi", "tm$Phi"); init (t, "Chi", "tm$Chi"); init (t, "Psi", "tm$Psi"); init (t, "Omega", "tm$Omega"); return t; }
Definition at line 440 of file mmx_texmacs.cpp.
References ASSERT, compound_to_vector(), ERROR, literal_to_string(), mmerr, N(), quote(), and starts().
Referenced by as_snippet(), as_texmacs_scheme(), and as_texmacs_snippet().
{ //mmerr << "g= " << as_lisp (g) << "\n"; if (is<literal> (g)) s << quote (literal_to_string (g)); else if (is<compound> (g) && is<literal> (g[0]) && literal_to_string (g[0]) == " ") s << "\" \""; else if (is<compound> (g) && is<literal> (g[0])) { string op= literal_to_string (g[0]); if (starts (op, "tm$")) op= op (2, N(op)); if (!starts (op, "$")) { mmerr << "op = " << op << "\n"; mmerr << "args= " << compound_to_vector (g) << "\n"; } ASSERT (starts (op, "$"), "invalid TeXmacs markup"); s << "(" << op (1, N(op)); for (nat i=1; i<N(g); i++) { s << " "; texmacs_to_scheme (s, g[i]); } s << ")"; } else ERROR ("invalid TeXmacs markup"); }
syntactic& mmx::the_polynomial_var | ( | ) |
Definition at line 505 of file syntactic.cpp.
{ static syntactic v ("x"); return v; }
syntactic& mmx::the_series_var | ( | ) |
Definition at line 499 of file syntactic.cpp.
{ static syntactic v ("z"); return v; }
C3 mmx::third | ( | const triple< C1, C2, C3 > & | t | ) | [inline] |
Definition at line 42 of file triple.hpp.
{ return t.x3; }
void threads_execute | ( | task * | ts, |
nat | n | ||
) |
Definition at line 224 of file threads.cpp.
Referenced by threads_simple_loop().
int threads_get_number | ( | ) |
Definition at line 219 of file threads.cpp.
{ return 1; }
void threads_initialize | ( | nat | n | ) |
Definition at line 217 of file threads.cpp.
{ (void) n; }
void threads_set_number | ( | const int & | n | ) |
Definition at line 220 of file threads.cpp.
References ASSERT.
void threads_simple_loop | ( | nat | nr_instances, |
nat | nr_iterations | ||
) |
Definition at line 282 of file threads.cpp.
References threads_execute().
{ task ts[nr_instances]; for (nat id=0; id<nr_instances; id++) ts[id]= new loop_task_rep (nr_iterations); threads_execute (ts, nr_instances); }
void threads_terminate | ( | ) |
Definition at line 218 of file threads.cpp.
{}
double times_infinity | ( | const double & | x | ) | [inline] |
Definition at line 37 of file double.hpp.
Referenced by GLUE_37(), and set_infinity().
{ return x * HUGE_VAL; }
Cut into pieces, using as
a separator.
Definition at line 545 of file string.cpp.
References ASSERT, min(), N(), s, and start.
Referenced by add_indentation(), documentify(), get_indentation(), store_file_source(), and store_interactive_source().
{ ASSERT (N(sep) != 0, "separator should be non-empty"); vector<string> v; nat start= 0; while (start < N(s)) { nat end= start; while (end < N(s) && (s[end] != sep[0] || s (end, min (N(s), end + N(sep))) != sep)) end++; if (keep) v << (s (start, end) * sep); else v << s (start, end); start= end + N(sep); } return v; }
Definition at line 76 of file exception.cpp.
References trace_depth(), and trace_pull().
Referenced by source_exception().
{ generic g= exc; nat d= trace_depth (exc); for (nat i=n; i<d; i++) g= trace_pull (g); return g; }
Definition at line 70 of file exception.cpp.
References has_trace(), and trace_pull().
Referenced by trace_bottom().
{ if (has_trace (exc)) return trace_depth (trace_pull (exc)) + 1; else return 1; }
Definition at line 54 of file exception.cpp.
References ASSERT, exception, gen(), GEN_BACKTRACE, GEN_EXCEPTION, and is_func().
Referenced by backtrace(), trace_bottom(), and trace_depth().
{ generic msg= *as<exception> (exc); ASSERT (is_func (msg, GEN_EXCEPTION, 2), "invalid exception"); ASSERT (is_func (msg[2], GEN_BACKTRACE, 2), "backtrace expected"); return as<generic> (exception (gen (msg[0], msg[1], msg[2][2]))); }
Definition at line 46 of file exception.cpp.
References ASSERT, exception, gen(), GEN_BACKTRACE, GEN_EXCEPTION, and is_func().
{ generic msg= *as<exception> (exc); ASSERT (is_func (msg, GEN_EXCEPTION, 2), "invalid exception"); generic w= gen (GEN_BACKTRACE, where, msg[2]); return as<generic> (exception (gen (msg[0], msg[1], w))); }
Definition at line 62 of file exception.cpp.
References ASSERT, exception, gen(), GEN_BACKTRACE, GEN_EXCEPTION, and is_func().
Referenced by backtrace().
{ generic msg= *as<exception> (exc); ASSERT (is_func (msg, GEN_EXCEPTION, 2), "invalid exception"); ASSERT (is_func (msg[2], GEN_BACKTRACE, 2), "backtrace expected"); return as<generic> (exception (gen (msg[0], "backtrace", msg[2][1]))); }
Definition at line 417 of file syntactic.cpp.
References cos(), GEN_SQTUPLE, sin(), and syn().
{ return syn (GEN_SQTUPLE, cos (g), sin (g)); }
Definition at line 546 of file generic.cpp.
References comma(), cos(), sin(), and xsqtuple().
Referenced by trig_op::op(), trig_op::op_init(), and trig_op::set_op().
mmx::TRUE_IDENTITY_OP_SUGAR | ( | template< typename C, typename T, typename V > | , |
sparse_vector< C, T, V > | |||
) |
mmx::TRUE_IDENTITY_OP_SUGAR | ( | template< typename C1, typename C2 > | , |
pair< C1, C2 > | |||
) |
mmx::TRUE_IDENTITY_OP_SUGAR | ( | template< typename C, typename V > | , |
vector< C, V > | |||
) |
mmx::TRUE_IDENTITY_OP_SUGAR | ( | template< typename C > | , |
chain< C > | |||
) |
mmx::TRUE_IDENTITY_OP_SUGAR | ( | template< typename C > | , |
list< C > | |||
) |
mmx::TRUE_IDENTITY_OP_SUGAR | ( | template< typename C, typename T, typename V > | , |
table< C, T, V > | |||
) |
mmx::TRUE_IDENTITY_OP_SUGAR | ( | template< typename C > | , |
heap< C > | |||
) |
mmx::TRUE_IDENTITY_OP_SUGAR | ( | template< typename C1, typename C2, typename C3 > | , |
triple< C1, C2, C3 > | |||
) |
double trunc | ( | const double & | x | ) | [inline] |
Definition at line 126 of file double.hpp.
Referenced by trunc_op::op(), and trunc_op::set_op().
{ return ::trunc (x); }
Definition at line 750 of file generic.cpp.
References current_ev, and GEN_TRUNC.
{ return current_ev->apply (GEN_TRUNC, x); }
Definition at line 105 of file tuple.hpp.
References tuple_type_info().
{ bool mode= false; tuple_type_info (id, mode); return id; }
void tuple_type_info | ( | nat & | id, |
bool & | mode | ||
) |
Definition at line 17 of file tuple.cpp.
References new_type_id(), and read().
Referenced by is_tuple_type(), new_tuple_type_id(), and tuple_to_scalar().
{ static table<nat,nat> t (0); static table<nat,nat> u (0); if (mode == false) { mode= t->contains (id); id= read (t, id); } else { if (u->contains (id)) id= u[id]; else { nat new_id= new_type_id (); t[new_id]= id; u[id]= new_id; id= new_id; } } }
nat mmx::type | ( | const generic & | g | ) | [inline] |
Definition at line 150 of file generic.hpp.
Referenced by as_generic(), get_alias(), is(), generic_object_rep::is_equal(), generic_concrete_rep< C >::is_equal(), generic_object_rep::is_exact_eq(), generic_concrete_rep< C >::is_exact_eq(), generic_object_rep::is_hard_eq(), generic_concrete_rep< C >::is_hard_eq(), object_alias(), object_flatten(), object_generalize_alias(), object_get_alias(), object_set_alias(), object_specialize_alias(), set_alias(), specialize_alias(), and type_name().
{
return g->get_type (); }
nat mmx::type_id | ( | ) | [inline] |
Definition at line 191 of file generic.hpp.
{
return type_information<C>::id; }
Definition at line 78 of file glue.cpp.
References current_ev, gen(), and GEN_TYPE_ID.
Referenced by define_type_helper< C >::def_type(), get_user_type(), and generic_object_rep::same_type().
{ generic id; if (current_ev->get (gen (GEN_TYPE_ID, name), id) && is<nat> (id)) return as<nat> (id); else return 1; }
Definition at line 41 of file exception.cpp.
References std_exception().
{ return std_exception ("expected ", expect, where); }
Definition at line 24 of file routine.cpp.
References N(), n, and type_name().
Definition at line 86 of file glue.cpp.
References current_ev, gen(), GEN_TYPE_NAME, and GEN_UNSPECIFIED_TYPE.
Referenced by convert(), flatten_type(), routine_rep::function_type(), object_flatten(), operator<<(), replace_lf(), and type_name().
{ generic name; if (current_ev->get (gen (GEN_TYPE_NAME, as<generic> (id)), name)) return name; else return GEN_UNSPECIFIED_TYPE; }
generic type_name | ( | ) | [inline] |
Definition at line 193 of file generic.hpp.
References type_name().
{ return type_name (type_id<C> ()); }
Definition at line 379 of file mmx_printer.cpp.
References cdr(), compound_to_vector(), gen(), GEN_BEGIN, is_func(), and N().
{ vector<generic> v; if (is_func (g[1], GEN_BEGIN)) v << cdr (compound_to_vector (g[1])); else v << g[1]; for (nat i=2; i<N(g); i++) v << g[i]; return gen (g[0], gen (GEN_BEGIN, v)); }
nat mmx::unary_hash | ( | const triple< C1, C2, C3 > & | t | ) |
Definition at line 48 of file triple.hpp.
{ nat h1= Op::op (t.x1), h2= Op::op (t.x2); return h1 ^ h2 ^ (h1<<3) ^ (h2<<5) ^ Op::op (t.x3); }
Definition at line 156 of file iterator.hpp.
{ (void) it; return 20077002; /* Iterator it1= copy (it); register nat h= 20077002; while (busy (it1)) { h= (h<<3) ^ (h>>29) ^ Op::op (*it1); ++it1; } return h; */ }
Definition at line 465 of file table.hpp.
References busy(), iterate(), pair< C1, C2 >::x1, and pair< C1, C2 >::x2.
{ // we add all hash codes of the element pairs; don't "cycle", // because the order of the element pairs is not uniquely determined nat h=54321; for (iterator<pair<T,C> > it= iterate (t); busy (it); ++it) { pair<T,C> p= *it; nat key_h= V::key_op::hash_op (p.x1); nat val_h= Op::op (p.x2); h += (key_h << 5) ^ (key_h >> 27) ^ val_h; } return h; }
nat mmx::unary_hash | ( | const sparse_vector< C, T, V > & | v | ) |
nat mmx::unary_hash | ( | const pair< C1, C2 > & | p | ) |
sparse_vector<C,T,V> sparse_vector<C,T,V> mmx::unary_map | ( | const sparse_vector< C, T, V > & | v | ) |
Definition at line 175 of file sparse_vector.hpp.
References N(), n, Pair, and Sparse_vector.
Definition at line 750 of file vector.hpp.
References C, CF(), is_a_scalar(), N(), n, vector< C, V >::scalar(), seg(), T, and Unary_return_type().
{ typedef implementation<vector_linear,V> Vec; typedef Unary_return_type(Op,C) T; format<T> fm= unary_map<Op> (CF(v)); if (is_a_scalar (v)) return vector<T,V> (Op::op (v.scalar())); nat n= N(v); nat l= aligned_size<T,V> (n); T* r= mmx_formatted_new<T> (l, fm); Vec::template vec_unary<Op> (r, seg (v), n); return vector<T,V> (r, n, l, fm); }
format<typename unary_return_type_helper< Op , C >::RET > mmx::unary_map | ( | const format< C > & | fm | ) |
Definition at line 536 of file type_props.hpp.
References C, and Unary_return_type().
{ typedef Unary_return_type(Op,C) R; typedef typename format<R>::FT FT; return format_unary_map_helper<Op,FT,R,C>::op (fm); }
mmx::UNARY_RETURN_TYPE | ( | template< typename C, typename V > | , |
Re_op | , | ||
vector< C, V > | , | ||
vector< Real_type(C), V > | |||
) |
V Unary_return_type | ( | Op | , |
C | |||
) | const |
Referenced by unary_map().
mmx::UNARY_RETURN_TYPE | ( | template< typename C, typename V > | , |
center_op | , | ||
vector< C, V > | , | ||
vector< Center_type(C), V > | |||
) |
mmx::UNARY_RETURN_TYPE | ( | template< typename C, typename V > | , |
radius_op | , | ||
vector< C, V > | , | ||
vector< Radius_type(C), V > | |||
) |
mmx::UNARY_RETURN_TYPE | ( | template< typename C, typename V > | , |
abs_op | , | ||
vector< C, V > | , | ||
vector< Abs_type(C), V > | |||
) |
Definition at line 218 of file routine.hpp.
Referenced by accelerate(), accelerate_converter(), attach_generic_binary_assembler(), attach_generic_binary_reader(), define_type_helper< C >::def_type(), define(), define_constructor(), define_converter(), and define_user_type().
{ return new unary_routine_rep<D,S1> (name, fun); }
Definition at line 804 of file vector.hpp.
References ASSERT, extend(), is_a_scalar(), is_non_scalar(), N(), n, vector< C, V >::scalar(), and seg().
{ typedef implementation<vector_linear,V> Vec; if (is_a_scalar (v) || is_a_scalar (w)) { if (is_non_scalar (v)) return unary_set<Op> (v, extend (w, v)); else if (is_non_scalar (w)) v= extend (v, w); else { Op::set_op (v.scalar(), w.scalar()); return v; } } nat n= N(v); ASSERT (N(w) == n, "lengths don't match"); Vec::template vec_unary<Op> (seg (v), seg (w), n); return v; }
Definition at line 823 of file vector.hpp.
References is_a_scalar(), N(), n, vector< C, V >::scalar(), and seg().
Definition at line 204 of file mmx_texmacs.cpp.
References is_func().
Referenced by as_texmacs().
{ if (is_func (g, "$bracket", 3)) return g[2]; else return g; }
static string mmx::underlined | ( | const string & | file_name, |
const nat & | n, | ||
const source_position & | b, | ||
const source_position & | e | ||
) | [static] |
Definition at line 259 of file source_track.cpp.
References source_position::column, get_source(), source_position::line, line, and N().
Referenced by source_underlined().
{ // empty file_name means interactive input. In this only situation // n means the input number. n is not used for a regular file. nat j; string line; string sout; line = get_source (file_name, n, b.line); sout << line << "\n"; for (j=0; j < b.column; ++j) sout << " "; if (b.line == e.line) { for (; j < e.column; ++j) sout << "~"; } else { if (e.line == b.line+1 && e.column == 0) sout << "^"; else { for (; j < N(line); ++j) sout << "~"; sout << "\n"; if (e.column == 0) { if (e.line - 1 > b.line + 1) sout << "...\n"; line = get_source (file_name, n, e.line-1); sout << line << "\n"; for (j=0; j < N(line); ++j) sout << "~"; if (N(line) == 0) sout << "^"; } else { if (e.line > b.line + 1) sout << "...\n"; line = get_source (file_name, n, e.line); sout << line << "\n"; for (j=0; j < e.column; ++j) sout << "~"; } } } sout << "\n"; return sout; }
bool mmx::unequal_operator | ( | const T & | x, |
const T & | y | ||
) |
Definition at line 35 of file operators.hpp.
{ return x!=y; }
Replace "\\n", "\\t", and "\\b" respectively by "\n", "\t", and "\b".
Definition at line 463 of file string.cpp.
Referenced by unquote().
Definition at line 845 of file generic.cpp.
References current_ev.
{ return current_ev->apply ("uniform", x1, x2); }
double uniform_deviate | ( | const double & | lo, |
const double & | hi | ||
) |
Definition at line 17 of file double.cpp.
Referenced by GLUE_6().
{ double x= ((double) rand ()) / RAND_MAX; return lo + (hi - lo) * x; }
Definition at line 69 of file dynamic.cpp.
References as_string(), and hard_hash().
Referenced by flatten(), and output_observer_rep::modify().
Remove all the "..." and /"..."/ around s.
Definition at line 488 of file string.cpp.
References ends(), N(), s, starts(), and unescape().
Referenced by GLUE_20(), parse_lisp(), and scheme_to_tm().
Replace locase by upcase for first letter.
Definition at line 433 of file string.cpp.
References copy(), is_locase(), and N().
Referenced by GLUE_17().
Definition at line 1164 of file vector.hpp.
{
return unary_map<upper_op> (v); }
C mmx::upper | ( | const C & | x | ) | [inline] |
Definition at line 912 of file type_props.hpp.
Referenced by upper_op::Center_type(), and upper_op::set_op().
{ return x; }
string user_dir | ( | ) |
Definition at line 89 of file system.cpp.
References ASSERT, and get_env().
Referenced by eval_system(), init_system(), and load_path().
Definition at line 31 of file exception.cpp.
References exception, gen(), and GEN_EXCEPTION.
{ return as<generic> (exception (gen (GEN_EXCEPTION, as<generic> (msg), w))); }
Definition at line 84 of file generic_utils.cpp.
References as_generic(), and flatten().
Referenced by compare_sub(), and size().
{ return as_generic (flatten (g)); }
Definition at line 438 of file system.cpp.
References get_env(), init_system(), load_path(), n, N(), start, and var_load().
{ if ((N(file_name) > 0) && (file_name[0] == '/')) return var_load (file_name, s); nat i, n= N(file_path), start= 0; for (i=0; i<=n; i++) if ((i==n) || (file_path[i] == ':')) { string ss= file_path (start, i); if ((N(ss) > 0) && (ss[0] == '$')) { init_system (); if (ss == "$MMX_LOAD_PATH") ss= load_path (); else ss= get_env (ss (1, N(ss))); if (!var_load (ss, file_name, s)) return false; } else { if (ss == "") ss= "."; if (ss[N(ss)-1] != '/') ss= ss * "/"; if (!var_load (ss * file_name, s)) return false; } start= i+1; } return true; }
Definition at line 421 of file system.cpp.
References can_read(), error_flag(), and input_file_port().
Referenced by eval_system(), load(), and var_load().
{ port f= input_file_port (file_name); if (error_flag (f)) return true; char c; while (can_read (f) > 0) { f >> c; s << c; } return false; }
bool var_mkdir | ( | const string & | name | ) |
Definition at line 501 of file system.cpp.
References as_charp(), file_exists(), free_charp(), mkdir(), and system().
Referenced by init_system(), and mkdir().
{ #if defined (BASIX_HAVE_SYS_TYPES_H) && defined (BASIX_HAVE_SYS_STAT_H) if (file_exists (name)) return false; char* _name= as_charp (name); #if defined(__MINGW__) || defined(__MINGW32__) int r= ::mkdir (_name); ::chmod (_name, 744); #else int r= ::mkdir (_name, S_IRWXU + S_IRGRP + S_IROTH); #endif free_charp (_name); return r != 0; #else return system ("mkdir -m 744 -p " * orig_name) != 0; #endif }
vector<C> mmx::vec | ( | const C & | c1, |
const C & | c2, | ||
const C & | c3, | ||
const C & | c4, | ||
const C & | c5, | ||
const C & | c6, | ||
const C & | c7, | ||
const C & | c8 | ||
) |
Definition at line 446 of file vector.hpp.
References C, Format, and get_format().
Definition at line 408 of file vector.hpp.
References C, Format, and get_format().
vector<C> mmx::vec | ( | const C & | c1, |
const C & | c2, | ||
const C & | c3, | ||
const C & | c4, | ||
const C & | c5, | ||
const C & | c6, | ||
const C & | c7 | ||
) |
Definition at line 436 of file vector.hpp.
References C, Format, and get_format().
Definition at line 390 of file vector.hpp.
References C, Format, and get_format().
Definition at line 417 of file vector.hpp.
References C, Format, and get_format().
vector<C> mmx::vec | ( | const C & | c1, |
const C & | c2, | ||
const C & | c3, | ||
const C & | c4, | ||
const C & | c5, | ||
const C & | c6 | ||
) |
Definition at line 426 of file vector.hpp.
References C, Format, and get_format().
Definition at line 399 of file vector.hpp.
References C, Format, and get_format().
Definition at line 366 of file vector.hpp.
Referenced by apply(), as_texmacs(), compose(), cos_sin(), trig_op::diff_op(), and trig().
Definition at line 381 of file vector.hpp.
References C, Format, and get_format().
Definition at line 68 of file generic.cpp.
Referenced by void_binary_helper< table< C, T, V > >::access(), binary_helper< triple< C1, C2, C3 > >::assemble(), binary_helper< generic >::assemble(), and binary_helper< pair< C1, C2 > >::assemble().
{
return as<vector<generic> > (g) [i]; }
Definition at line 123 of file glue_vector_map.cpp.
References N(), and rebuild().
Referenced by glue_vector_map().
{ vector<generic> r; for (nat i=0; i<N(t); i++) r << t[i]; return rebuild (r); }
Definition at line 131 of file glue_vector_map.cpp.
References default_routine().
Referenced by glue_vector_map().
{ routine fun= is<routine> (f)? as<routine> (f): default_routine (f); return fun->apply (a); }
Definition at line 117 of file glue_vector_map.cpp.
References gen(), GEN_TUPLE, and vector_map().
Referenced by glue_vector_map().
{ generic r= vector_map (f, t); return as<generic> (tuple<generic> (gen (GEN_TUPLE))); }
Definition at line 99 of file glue_vector_map.cpp.
References ASSERT, compound_to_vector(), default_routine(), n, N(), rebuild(), vector_map_1(), vector_map_2(), and vector_map_n().
Referenced by glue_vector_map(), and vector_foreach().
{ routine fun= is<routine> (f)? as<routine> (f): default_routine (f); switch (N(t)) { case 0: ASSERT (N(t)>0, "wrong number of arguments"); case 1: return rebuild (vector_map_1 (fun, t[0])); case 2: return rebuild (vector_map_2 (fun, t[0], t[1])); default: { const vector<generic> a= compound_to_vector (*t); nat i, n= N(a)-1; vector<vector<generic> > b= fill<vector<generic> > (n); for (i=0; i<n; i++) b[i]= as<vector<generic> > (a[i+1]); return rebuild (vector_map_n (fun, b)); } } }
Definition at line 32 of file glue_vector_map.cpp.
References is_a_scalar(), mmout, N(), and n.
Referenced by vector_map().
{ if (is_a_scalar (v)) mmout << fun << ", " << v << "\n"; //mmout << fun << ", " << v << ", " << is_a_scalar (v) << "\n"; if (is_a_scalar (v)) return vector<generic> (fun->apply (v.scalar())); nat n= N(v); generic* r= mmx_new<generic> (n); for (nat i=0; i<n; i++) r[i]= fun->apply (v[i]); //mmout << " -> " << vector<generic> (r, n) << "\n"; return vector<generic> (r, n, format<generic> ()); }
vector<generic> mmx::vector_map_2 | ( | const routine & | fun, |
const vector< generic > & | v1, | ||
const vector< generic > & | v2 | ||
) |
Definition at line 45 of file glue_vector_map.cpp.
References ASSERT, extend(), is_a_scalar(), is_non_scalar(), n, N(), and vector< C, V >::scalar().
Referenced by vector_map().
{ if (is_a_scalar (v1) || is_a_scalar (v2)) { if (is_non_scalar (v1)) return vector_map_2 (fun, v1, extend (v2, v1)); if (is_non_scalar (v2)) return vector_map_2 (fun, extend (v1, v2), v2); return vector<generic> (fun->apply (v1.scalar(), v2.scalar())); } ASSERT (N (v1) == N (v2), "vectors of unequal lengths"); nat n= N(v1); generic* r= mmx_new<generic> (n); for (nat i=0; i<n; i++) r[i]= fun->apply (v1[i], v2[i]); return vector<generic> (r, n, format<generic> ()); }
Definition at line 62 of file glue_vector_map.cpp.
References arg(), ASSERT, is_a_scalar(), N(), and n.
Referenced by vector_map().
{ bool all_scalar= true, one_scalar= false; nat i, n= N(a), l= 0; for (i=0; i<n; i++) if (is_a_scalar (a[i])) one_scalar= true; else { if (all_scalar) l= N(a[i]); else ASSERT (N(a[i]) == l, "vectors of unequal lengths"); all_scalar= false; } if (all_scalar) { vector<generic> arg= fill<generic> (n); for (i=0; i<n; i++) arg[i]= a[i].scalar(); return vector<generic> (fun->apply (arg)); } if (one_scalar) { vector<vector<generic> > b= fill<vector<generic> > (n); for (i=0; i<n; i++) if (is_a_scalar (a[i])) b[i]= vector<generic> (a[i].scalar(), l); else b[i]= a[i]; return vector_map_n (fun, b); } generic* r= mmx_new<generic> (l); for (nat j=0; j<l; j++) { vector<generic> arg= fill<generic> (n); for (i=0; i<n; i++) arg[i]= a[i][j]; r[j]= fun->apply (arg); } return vector<generic> (r, l, format<generic> ()); }
Definition at line 65 of file generic.cpp.
References as(), is(), and N().
Referenced by void_binary_helper< table< C, T, V > >::size().
{ if (!is<vector<generic> > (g)) return 0; else return N(as<vector<generic> > (g)); }
Definition at line 139 of file glue_vector_map.cpp.
References copy(), and sort().
Referenced by glue_vector_map().
{ vector<generic> r= copy (v); sort (r); return r; }
Definition at line 153 of file glue_vector_map.cpp.
References copy(), current_comparison, and default_routine().
Referenced by glue_vector_map().
{ routine old_comparison= current_comparison; current_comparison= is<routine> (f)? as<routine> (f): default_routine (f); vector<generic> r= copy (v); sort_leq<vector_sort_leq_op> (r); current_comparison= old_comparison; return r; }
Definition at line 22 of file compound.cpp.
Referenced by access(), add_modes(), append(), apply(), cdr(), cons(), flatten(), parse_lisp(), range(), WRAP_BINARY_IMPL_1(), and xgen().
{ return as<generic> (compound (v)); }
generic void_value | ( | ) |
Definition at line 146 of file generic.cpp.
References gen(), GEN_TUPLE, and val.
Referenced by quintary_routine_rep< void, S1, S2, S3, S4, S5 >::apply(), quaternary_routine_rep< void, S1, S2, S3, S4 >::apply(), ternary_routine_rep< void, S1, S2, S3 >::apply(), binary_routine_rep< void, S1, S2 >::apply(), unary_routine_rep< void, S1 >::apply(), and nullary_routine_rep< void >::apply().
{ static generic val= as<generic> (tuple<generic> (gen (GEN_TUPLE))); return val; }
bool mmx::wait | ( | const port & | p, |
int | msec | ||
) | [inline] |
nat wait_port_event | ( | int | msecs | ) |
Definition at line 99 of file posix_port.cpp.
References busy(), entries(), in_count, and max().
Referenced by GLUE_22().
{ //mmout << "Global wait " << msecs << " ms\n"; int max_fd= 0; fd_set in_fds; FD_ZERO (&in_fds); for (iterator<int> it= entries (in_count); busy (it); ++it) { //mmout << " Setting " << (*it) << "\n"; FD_SET (*it, &in_fds); max_fd= max (max_fd, (*it) + 1); } nat nr; struct timeval tv; tv.tv_sec = msecs / 1000; tv.tv_usec = 1000 * (msecs % 1000); if (msecs < 0) nr= select (max_fd, &in_fds, NULL, NULL, NULL); else nr= select (max_fd, &in_fds, NULL, NULL, &tv); //mmout << "Received " << nr << "\n"; return nr; }
mmx::WRAP_BINARY_IMPL_1 | ( | template< typename C > | , |
row_tuple< C > | , | ||
generic | , | ||
"Rtu" | , | ||
"Row_tuple" | , | ||
C | |||
) | const |
Definition at line 52 of file row_tuple.hpp.
References GEN_ROW, N(), n, Row_tuple, and vector_to_compound().
{ nat i, n= N(a); vector<generic> t= fill<generic> (n+1); t[0]= GEN_ROW; for (i=0; i<n; i++) t[i+1]= as<generic> (a[i]); return Row_tuple (vector_to_compound (t)); }
mmx::WRAP_BINARY_IMPL_1 | ( | template< typename C > | , |
tuple< C > | , | ||
generic | , | ||
"Tu" | , | ||
"Tuple" | , | ||
C | |||
) | const |
Definition at line 50 of file tuple.hpp.
References GEN_TUPLE, N(), n, Tuple, and vector_to_compound().
{ nat i, n= N(a); vector<generic> t= fill<generic> (n+1); t[0]= GEN_TUPLE; for (i=0; i<n; i++) t[i+1]= as<generic> (a[i]); return Tuple (vector_to_compound (t)); }
mmx::WRAP_INDIRECT_IMPL | ( | template< typename C > | inline, |
alias< C > | |||
) |
Definition at line 62 of file alias.hpp.
References C, Full_type_name, gen(), and Short_type_name.
: public void_binary_helper<Alias > { static inline string short_type_name () { return "Al" * Short_type_name (C); } static inline generic full_type_name () { return gen ("Alias", Full_type_name (C)); } };
mmx::WRAP_INDIRECT_IMPL | ( | inline | , |
routine | |||
) | const |
mmx::WRAP_INDIRECT_IMPL | ( | template< typename C > | inline, |
row_tuple< C > | |||
) | const |
Definition at line 45 of file row_tuple.hpp.
References as_syntactic(), cdr(), compound_to_vector(), gen(), and GEN_ROW.
{ return as_syntactic (gen (GEN_ROW, cdr (compound_to_vector (*t)))); }
mmx::WRAP_INDIRECT_IMPL | ( | template< typename C > | inline, |
tuple< C > | |||
) | const |
mmx::WRAP_WRAPPED_IMPL | ( | template< typename C > | inline, |
generic_alias< C > | |||
) |
Definition at line 139 of file alias.hpp.
References ASSERT, C, get_genalias(), and set_genalias().
: public Alias_rep { generic_alias<C> a; C* temp; public: inline incarnate_alias_rep (const generic_alias<C>& a2): a (a2), temp (NULL) {} inline ~incarnate_alias_rep () { ASSERT (temp == NULL, "destruction while accessing alias"); } inline C get () const { return get_genalias (a); } inline C& open () const { incarnate_alias_rep<C>* me= const_cast<incarnate_alias_rep<C>*> (this); me->temp= mmx_new_one<C> (as<C> (get_genalias (a))); return *me->temp; } inline void close () const { incarnate_alias_rep<C>* me= const_cast<incarnate_alias_rep<C>*> (this); set_genalias (a, as<generic> (*temp)); mmx_delete_one<C> (me->temp); me->temp= NULL; } };
void write | ( | const port & | p, |
const char * | s, | ||
nat | n | ||
) | [inline] |
Definition at line 105 of file port.hpp.
References inside().
Referenced by generic_concrete_rep< C >::binary_write(), GLUE_16(), operator<<(), scheme_to_tm(), composite_port_rep::write(), binary_helper< string >::write(), and binary_helper< bool >::write().
void write | ( | const port & | p, |
const string & | s | ||
) | [inline] |
Definition at line 500 of file mmx_texmacs.cpp.
References ends(), N(), and n.
{ nat i, n=N(s); for (i=0; i<n; i++) { char c= s[i]; if (c == ' ' && ends (r, " ")) r << "\\ "; else if (c == '\n') r << "\\n"; else if (c == '\t') r << "\\t"; else if (c == '\0') r << "\\0"; else if (c == '\\') r << "\\\\"; else if (c == '<') r << "\\<"; else if (c == '|') r << "\\|"; else if (c == '>') r << "\\>"; else if (c == '\34') r << c; else if (((unsigned char) c) < ' ') r << '\\' << (c+'@'); else r << c; } }
Definition at line 36 of file exception.cpp.
References std_exception().
{ return std_exception ("wrong number of arguments", where); }
Definition at line 173 of file generic.cpp.
References comma(), GEN_ACCESS, and xgen().
{ return xgen (GEN_ACCESS, comma (f, args)); }
Definition at line 456 of file syntactic.cpp.
References GEN_XDERIVE, and syn().
{ return syn (GEN_XDERIVE, g, v); }
Definition at line 454 of file syntactic.cpp.
References GEN_XDERIVE, and syn().
Referenced by xderive_op::op(), and xderive_op::set_op().
{ return syn (GEN_XDERIVE, g); }
xgcd_matrix<generic> mmx::xgcd | ( | const generic & | x1, |
const generic & | x2 | ||
) |
Referenced by xgcd_op::op(), and xgcd_op::set_op().
Definition at line 387 of file syntactic.cpp.
References exact_eq(), GEN_ROW, GEN_SQTUPLE, and syn().
{ if (exact_eq (g1, 0)) return exact_eq (g2, 0) ? syn (GEN_SQTUPLE, syn (GEN_ROW, 1, 0 ), syn (GEN_ROW, 0, 1)) : syn (GEN_SQTUPLE, syn (GEN_ROW, 0, 1 / g2), syn (GEN_ROW, 1, 0)); return exact_eq (g2, 0) ? syn (GEN_SQTUPLE, syn (GEN_ROW, 1 / g1, 0), syn (GEN_ROW, 0 , 1 )) : syn (GEN_SQTUPLE, syn (GEN_ROW, 1 / g1, 0), syn (GEN_ROW, -g2, g1)); }
Definition at line 162 of file generic.cpp.
References vector_to_compound(), and xgen_sub().
Referenced by xaccess(), xrow(), xsqtuple(), and xtuple().
{ vector<generic> v; v << f; xgen_sub (v, args); return vector_to_compound (v); }
Definition at line 177 of file generic.cpp.
References GEN_SQTUPLE, and xgen().
Referenced by trig_op::op(), and trig().
{ return xgen (GEN_SQTUPLE, g); }
scalar_type_helper< T >::val mmx::zero_scalar | ( | const T & | y | ) | [inline] |
Definition at line 482 of file type_props.hpp.
References promote_scalar().
{ return promote_scalar ((int) 0, y); }
table<C,T,V> ADDITIVE_SCALAR_INT_SUGAR(template< typename C, typename T, typename V >, table< C, T, V >) STRICT_COMPARE_SUGAR(template< typename C |
char* alloc_mem |
size_t alloc_remains |
char alloc_table[(256+sizeof(void *))] |
string(* as_string_hook)(double x) = NULL |
Definition at line 160 of file string.cpp.
Referenced by as_string().
nat backtrace_depth = 8 |
Definition at line 20 of file source_track.cpp.
Referenced by source_exception().
table<generic,string> binary_readers [static] |
Definition at line 55 of file generic.cpp.
Referenced by attach_generic_binary_reader(), and binary_read_generic().
bool booting_done |
size_t bytes_in_use = 0 |
Referenced by mmx_used_bytes().
Definition at line 157 of file table.hpp.
Referenced by _mul_add(), accuracy_cst(), append(), big(), binary_map(), binary_map_optimized(), binary_map_scalar(), binpow(), bit_size(), catalan_cst(), cons(), copy(), invert_op::def(), binary_helper< symbol< C, V > >::disassemble(), euler_cst(), extract(), extract_mod(), fill(), binary_helper< vector< C, V > >::full_type_name(), binary_helper< table< C, T, V > >::full_type_name(), binary_helper< symbol< C, V > >::full_type_name(), binary_helper< sparse_vector< C, T, V > >::full_type_name(), binary_helper< list< C > >::full_type_name(), binary_helper< iterator< C > >::full_type_name(), binary_helper< heap< C > >::full_type_name(), binary_helper< chain< C > >::full_type_name(), fuzz_cst(), imaginary_cst(), INDIRECT_IMPL_1(), infinity_cst(), insert(), is_reliable(), largest_cst(), list< cleaner >::list(), log2_cst(), make_literal(), map(), maximal_cst(), minimal_cst(), mmx_classical_delete(), mmx_classical_new(), mmx_delete(), mmx_new(), nan_cst(), min_precision_op::neutral(), max_magnitude_op::neutral(), max_exponent_op::neutral(), sup_op::neutral(), inf_op::neutral(), max_op::neutral(), min_op::neutral(), lcm_op::neutral(), gcd_op::neutral(), prem_op::op(), lmul_op::op_mod(), rmul_op::op_mod(), mul_op::op_mod(), sub_op::op_mod(), add_op::op_mod(), neg_op::op_mod(), basic_alias_rep< C >::open(), pi_cst(), range(), binary_helper< vector< C, V > >::read(), binary_helper< table< C, T, V > >::read(), REP_STRUCT_1(), REP_STRUCT_2(), reverse(), format< cleaner >::sample(), seq(), swap_op::set_op(), binary_helper< vector< C, V > >::short_type_name(), binary_helper< table< C, T, V > >::short_type_name(), binary_helper< symbol< C, V > >::short_type_name(), binary_helper< sparse_vector< C, T, V > >::short_type_name(), binary_helper< list< C > >::short_type_name(), binary_helper< iterator< C > >::short_type_name(), binary_helper< heap< C > >::short_type_name(), binary_helper< chain< C > >::short_type_name(), smallest_cst(), string_as_numeric(), swap(), unary_map(), fast_helper< vector< C, V > >::uu(), vec(), implementation< vector_linear, V, vector_naive >::vec_reverse(), implementation< vector_abstractions, V, vector_naive >::vec_unary_big_dicho(), implementation< vector_abstractions_stride, V, vector_naive >::vec_unary_big_stride(), vector< observer >::vector(), WRAP_INDIRECT_IMPL(), and WRAP_WRAPPED_IMPL().
Definition at line 54 of file pair.hpp.
Referenced by binary_map(), binary_map_scalar(), binary_helper< triple< C1, C2, C3 > >::full_type_name(), binary_helper< pair< C1, C2 > >::full_type_name(), binary_helper< triple< C1, C2, C3 > >::read(), binary_helper< pair< C1, C2 > >::read(), binary_helper< triple< C1, C2, C3 > >::short_type_name(), and binary_helper< pair< C1, C2 > >::short_type_name().
Definition at line 59 of file triple.hpp.
Referenced by binary_helper< triple< C1, C2, C3 > >::full_type_name(), binary_helper< triple< C1, C2, C3 > >::read(), and binary_helper< triple< C1, C2, C3 > >::short_type_name().
generic CPP_ACCESS(".[]") |
Referenced by opname_table().
generic CPP_ALIAS_TYPE("Alias") |
Referenced by is_applicable(), and opname_table().
generic CPP_ARRAY_TYPE("Array") |
Referenced by opname_table().
Referenced by opname_table().
generic CPP_BITWISE_AND("/\\") |
Referenced by opname_table().
generic CPP_BITWISE_OR("\\/") |
Referenced by opname_table().
generic CPP_BITWISE_XOR("xor") |
Referenced by opname_table().
generic CPP_BOOL_TYPE("Boolean") |
generic CPP_BRACKETS("()") |
generic CPP_CHAR_TYPE("Char") |
generic CPP_CLASS_TYPE("Type") |
generic CPP_COMPLEMENT("~") |
Referenced by opname_table().
generic CPP_CONST_METHOD("const_method") |
generic CPP_CONSTRUCT("construct") |
generic CPP_CONSTRUCTOR("constructor") |
generic CPP_CONTINUE("continue") |
generic CPP_DELETE("delete") |
generic CPP_DESTRUCTOR("destructor") |
Referenced by opname_table().
generic CPP_EXTERN("extern") |
generic CPP_EXTERN_C("extern_C") |
generic CPP_FRIEND("friend") |
generic CPP_FUNCTION_TYPE("Function") |
Referenced by is_function_type().
Referenced by opname_table().
Referenced by opname_table().
generic CPP_GTRGTR(">>") |
Referenced by opname_table().
Referenced by is_applicable().
generic CPP_INHERIT("inherit") |
generic CPP_INITIALIZE("initialize") |
generic CPP_INLINE("inline") |
Referenced by is_function_type().
generic CPP_INT_TYPE("Int") |
Referenced by opname_table().
generic CPP_LESSEQ("<=") |
Referenced by opname_table().
generic CPP_LESSLESS("<<") |
Referenced by opname_table().
Referenced by opname_table().
Referenced by opname_table().
generic CPP_MMX_APPLICATION_TYPE("Mmx_application") |
Referenced by opname_table().
Referenced by opname_table().
generic CPP_NAMESPACE("namespace") |
Referenced by opname_table().
Referenced by is_applicable(), and opname_table().
Referenced by opname_table().
Referenced by opname_table().
Referenced by opname_table().
Referenced by opname_table().
generic CPP_POINTER_TYPE("Pointer") |
generic CPP_POSTDEC(".--") |
generic CPP_POSTINC(".++") |
generic CPP_PREDEC("--.") |
Referenced by opname_table().
generic CPP_PREINC("++.") |
Referenced by opname_table().
generic CPP_PUBLIC("public") |
generic CPP_RETURN("return") |
generic CPP_SEMICOLON(";") |
generic CPP_SPECIALIZE("specialize") |
Referenced by is_applicable().
generic CPP_STATIC("static") |
Referenced by is_function_type().
generic CPP_STRING_TYPE("String") |
generic CPP_STRUCT("struct") |
generic CPP_SWITCH("switch") |
generic CPP_TEMPLATE("template") |
Referenced by opname_table().
Referenced by opname_table().
generic CPP_TYPE_CONSTRUCTOR("type_constructor") |
Referenced by is_applicable().
generic CPP_TYPEDEF("typedef") |
generic CPP_UNALIAS("unalias") |
Referenced by is_applicable().
Referenced by opname_table().
generic CPP_UNFUNCTION("unfunction") |
generic CPP_UNPOINTER("unpointer") |
Referenced by is_applicable().
generic CPP_VERBATIM("verbatim") |
generic CPP_VIRTUAL("virtual") |
generic CPP_VOID_TYPE("Void") |
Referenced by is_applicable().
static routine current_comparison [static] |
Definition at line 114 of file glue_list_map.cpp.
Referenced by generic_compare(), list_sort(), vector_sort_leq_op::op(), and vector_sort_leq().
Definition at line 57 of file evaluator.cpp.
Referenced by abs(), acos(), acos_init(), additive_error(), all_type_names(), default_routine_rep::apply(), apply(), arg(), asin(), asin_init(), atan(), atan_init(), attach_generic_binary_assembler(), binary_assemble_generic(), blur(), ceil(), center(), change_precision(), compose(), conj(), construct(), convert(), cos(), decexp2(), define(), define_constant(), define_constructor(), define_converter(), define_primitive(), define_type_sub(), define_user_type(), denominator(), derive(), dilate(), elementary_error(), eval(), exp(), exponent(), generic_object_rep::expression(), floor(), gcd(), Im(), incexp2(), integrate(), integrate_init(), invert(), lcm(), log(), log_init(), lres(), lshiftz(), magnitude(), max(), min(), multiplicative_error(), next_above(), next_below(), numerator(), operator&(), operator*(), operator+(), operator-(), operator/(), operator<(), operator<<(), operator<=(), operator==(), operator>(), operator>=(), operator>>(), operator|(), pow(), precision(), prime(), quo(), radius(), Re(), rem(), restore_evaluator(), round(), rounding_error(), rres(), rshiftz(), select_evaluator(), sharpen(), sin(), solve(), solve_lde_init(), specialize(), sqrt(), sqrt_init(), square(), substitute(), tan(), trunc(), type_id(), type_name(), and uniform().
void(* dynamic_event)(const string &id, const generic &val) = NULL |
Definition at line 66 of file dynamic.cpp.
Referenced by output_observer_rep::modify().
void(* embedded_link)(const string &name) = NULL |
bool ev_lock = false |
Definition at line 56 of file evaluator.cpp.
class mmx::mutex exception |
table< vector<string>, string > file_sources [static] |
Definition at line 31 of file source_track.cpp.
Referenced by get_file_source(), and store_file_source().
bool frac_flag = false [static] |
Definition at line 241 of file syntactic.cpp.
Referenced by operator*(), operator/(), pow(), and set_frac_flag().
Referenced by abs(), abs_as_op::name(), and abs_op::name().
generic GEN_ACCESS(".[]") |
Referenced by access(), math_symbol_table(), access_op::name(), and xaccess().
generic GEN_ACCURACY("accuracy") |
Referenced by set_accuracy().
generic GEN_ADDITIVE_ERROR("additive_error") |
Referenced by additive_error(), and additive_error_op::name().
Referenced by define_type_helper< C >::def_type(), and define_user_type().
generic GEN_ALIAS_TYPE("Alias") |
Referenced by define_type_helper< C >::def_type(), define_user_type(), and get_user_type().
generic GEN_ALL_TYPES("all_types") |
Referenced by all_type_names(), and define_type_sub().
Referenced by both< T1, T2 >::lazy_value(), math_symbol_table(), and operator&().
generic GEN_APPEND("><") |
Referenced by math_symbol_table(), and append_op::name().
Referenced by default_routine_rep::apply().
generic GEN_ARCCOS("arccos") |
Referenced by accelerate(), acos(), and acos_op::name().
generic GEN_ARCSIN("arcsin") |
Referenced by accelerate(), asin(), and asin_op::name().
generic GEN_ARCTAN("arctan") |
Referenced by accelerate(), atan(), and atan_op::name().
generic GEN_ARCTAN2("arctan2") |
Referenced by accelerate(), atan2(), and atan2_op::name().
Referenced by arg(), and arg_op::name().
Referenced by accelerate(), acosh(), and acosh_op::name().
Referenced by accelerate(), asinh(), and asinh_op::name().
Referenced by accelerate(), atanh(), and atanh_op::name().
Referenced by is_C0(), mmx_printer::pp_E0(), and id_op::set_name().
generic GEN_ASSIGN_MACRO(":=>") |
Referenced by is_C0(), and mmx_printer::pp_E0().
generic GEN_ASSUME("assume") |
Referenced by is_C0(), and mmx_printer::pp_E0().
generic GEN_BACKPRIME(".`") |
generic GEN_BACKQUOTE("`") |
generic GEN_BACKTRACE("backtrace") |
Referenced by has_trace(), trace_pull(), trace_push(), and trace_top().
Referenced by ball_op::name().
Referenced by is_C0(), print_mmx(), and un_try_catch().
Referenced by blur_op::name().
generic GEN_BOOLEAN_TYPE("Boolean") |
Referenced by define_prerequisites().
generic GEN_CACHE_CONVERTER("cache/converter") |
generic GEN_CACHE_CONVERTERS("cache/converters") |
generic GEN_CACHE_PENALTY("cache/penalty") |
generic GEN_CACHED_DERIVE("%derive") |
Referenced by derive().
Referenced by accelerate().
generic GEN_CATALAN("mathcatalan") |
Referenced by math_symbol_table(), and set_catalan().
generic GEN_CATEGORY("category") |
Referenced by is_C0().
Referenced by cbrt_op::name().
Referenced by ceil(), and ceil_op::name().
generic GEN_CENTER("center") |
Referenced by center(), and center_op::name().
Referenced by accelerate(), cosh(), and cosh_op::name().
generic GEN_CHANGE_PRECISION("change_precision") |
Referenced by change_precision(), and change_precision_op::name().
generic GEN_CLASS_ACCESS("class/access") |
generic GEN_CLASS_ENCAPSULATION("class/encapsulation") |
generic GEN_CLASS_EXPORT("class/export") |
generic GEN_CLASS_FIELDS("class/fields") |
generic GEN_CLASS_MODE("class/mode") |
generic GEN_CLASS_NAME("class/name") |
generic GEN_CLOSURE("closure") |
generic GEN_COERCE("coerce") |
generic GEN_COERCE_TYPE("Coerce") |
Referenced by comma(), and xgen_sub().
generic GEN_COMPOSE("@") |
Referenced by compose(), math_symbol_table(), and compose_op::name().
generic GEN_COMPOUND_TYPE("Compound") |
Referenced by define_prerequisites().
Referenced by conj(), and conj_op::name().
generic GEN_CONSTANT("constant") |
Referenced by is_C0().
generic GEN_CONSTRUCTOR("constructor") |
generic GEN_CONTINUE("continue") |
Referenced by is_C0().
Definition at line 291 of file identifiers.hpp.
Referenced by convert().
generic GEN_CONVERTER("converter") |
generic GEN_CONVERTERS("converters") |
generic GEN_CONVERTS("~>") |
Referenced by accelerate(), cos(), and cos_op::name().
generic GEN_CROSS_TYPE("Cross") |
Referenced by is_C0(), and mmx_printer::pp_E0().
Referenced by is_C0(), and mmx_printer::pp_E0().
Referenced by math_symbol_table().
generic GEN_DENOMINATOR("denominator") |
Referenced by denominator(), and denominator_op::name().
generic GEN_DERIVATIVE("derivative") |
Referenced by math_symbol_table().
generic GEN_DERIVE("derive") |
Referenced by accelerate(), derive(), and derive_op::name().
generic GEN_DESTRUCTOR("destructor") |
Referenced by math_symbol_table(), rquo_op::name(), quo_op::name(), and quo().
Referenced by math_symbol_table().
generic GEN_DOUBLE_TYPE("Double") |
Referenced by define_prerequisites().
generic GEN_DOWNGRADE("downgrade") |
generic GEN_DOWNTO("downto") |
Referenced by math_symbol_table().
generic GEN_DUPLICATE("duplicate") |
Referenced by math_symbol_table().
generic GEN_ELEMENTARY_ERROR("elementary_error") |
Referenced by elementary_error(), and elementary_error_op::name().
generic GEN_EQUALIZE_GROUPED("equalize_grouped") |
Referenced by math_symbol_table().
Referenced by erf_op::name().
Referenced by math_symbol_table(), and set_euler().
generic GEN_EXACT_EQ("exact_eq") |
Referenced by exact_eq_op::name().
generic GEN_EXACT_HASH("exact_hash") |
Referenced by exact_hash_op::name().
generic GEN_EXACT_NEQ("exact_neq") |
Referenced by exact_neq_op::name().
generic GEN_EXCEPTION("exception") |
Referenced by has_trace(), std_exception(), trace_pull(), trace_push(), trace_top(), and user_exception().
generic GEN_EXISTS("exists") |
Referenced by is_C0(), and mmx_printer::pp_E0().
Referenced by accelerate(), exp(), and exp_op::name().
Referenced by exp10_op::name().
Referenced by exp2_op::name().
generic GEN_EXPECTED("expected") |
generic GEN_EXPLODE("@") |
generic GEN_EXPONENT("exponent") |
Referenced by exponent(), and exponent_op::name().
generic GEN_EXPORT("export") |
generic GEN_EXTERN("extern") |
Referenced by is_C0().
generic GEN_FACTORIAL(".!") |
Referenced by math_symbol_table().
Referenced by define_prerequisites().
Referenced by fast_op::name().
generic GEN_FLATTEN("flatten") |
Referenced by define_type_helper< C >::def_default(), define_user_type(), and generic_object_rep::expression().
generic GEN_FLOATING_TYPE("Floating") |
Referenced by floor(), and floor_op::name().
generic GEN_FORALL("forall") |
Referenced by is_C0(), and mmx_printer::pp_E0().
generic GEN_FOREIGN("foreign") |
Referenced by is_C0().
generic GEN_FUNCTION_TYPE("Function") |
Referenced by routine_rep::function_type().
Referenced by set_fuzz().
Referenced by gamma_op::name().
generic GEN_GAUSSIAN("gaussian") |
Referenced by gaussian_op::name().
Referenced by gcd(), and gcd_op::name().
generic GEN_GENERATE("generate") |
generic GEN_GENERATOR_TYPE("Generator") |
generic GEN_GENERIC_ALIAS_TYPE("Generic_alias") |
Referenced by define_type_helper< C >::def_type(), and get_user_type().
generic GEN_GENERIC_TYPE("Generic") |
Referenced by define_prerequisites(), and define_user_type().
generic GEN_GLOBAL("global") |
generic GEN_GRAEFFE("graeffe") |
Referenced by graeffe_op::name().
Referenced by accelerate(), math_symbol_table(), gtr_op::name(), and operator>().
Referenced by accelerate(), math_symbol_table(), gtreq_op::name(), and operator>=().
generic GEN_GTRGTR(">>") |
Referenced by math_symbol_table(), and operator>>().
Referenced by is_C0(), and mmx_printer::pp_E0().
generic GEN_HARD_EQ("hard_eq") |
Referenced by hard_eq_op::name().
generic GEN_HARD_GTR("hard_gtr") |
Referenced by hard_gtr_op::name().
generic GEN_HARD_HASH("hard_hash") |
Referenced by hard_hash_op::name().
generic GEN_HARD_LESS("hard_less") |
Referenced by hard_less_op::name().
generic GEN_HARD_NEQ("hard_neq") |
Referenced by hard_neq_op::name().
Referenced by has< T, Op >::lazy_value().
Referenced by hash_op::name().
Referenced by accelerate(), hypot(), and hypot_op::name().
Referenced by math_symbol_table(), and set_imaginary().
generic GEN_IDENTITY("identity") |
Referenced by compose(), and id_op::name().
Referenced by Im(), and Im_op::name().
generic GEN_IMPLIES("=>") |
Referenced by math_symbol_table().
generic GEN_IMPORT("import") |
Referenced by math_symbol_table().
Referenced by inf_op::name().
generic GEN_INFINITY("Infty") |
Referenced by math_symbol_table(), set_infinity(), set_maximal(), and set_minimal().
generic GEN_INLINE("inline") |
generic GEN_INPLACE("inplace") |
generic GEN_INT_TYPE("Int") |
Referenced by define_prerequisites().
generic GEN_INTEGER_TYPE("Integer") |
generic GEN_INTEGRATE("integrate") |
Referenced by accelerate(), integrate(), and integrate_op::name().
generic GEN_INTERN("intern") |
Referenced by is_C0().
generic GEN_INTERVAL("interval") |
Referenced by interval_op::name().
Referenced by accelerate_converter(), define_converter(), define_user_type(), and math_symbol_table().
generic GEN_INVERT("invert") |
Referenced by accelerate(), and invert_op::name().
generic GEN_KEYWORD("keyword") |
generic GEN_LAMBDA("lambda") |
Referenced by is_C0().
generic GEN_LARGEST("largest") |
Referenced by set_largest().
Referenced by lcm(), and lcm_op::name().
Referenced by accelerate(), math_symbol_table(), less_op::name(), and operator<().
generic GEN_LESSEQ("<=") |
Referenced by accelerate(), math_symbol_table(), lesseq_op::name(), and operator<=().
generic GEN_LESSLESS("<<") |
Referenced by math_symbol_table(), and operator<<().
Referenced by is_C0(), and mmx_printer::pp_E0().
Referenced by lift_op::name().
generic GEN_LITERAL_TYPE("Literal") |
Referenced by define_prerequisites().
Referenced by accelerate(), log(), and log_op::name().
Referenced by log10_op::name().
Referenced by log2_op::name().
generic GEN_LOG2_AS("set_log2") |
Referenced by lower_op::name().
generic GEN_MACRO_TYPE("Macro") |
Referenced by define_prerequisites().
generic GEN_MAGNITUDE("magnitude") |
Referenced by magnitude(), and magnitude_op::name().
generic GEN_MAPSTO(":->") |
Referenced by math_symbol_table().
Referenced by max(), and max_op::name().
generic GEN_METHOD("method") |
Referenced by is_C0().
Referenced by min(), and min_op::name().
Referenced by is_C0(), mmx_printer::pp_E0(), and sub_op::set_name().
Referenced by math_symbol_table(), rrem_op::name(), rem_op::name(), and rem().
generic GEN_MODULE("module") |
Referenced by is_C0().
generic GEN_MUL_ADD("mul_add") |
Referenced by lmul_add_op::name(), rmul_add_op::name(), and mul_add_op::name().
generic GEN_MUL_SUB("mul_sub") |
Referenced by mul_sub_op::name().
generic GEN_MULTIPLICATIVE_ERROR("multiplicative_error") |
Referenced by multiplicative_error(), and multiplicative_error_op::name().
generic GEN_MUTABLE("mutable") |
Referenced by is_C0().
Referenced by define_constructor().
generic GEN_NEXT_ABOVE("next_above") |
Referenced by next_above().
generic GEN_NEXT_BELOW("next_below") |
Referenced by next_below().
Referenced by no_op::set_name().
Referenced by math_symbol_table().
generic GEN_NUMERATOR("numerator") |
Referenced by numerator_op::name(), and numerator().
generic GEN_OPERATOR("operator") |
Referenced by math_symbol_table(), and operator|().
Referenced by is_C0(), mmx_printer::pp_E0(), and div_op::set_name().
generic GEN_PARTIAL("partial") |
Referenced by math_symbol_table().
generic GEN_PENALTY("penalty") |
Referenced by is_C0(), and mmx_printer::pp_E0().
Referenced by math_symbol_table(), and set_pi().
Referenced by accelerate(), as_texmacs(), collect(), math_symbol_table(), migrate_negate(), ladd_op::name(), radd_op::name(), add_op::name(), operator+(), operator-(), and serialize().
Referenced by is_C0(), mmx_printer::pp_E0(), and add_op::set_name().
Referenced by polar_op::name().
generic GEN_POSTFIX("postfix") |
Referenced by accelerate(), math_symbol_table(), lpow_op::name(), pow_op::name(), product_less_op::op(), pow(), and square().
generic GEN_PRECISION("precision") |
Referenced by precision_op::name(), and precision().
generic GEN_PREFIX("prefix") |
Referenced by math_symbol_table().
generic GEN_PRIVATE("private") |
Referenced by is_C0().
generic GEN_PROJECT("project") |
Referenced by project_op::name().
generic GEN_PUBLIC("public") |
Referenced by is_C0().
generic GEN_RADIUS("radius") |
Referenced by radius_op::name(), and radius().
Referenced by math_symbol_table().
generic GEN_RATIONAL_TYPE("Rational") |
Referenced by Re_op::name(), and Re().
generic GEN_RETURN("return") |
Referenced by is_C0().
generic GEN_REVERSE("reverse") |
Referenced by reverse_op::name().
generic GEN_REWRITE("rewrite") |
Referenced by define_type_helper< C >::def_type(), and define_user_type().
Referenced by round_op::name(), and round().
generic GEN_ROUNDING_ERROR("rounding_error") |
Referenced by rounding_error_op::name(), and rounding_error().
generic GEN_ROUTINE_TYPE("Routine") |
Referenced by define_prerequisites().
Referenced by as_math(), make_document(), make_row(), math_symbol_table(), WRAP_BINARY_IMPL_1(), WRAP_INDIRECT_IMPL(), xgcd(), and xrow().
Referenced by math_symbol_table().
generic GEN_SEMICOLON(";") |
generic GEN_SEQAND("and") |
Referenced by math_symbol_table().
Referenced by math_symbol_table().
Referenced by accelerate(), sinh_op::name(), and sinh().
generic GEN_SHARPEN("sharpen") |
Referenced by sharpen_op::name().
Referenced by sign_op::name(), and sign_op::op().
Referenced by accelerate(), sin_op::name(), and sin().
generic GEN_SINGLE_TYPE("Single") |
Referenced by math_symbol_table().
Referenced by slow_op::name().
generic GEN_SMALLEST("smallest") |
Referenced by set_smallest().
generic GEN_SPECIALIZE("specialize") |
Referenced by define_type_helper< C >::def_type(), and define_user_type().
generic GEN_SPECIALIZE_ALIAS("specialize_alias") |
Referenced by accelerate(), sqrt_op::name(), pow(), and sqrt().
generic GEN_SQTUPLE("[]") |
Referenced by as_math(), flatten(), math_symbol_table(), trig(), xgcd(), and xsqtuple().
generic GEN_SQUARE("square") |
Referenced by accelerate(), and square_op::name().
generic GEN_SUBSTITUTE("substitute") |
Referenced by substitute().
Referenced by sup_op::name().
generic GEN_SYMBOL_TYPE("Symbol") |
Referenced by accelerate(), tan_op::name(), and tan().
Referenced by accelerate(), tanh_op::name(), and tanh().
generic GEN_THIS_TYPE("This") |
Referenced by accelerate(), math_symbol_table(), lmul_op::name(), rmul_op::name(), mul_op::name(), sum_less_op::op(), operator*(), signed_decompose(), and square().
Referenced by is_C0(), mmx_printer::pp_E0(), and mul_op::set_name().
Referenced by math_symbol_table().
generic GEN_TRANSITIVE("transitive") |
generic GEN_TRANSTYPE(":>") |
Referenced by math_symbol_table().
Referenced by define_prerequisites().
Referenced by trunc_op::name(), and trunc().
Referenced by flatten(), list_foreach(), math_symbol_table(), vector_foreach(), void_value(), WRAP_BINARY_IMPL_1(), and xtuple().
generic GEN_TUPLE_TYPE("Tuple") |
Referenced by define_type_helper< C >::def_type(), and get_user_type().
Referenced by composite_port_rep::expression().
generic GEN_TYPE_ID("type_id") |
Referenced by define_type_sub(), and type_id().
generic GEN_TYPE_NAME("type_name") |
Referenced by define_type_sub(), and type_name().
generic GEN_TYPE_TYPE("Type") |
generic GEN_UNALIAS("unalias") |
Referenced by define_type_helper< C >::def_type(), and define_user_type().
generic GEN_UNSPECIFIED_TYPE("Unspecified") |
Referenced by type_name().
generic GEN_UPGRADE("upgrade") |
Referenced by upper_op::name().
generic GEN_VIA_TUPLE("via_tuple") |
generic GEN_VOID_TYPE("Void") |
generic GEN_VWHERE("||") |
Referenced by math_symbol_table().
Referenced by math_symbol_table().
generic GEN_XDERIVE("xderive") |
Referenced by xderive_op::name(), and xderive().
Referenced by math_symbol_table().
Referenced by zeta_op::name().
table<void (*) (), string> glue_table)() [static] |
Definition at line 108 of file glue.cpp.
Referenced by call_glue(), and register_glue().
{ static table<void (*) (), string> t; return t; }
triple<C1,C2,C3> HARD_IDENTITY_OP_SUGAR(template< typename C1, typename C2, typename C3 >, triple< C1, C2, C3 >) template< typename C1 |
Definition at line 28 of file posix_port.cpp.
Referenced by posix_port_rep::posix_port_rep(), wait_port_event(), and posix_port_rep::~posix_port_rep().
static nat indentation_level = 0 [static] |
Definition at line 190 of file cpp_printer.cpp.
Referenced by cpp_printer::cpp_printer(), and operator<<().
vector< vector<string> > interactive_sources [static] |
Definition at line 30 of file source_track.cpp.
Referenced by get_interactive_number(), get_interactive_source(), store_interactive_number(), and store_interactive_source().
bool math_mode = false |
Definition at line 21 of file port.cpp.
Referenced by output_as_mmx().
Definition at line 26 of file threads.cpp.
Referenced by mmx_free_thread_safe(), mmx_malloc_thread_safe(), and mmx_realloc_thread_safe().
Definition at line 72 of file port.hpp.
Referenced by port_rep::accept(), routine_rep::apply(), binary_assemble_generic(), binary_read_generic(), port_rep::component(), cpp_demangle(), port_rep::format(), glue_port(), operator<<(), port_rep::read(), source_error(), texmacs_to_scheme(), and port_rep::write().
Definition at line 91 of file file_port.cpp.
Referenced by glue_port().
Definition at line 71 of file port.hpp.
Referenced by fatal_error(), glue_port(), replace_lf(), REP_STRUCT< C >::show_symbol_entries(), and vector_map_1().
bool mmx_abbreviate_coerce = true |
Definition at line 23 of file mmx_printer.cpp.
bool new_lambda_style |
Definition at line 58 of file dynamic.hpp.
Referenced by argument_observer(), output_observer(), and result_observer().
Definition at line 27 of file posix_port.cpp.
Referenced by posix_port_rep::posix_port_rep(), and posix_port_rep::~posix_port_rep().
Definition at line 151 of file function.hpp.
Referenced by map().
Definition at line 244 of file function.hpp.
Definition at line 296 of file function.hpp.
Definition at line 348 of file function.hpp.
Definition at line 400 of file function.hpp.
Definition at line 452 of file function.hpp.
Definition at line 504 of file function.hpp.
Definition at line 556 of file function.hpp.
Definition at line 58 of file evaluator.cpp.
Referenced by restore_evaluator(), and select_evaluator().
vector<C,V> STRICT_COMPARE_SUGAR(template< typename C, typename V >, vector< C, V >) ARITH_SCALAR_INT_SUGAR(template< typename C |
Definition at line 86 of file system.cpp.
Definition at line 97 of file sparse_vector.hpp.
Referenced by binary_map(), binary_map_scalar(), as_helper< vector< T, TV >, vector< F, FV > >::cv(), binary_helper< table< C, T, V > >::full_type_name(), binary_helper< format< T > >::full_type_name(), global_type_id(), zero_op::op(), promote(), promote_scalar(), binary_helper< table< C, T, V > >::read(), REP_STRUCT_2(), set_as(), binary_helper< table< C, T, V > >::short_type_name(), binary_helper< format< T > >::short_type_name(), sort_leq(), and unary_map().
bool texmacs_mode = false |
string texmacs_pending = "" [static] |
Definition at line 33 of file mmx_texmacs.cpp.
Referenced by texmacs_command(), and texmacs_flush_commands().
bool the_series_expr = false |
Definition at line 496 of file syntactic.cpp.
nat the_series_prec = 10 |
Definition at line 494 of file syntactic.cpp.
nat the_series_zt = 25 |
Definition at line 495 of file syntactic.cpp.
const bool threads_active = false [static] |
Definition at line 97 of file fast_new.hpp.
Referenced by mmx_free(), mmx_malloc(), and mmx_realloc().
nat threads_number = 1 |
Definition at line 216 of file threads.cpp.
Definition at line 168 of file sparse_vector.hpp.
Referenced by default_aligned_size(), and solve_vector_lde_op::diff_op().
Definition at line 87 of file dynamic.hpp.
Referenced by apply(), as_int(), assign(), binary_assemble_generic(), contents(), sqrt_op::def(), quo_op::def(), div_op::def(), evaluator_rep::get(), basic_alias_rep< C >::get(), global_alias_rep< C >::get(), init(), make_ball(), make_interval(), N(), basic_alias_rep< C >::open(), global_alias_rep< C >::open(), evaluator_rep::overload(), REP_STRUCT_1(), evaluator_rep::set(), set_alias(), specialize_alias(), string_as_numeric(), string_to_numeric(), texmacs_dynamic_event(), updater_rep::update(), void_value(), and with_rounding< C, Mode >::with_rounding().