mmx Namespace Reference

Classes

Typedefs

Enumerations

Functions



Variables


Typedef Documentation

typedef char* char_ptr

Definition at line 60 of file defaults.hpp.

typedef char* charp

Definition at line 129 of file port.hpp.

typedef const char* const_charp

Definition at line 130 of file port.hpp.

typedef long int double_int

Definition at line 31 of file int.hpp.

typedef unsigned int nat

Definition at line 49 of file fast_new.hpp.

typedef pow_op rpow_op

Definition at line 1301 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 &)

Definition at line 256 of file port.hpp.

typedef unsigned short ushort

Definition at line 51 of file fast_new.hpp.

typedef routine* vec_routine

Definition at line 487 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.


Enumeration Type Documentation

Enumerator:
MMX_ROUND_NEAR 
MMX_ROUND_ZERO 
MMX_ROUND_UP 
MMX_ROUND_DOWN 

Definition at line 1029 of file type_props.hpp.

01029                   {
01030   MMX_ROUND_NEAR,
01031   MMX_ROUND_ZERO,
01032   MMX_ROUND_UP,
01033   MMX_ROUND_DOWN
01034 };

Enumerator:
LF 
INDENT 
UNINDENT 
LF 
INDENT 
VARINDENT 
UNINDENT 

Definition at line 85 of file mmx_printer.cpp.

00085 { LF, INDENT, VARINDENT, UNINDENT };

Enumerator:
LF 
INDENT 
UNINDENT 
LF 
INDENT 
VARINDENT 
UNINDENT 

Definition at line 191 of file cpp_printer.cpp.

00191 { LF, INDENT, UNINDENT };

Special objects that affect output when printed.

Enumerator:
blank 

Set one indentation to two spaces.

stroke 

Set one indentation to "| ".

indent 

Increment indentation.

unindent 

Decrement indentation.

reset_indent 

Reset indentation to zero.

cr 

Carriage return.

lf 

Line feed and indent the new line.

hrule 

Output 80 consecutive dashes.

flush_now 

Flush the buffer.

black_foreground 
red_foreground 
green_foreground 
yellow_foreground 
blue_foreground 
magenta_foreground 
cyan_foreground 
white_foreground 
black_background 
red_background 
green_background 
yellow_background 
blue_background 
magenta_background 
cyan_background 
white_background 
bold 
underline 
blink 
reset_attributes 

Definition at line 38 of file basix.hpp.

00038                   {
00039   blank,         
00040   stroke,        
00041   indent,        
00042   unindent,      
00043   reset_indent,  
00044   cr,            
00045   lf,            
00046   hrule,         
00047   flush_now,      
00048 
00049   black_foreground,
00050   red_foreground,
00051   green_foreground,
00052   yellow_foreground,
00053   blue_foreground,
00054   magenta_foreground,
00055   cyan_foreground,
00056   white_foreground,
00057 
00058   black_background,
00059   red_background,
00060   green_background,
00061   yellow_background,
00062   blue_background,
00063   magenta_background,
00064   cyan_background,
00065   white_background,
00066 
00067   bold,
00068   underline,
00069   blink,
00070 
00071   reset_attributes
00072 };


Function Documentation

static string mmx::_from_dos_to_unix ( const string x  )  [static]

Definition at line 61 of file system.cpp.

Referenced by command_dir(), decode_name(), global_path(), load_path(), path_name(), prefix_dir(), sysconf_dir(), user_dir(), var_load(), and var_pwd().

00061                                     {
00062   return x;
00063 }

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 
) [inline]

Definition at line 313 of file sparse_vector.hpp.

References C, exact_eq(), n, N(), Pair, set_zero(), and Sparse_vector.

00313                                                                         {
00314   // v1 + x * v2
00315   typedef typename V::val_op Eq;
00316   typedef typename V::l_op Less;
00317   static C zero; set_zero (zero);
00318   if (exact_eq (x, zero)) return v1;
00319   nat i1, i2, n1= N(v1), n2= N(v2), j, n= n1 + n2;
00320   Pair* r= mmx_new<Pair > (n);
00321   for (i1= i2= j= 0; i1 < n1 && i2 < n2; ) {
00322     if (Less::op (v1[i1].x1, v2[i2].x1)) {
00323       r[j++]= v1[i1]; i1++;
00324     }
00325     else if (Less::op (v2[i2].x1, v1[i1].x1)) {
00326       r[j++]= Pair (v2[i2].x1, Mul::op (x, v2[i2].x2)); i2++;
00327     }
00328     else {
00329       Pair e (v2[i2].x1, v1[i1].x2 + Mul::op (x, v2[i2].x2));
00330       i1++; i2++; if (Eq::not_op (e.x2, zero)) r[j++]= e;
00331     }
00332   }
00333   while (i1 < n1) {
00334     r[j++]= Pair (v1[i1].x1, v1[i1].x2); i1++;
00335   }
00336   while (i2 < n2) {
00337     r[j++]= Pair (v2[i2].x1,  Mul::op (x, v2[i2].x2)); i2++;
00338   }
00339   return Sparse_vector (r, j, n);
00340 }

vector<typename unary_return_type_helper<abs_op, C >::RET,V> mmx::abs ( const vector< C, V > &  v  )  [inline]

Definition at line 1340 of file vector.hpp.

01340 { return unary_map<abs_op> (v); }

syntactic abs ( const syntactic g1  ) 

Definition at line 452 of file syntactic.cpp.

References GEN_ABS, and syn().

00452 { return syn (GEN_ABS, g1); }

generic abs ( const generic x1  ) 

Definition at line 730 of file generic.cpp.

References current_ev, and GEN_ABS.

00730                                 {
00731   return current_ev->apply (GEN_ABS, x1); }

long long unsigned int mmx::abs ( const long long unsigned int &  x  )  [inline]

Definition at line 474 of file defaults.hpp.

00474 { return x; }

long unsigned int mmx::abs ( const long unsigned int &  x  )  [inline]

Definition at line 471 of file defaults.hpp.

00471 { return x; }    

unsigned int mmx::abs ( const unsigned int &  x  )  [inline]

Definition at line 468 of file defaults.hpp.

00468 { return x; }    

short unsigned int mmx::abs ( const short unsigned int &  x  )  [inline]

Definition at line 465 of file defaults.hpp.

00465 { return x; }    

unsigned char mmx::abs ( const unsigned char &  x  )  [inline]

Definition at line 462 of file defaults.hpp.

00462 { return x; }    

C mmx::abs ( const C &  x  )  [inline]
unary_return_type_helper<abs_op, C >::RET mmx::abs_down ( const C &  x  )  [inline]

Definition at line 1096 of file type_props.hpp.

References abs().

01096 { return abs (x); }

unary_return_type_helper<abs_op, C >::RET mmx::abs_up ( const C &  x  )  [inline]

Definition at line 1098 of file type_props.hpp.

References abs().

01098 { return abs (x); }

U mmx::abstract_to_concrete ( const T &  g  )  [inline]

Definition at line 192 of file mmc_glue.hpp.

00192                                   {
00193   return generic_as_any<U> (g);
00194 }

vector<generic> mmx::abstract_vector ( const generic conc  )  [inline]

Definition at line 299 of file vector.hpp.

00299                                       {
00300   return as<vector<generic> > (conc->make_abstract_vector ());
00301 }

void mmx::accelerate ( const generic ,
bool(*)(const bool &, const bool &)   
) [inline]

Definition at line 163 of file glue.hpp.

00163 {}

void mmx::accelerate ( const generic name,
bool(*)(const C &, const C &)  f 
) [inline]

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.

00150                                                                  {
00151   routine fun= binary_routine (name, f);
00152   if (name == GEN_LESS)
00153     Acc::set_apply (ACC_LESS, fun);
00154   else if (name == GEN_LESSEQ)
00155     Acc::set_apply (ACC_LESSEQ, fun);
00156   else if (name == GEN_GTR)
00157     Acc::set_apply (ACC_GTR, fun);
00158   else if (name == GEN_GTREQ)
00159     Acc::set_apply (ACC_GTREQ, fun);
00160 }

void mmx::accelerate ( const generic name,
C(*)(const C &, const C &)  f 
) [inline]

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.

00131                                                               {
00132   routine fun= binary_routine (name, f);
00133   if (name == GEN_PLUS)
00134     Acc::set_apply (ACC_ADD, fun);
00135   else if (name == GEN_MINUS)
00136     Acc::set_apply (ACC_SUB, fun);
00137   else if (name == GEN_TIMES)
00138     Acc::set_apply (ACC_MUL, fun);
00139   else if (name == GEN_OVER)
00140     Acc::set_apply (ACC_DIV, fun);
00141   else if (name == GEN_HYPOT)
00142     Acc::set_apply (ACC_HYPOT, fun);
00143   else if (name == GEN_ARCTAN2)
00144     Acc::set_apply (ACC_ATAN2, fun);
00145   else if (name == GEN_POWER)
00146     Acc::set_apply (ACC_POW, fun);
00147 }

void mmx::accelerate ( const generic ,
C(*)(const S1 &, const S2 &)   
) [inline]

Definition at line 128 of file glue.hpp.

00128 {}

void mmx::accelerate ( const generic name,
C(*)(const C &)  f 
) [inline]

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().

00083                                                     {
00084   routine fun= unary_routine (name, f);
00085   if (name == GEN_MINUS)
00086     Acc::set_apply (ACC_NEGATE, fun);
00087   else if (name == GEN_SQUARE)
00088     Acc::set_apply (ACC_SQUARE, fun);
00089   else if (name == GEN_INVERT)
00090     Acc::set_apply (ACC_INVERT, fun);
00091   else if (name == GEN_SQRT)
00092     Acc::set_apply (ACC_SQRT, fun);
00093   else if (name == GEN_EXP)
00094     Acc::set_apply (ACC_EXP, fun);
00095   else if (name == GEN_LOG)
00096     Acc::set_apply (ACC_LOG, fun);
00097   else if (name == GEN_COS)
00098     Acc::set_apply (ACC_COS, fun);
00099   else if (name == GEN_SIN)
00100     Acc::set_apply (ACC_SIN, fun);
00101   else if (name == GEN_TAN)
00102     Acc::set_apply (ACC_TAN, fun);
00103   else if (name == GEN_CH)
00104     Acc::set_apply (ACC_COSH, fun);
00105   else if (name == GEN_SH)
00106     Acc::set_apply (ACC_SINH, fun);
00107   else if (name == GEN_TH)
00108     Acc::set_apply (ACC_TANH, fun);
00109   else if (name == GEN_ARCCOS)
00110     Acc::set_apply (ACC_ACOS, fun);
00111   else if (name == GEN_ARCSIN)
00112     Acc::set_apply (ACC_ASIN, fun);
00113   else if (name == GEN_ARCTAN)
00114     Acc::set_apply (ACC_ATAN, fun);
00115   else if (name == GEN_ARGCH)
00116     Acc::set_apply (ACC_ACOSH, fun);
00117   else if (name == GEN_ARGSH)
00118     Acc::set_apply (ACC_ASINH, fun);
00119   else if (name == GEN_ARGTH)
00120     Acc::set_apply (ACC_ATANH, fun);
00121   else if (name == GEN_DERIVE)
00122     Acc::set_apply (ACC_DERIVE, fun);
00123   else if (name == GEN_INTEGRATE)
00124     Acc::set_apply (ACC_INTEGRATE, fun);
00125 }

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().

00077                                                      {
00078   if (name == GEN_CAST)
00079     accelerate_converter (name, f);
00080 }

void mmx::accelerate_converter ( const generic ,
int(*)(const generic_alias< S > &)   
) [inline]

Definition at line 74 of file glue.hpp.

00074 {}

void mmx::accelerate_converter ( const generic ,
int(*)(const alias< S > &)   
) [inline]

Definition at line 72 of file glue.hpp.

00072 {}

void mmx::accelerate_converter ( const generic ,
int(*)(const S &)   
) [inline]

Definition at line 70 of file glue.hpp.

00070 {}

void mmx::accelerate_converter ( const generic ,
C(*)(const generic_alias< S > &)   
) [inline]

Definition at line 68 of file glue.hpp.

00068 {}

void mmx::accelerate_converter ( const generic ,
C(*)(const alias< S > &)   
) [inline]

Definition at line 66 of file glue.hpp.

00066 {}

void mmx::accelerate_converter ( const generic name,
C(*)(const S1 &)  f 
) [inline]

Definition at line 56 of file glue.hpp.

References gen(), GEN_INTO, and unary_routine().

Referenced by accelerate(), and define_converter().

00056                                                                {
00057   (void) name;
00058   accelerate_initialize<C> ();
00059   accelerate_initialize<S1> ();
00060   generic con= gen (GEN_INTO, type_name<S1> (), type_name<C> ());
00061   routine fun= unary_routine (con, f);
00062   Acc::set_construct (accelerator<S1>::id, fun);
00063 }

void mmx::accelerate_initialize (  )  [inline]

Definition at line 50 of file glue.hpp.

References accelerate_number().

00050                          {
00051   if (Acc::id == ((nat) (-1)))
00052     Acc::id= accelerate_number ();
00053 }

nat accelerate_number (  ) 

Definition at line 99 of file glue.cpp.

Referenced by accelerate_initialize().

00099                      {
00100   static nat nr_ids= 0;
00101   return nr_ids++;
00102 }

port mmx::accept ( const port &  p  )  [inline]

Definition at line 119 of file port.hpp.

References inside().

Referenced by GLUE_20().

00119                                    {
00120   return inside (p)->accept (); }

syntactic access ( const syntactic g,
const syntactic i,
const syntactic j 
)

Definition at line 509 of file syntactic.cpp.

References GEN_ACCESS, and syn().

00509                                                                               {
00510   return syn (GEN_ACCESS, g, i, j); }

syntactic access ( const syntactic g,
const syntactic i 
)

Definition at line 507 of file syntactic.cpp.

References GEN_ACCESS, and syn().

00507                                                           {
00508   return syn (GEN_ACCESS, g, i); }

R* mmx::access ( Indirect< R > &  x  )  [inline]

Definition at line 752 of file mmc_glue.hpp.

References Indirect< R >::rep.

00752                                        {
00753   return x.rep; }

generic access ( const generic f,
const vector< generic > &  x 
)

Definition at line 185 of file generic.cpp.

References append(), GEN_ACCESS, and vector_to_compound().

00185                                                                {
00186   vector<generic> v= vec<generic> (generic (GEN_ACCESS), g);
00187   return vector_to_compound (append (v, args)); }

generic access ( const generic f,
const generic x,
const generic y 
)

Definition at line 183 of file generic.cpp.

References gen(), and GEN_ACCESS.

00183                                                                       {
00184   return gen (GEN_ACCESS, g, x, y); }

generic access ( const generic f,
const generic x 
)

Definition at line 181 of file generic.cpp.

References gen(), and GEN_ACCESS.

Referenced by binary_access(), trig_op::diff_op(), and binary_helper< generic >::disassemble().

00181                                                     {
00182   return gen (GEN_ACCESS, g, x); }

C mmx::accuracy_cst ( const format< C > &  fm  )  [inline]

Definition at line 951 of file type_props.hpp.

References C, promote(), and set_accuracy().

00951                                    {
00952   C r= promote (0, fm); set_accuracy (r); return r; }

C mmx::accuracy_cst (  )  [inline]

Definition at line 912 of file type_props.hpp.

References C, and set_accuracy().

00912 { C r; set_accuracy (r); return r; }

vector<C,V> mmx::acos ( const vector< C, V > &  v  )  [inline]

Definition at line 1183 of file vector.hpp.

01183 { return unary_map<acos_op> (v); }

table<C,T,V> mmx::acos ( const table< C, T, V > &  t  )  [inline]

Definition at line 704 of file table.hpp.

00704 { return unary_map<acos_op> (t); }

syntactic acos ( const syntactic g  ) 

Definition at line 433 of file syntactic.cpp.

References GEN_ARCCOS, and syn().

00433 { return syn (GEN_ARCCOS, g); }

new_table<C,T,V> mmx::acos ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 775 of file new_table.hpp.

00775 { return unary_map<acos_op> (t); }

generic acos ( const generic x1  ) 

Definition at line 463 of file generic.cpp.

References ACC_ACOS, ACC_UNARY, current_ev, and GEN_ARCCOS.

00463                          {
00464   ACC_UNARY (ACC_ACOS, x1);
00465   return current_ev->apply (GEN_ARCCOS, x1);
00466 }

double acos ( const double &  x  )  [inline]

Definition at line 55 of file double.hpp.

Referenced by acos_op::op(), and acos_op::set_op().

00055 { return std::acos (x); }

syntactic acos_init ( const syntactic x,
const syntactic c 
)

Definition at line 493 of file syntactic.cpp.

References syn().

00493                                                              {
00494   return syn ("acos_init", x, c); }

generic acos_init ( const generic x,
const generic c 
)

Definition at line 806 of file generic.cpp.

References current_ev.

Referenced by acos_op::op_init().

00806                                                          {
00807   return current_ev->apply ("acos_init", x1, x2); }

syntactic acosh ( const syntactic g  ) 

Definition at line 439 of file syntactic.cpp.

References GEN_ARGCH, and syn().

00439 { return syn (GEN_ARGCH, g); }

generic acosh ( const generic x1  ) 

Definition at line 499 of file generic.cpp.

References ACC_ACOSH, ACC_UNARY, log(), sqrt(), and square().

00499                           {
00500   ACC_UNARY (ACC_ACOSH, x1);
00501   return log (x1 + sqrt (square (x1) - 1));
00502 }

double mmx::acosh ( const double &  x  )  [inline]

Definition at line 71 of file double.hpp.

00077 { return std::isfinite (x); }

C mmx::acosh ( const C &  x  )  [inline]

Definition at line 595 of file defaults.hpp.

References log(), promote(), sqrt(), and square().

Referenced by acosh_op::op(), and acosh_op::set_op().

00595                                                  {
00596   return log (x + sqrt (square (x) - promote (1, x))); }

static int mmx::active_newline ( int  a,
int  b 
) [static]

Definition at line 294 of file terminal_interface.cpp.

References fed.

Referenced by shell_terminal_input().

00294                              {
00295   (void) a;
00296   (void) b;
00297   rl_crlf ();
00298   rl_on_new_line ();
00299   fed = true;
00300   rl_done = 1;
00301   return 0;
00302 }

void mmx::add ( R &  x,
const C1 &  y1,
const C2 &  y2 
) [inline]

Definition at line 54 of file operators.hpp.

Referenced by ladd_op::set_op(), radd_op::set_op(), and add_op::set_op().

00054 { x= y1 + y2; }

string add_indentation ( const string obj->lex_string,
int  delta 
)

Definition at line 644 of file string.cpp.

References ASSERT, min(), N(), recompose(), repeated(), and tokenize().

Referenced by source_string_unindented().

00644                                              {
00645   if (delta == 0) return s;
00646   vector<string> v= tokenize (s, "\n");
00647   for (nat i=0; i<N(v); i++)
00648     if (delta > 0) v[i]= repeated (" ", delta) * v[i];
00649     else {
00650       int l= min (-delta, (int) N(v[i]));
00651       ASSERT (v[i] (0, l) == repeated (" ", l), "insufficient indentation");
00652       v[i]= v[i] (l, N(v[i]));
00653     }
00654   return recompose (v, "\n", N(s) != 0 && s[N(s) - 1] == '\n');
00655 }

generic mmx::add_modes ( const generic g,
int  mode,
int  new_mode 
)

Definition at line 65 of file mmx_texmacs.cpp.

References add_modes(), gen(), and is_func().

00065                                                      {
00066   // mmerr << as_lisp (g) << ", " << mode << ", " << new_mode << "\n";
00067   generic r= add_modes (g, new_mode);
00068   if (is_func (r, "$concat", 1)) r= r[1];
00069   if (mode == new_mode) return r;
00070   else if (is_func (r, "$math", 1)) return r;
00071   else if (is_func (r, "$text", 1)) return r;
00072   else if (new_mode == 1) return gen ("$math", r);
00073   else if (new_mode == 2) return gen ("$text", r);
00074   else return r;
00075 }

generic add_modes ( const generic g,
int  mode 
)

Definition at line 78 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().

00078                                        {
00079   // mmerr << as_lisp (g) << ", " << mode << "\n";
00080   if (!is<compound> (g) || !is<literal> (g[0])) return g;
00081   if (is_func (g, "$math", 1)) return add_modes (g[1], mode, 1);
00082   if (is_func (g, "$text", 1)) return add_modes (g[1], mode, 2);
00083   if (is_func (g, "$inmath", 1)) return add_modes (g[1], 1);
00084   if (is_func (g, "$intext", 1)) return add_modes (g[1], 2);
00085   vector<generic> v= copy (compound_to_vector (g));
00086   for (nat i=1; i<N(v); i++) v[i]= add_modes (v[i], mode);
00087   return vector_to_compound (v);
00088 }

T mmx::add_operator ( const T &  x,
const T &  y 
) [inline]

Definition at line 31 of file operators.hpp.

00031 { return x+y; }

unary_return_type_helper<abs_op, C >::RET mmx::additive_error ( const C &  x  )  [inline]

Definition at line 1071 of file type_props.hpp.

References rounding_error().

01071                                                                     {
01072   return rounding_error (x); }

generic additive_error ( const generic x  ) 

Definition at line 774 of file generic.cpp.

References current_ev, and GEN_ADDITIVE_ERROR.

00774                                           {
00775   return current_ev->apply (GEN_ADDITIVE_ERROR, x); }

double mmx::additive_error ( const double &  x  )  [inline]

Definition at line 90 of file double.hpp.

References abs().

Referenced by additive_error_op::Abs_type(), GLUE_52(), and additive_error_op::set_op().

00090                                                {
00091   return ldexp (nextafter (abs (x), HUGE_VAL), -50); }

alias<C> mmx::alias_access ( const alias< R > &  r,
const A &  a,
const B &  b 
) [inline]

Definition at line 260 of file alias.hpp.

00260                                                          {
00261   return new alias_binary_access_rep<C,R,A,B> (r, a, b);
00262 }

alias<C> mmx::alias_access ( const alias< R > &  r,
const A &  a 
) [inline]

Definition at line 241 of file alias.hpp.

00241                                              {
00242   return new alias_unary_access_rep<C,R,A> (r, a);
00243 }

void alias_getter ( nat  id,
routine r 
)

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().

00068                                   {
00069   static table<routine,nat> t;
00070   if (is_nil (r)) r= read (t, id);
00071   else t[id]= r;
00072 }

void mmx::alias_glue ( const alias< R > &  r,
const A &  a,
const B &  b 
) [inline]

Definition at line 278 of file alias.hpp.

00278                                                        {
00279   glue (r->open (), a, b);
00280   r->close ();
00281 }

void mmx::alias_reset ( const alias< R > &  r,
const A &  a 
) [inline]

Definition at line 265 of file alias.hpp.

References reset().

Referenced by alias_tuple_reset(), and GLUE_13().

00265                                             {
00266   reset (r->open (), a);
00267   r->close ();
00268 }

void alias_setter ( nat  id,
routine r 
)

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().

00082                                   {
00083   static table<routine,nat> t;
00084   if (is_nil (r)) r= read (t, id);
00085   else t[id]= r;
00086 }

void alias_specializer ( nat  id,
routine 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().

00053                                        {
00054   static table<routine,nat> t;
00055   if (is_nil (r)) r= read (t, id);
00056   else t[id]= r;
00057 }

nat mmx::alias_to_scalar ( nat  id  )  [inline]

Definition at line 189 of file alias.hpp.

References alias_type_info().

00189                          {
00190   int mode= 0;
00191   alias_type_info (id, mode);
00192   return id;
00193 }

alias<X> mmx::alias_tuple_access ( const alias< R > &  r,
const A &  a,
const B &  b,
const C &  c 
) [inline]

Definition at line 285 of file alias.hpp.

References cons().

00285                                                                            {
00286   return alias_access<X> (r, cons (a, (cons (b, c))));
00287 }

void mmx::alias_tuple_reset ( const alias< R > &  r,
const A &  a,
const B &  b,
const C &  c 
) [inline]

Definition at line 291 of file alias.hpp.

References alias_reset(), and cons().

Referenced by GLUE_21().

00291                                                                           {
00292   alias_reset (r, cons (a, cons (b, c)));
00293 }

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().

00019                                      {
00020   static table<nat,nat> t (0);
00021   static table<nat,nat> u (0);
00022   static table<nat,nat> v (0);
00023   if (mode == 0) {
00024     mode= t->contains (id)? 1: 0;
00025     id= read (t, id);
00026   }
00027   else if (mode == 1) {
00028     mode= u->contains (id)? 1: 0;
00029     id= read (u, id);
00030   }
00031   else if (mode == 2) {
00032     if (u->contains (id)) id= u[id];
00033     else {
00034       nat new_id= new_type_id ();
00035       t[new_id]= id;
00036       u[id]= new_id;
00037       id= new_id;
00038     }
00039   }
00040   else if (mode == 3) {
00041     if (v->contains (id)) id= v[id];
00042     else {
00043       nat new_id= new_type_id ();
00044       t[new_id]= id;
00045       v[id]= new_id;
00046       id= new_id;
00047     }
00048   }
00049   else ERROR ("wrong mode");
00050 }

alias<R> mmx::alias_write ( const alias< R > &  r,
const A &  a 
) [inline]

Definition at line 271 of file alias.hpp.

Referenced by GLUE_10(), GLUE_11(), GLUE_17(), and GLUE_6().

00271                                             {
00272   r->open () << a;
00273   r->close ();
00274   return r;
00275 }

nat mmx::aligned_size ( nat  n  )  [inline]

Definition at line 70 of file vector_naive.hpp.

00070                      {
00071   typedef implementation<vector_allocate,V> Vec;
00072   return Vec::template vec_aligned_size<C> (n);
00073 }

vector< generic > all_type_names (  ) 

Definition at line 59 of file glue.cpp.

References as(), current_ev, gen(), and GEN_ALL_TYPES.

Referenced by define_type_sub().

00059                   {
00060   generic ret;
00061   if (current_ev->get (gen (GEN_ALL_TYPES), ret))
00062     return as<vector<generic> > (ret);
00063   return vec<generic> ();
00064 }

bool mmx::always_false ( const C &  x  )  [inline]

Definition at line 745 of file defaults.hpp.

00745                           {
00746   (void) x; return false;
00747 }

bool mmx::always_true ( const C &  x  )  [inline]

Definition at line 750 of file defaults.hpp.

00750                          {
00751   (void) x; return true;
00752 }

static string mmx::ancestor_search_name ( const string dir,
const string name 
) [static]

Definition at line 661 of file system.cpp.

References get_directory(), semi_recursive_search_name(), starts(), and var_pwd().

Referenced by resolve_name().

00661                                                              {
00662   //mmout << "Ancestor search " << dir << ", " << name << "\n";
00663   string sname= semi_recursive_search_name (dir, name);
00664   if (sname != "") return sname;
00665   if (dir == "" || dir == ".") {
00666     string pdir= get_directory (var_pwd ());
00667     if (!starts (pdir, "/")) return "";
00668     return ancestor_search_name (pdir, name);
00669   }
00670   if (dir == "/") return "";
00671   return ancestor_search_name (get_directory (dir), name);
00672 }

generic mmx::any_as_generic ( const T &  t  )  [inline]

Definition at line 177 of file mmc_glue.hpp.

References as_helper< T, F >::cv().

00177                             {
00178   return as_helper<generic,T>::cv (t);
00179 }

vector<C,V> mmx::append ( const vector< C, V > &  v,
const vector< C, V > &  w 
) [inline]

Definition at line 637 of file vector.hpp.

References ASSERT, C, CF(), copy(), is_non_scalar(), N(), n, seg(), and Vector.

00637                                           {
00638   typedef implementation<vector_linear,V> Vec;
00639   ASSERT (is_non_scalar (v) && is_non_scalar (w),
00640           "non-scalar vectors expected");
00641   nat n= N(v), p= N(w);
00642   nat l= aligned_size<C,V> (n+p);
00643   C* a= mmx_formatted_new<C> (l, CF(v));
00644   Vec::copy (a, seg (v), n);
00645   Vec::copy (a+n, seg (w), p);
00646   return Vector (a, n+p, l, CF(v));
00647 }

vector<C,V> mmx::append ( const vector< C, V > &  v,
const C &  c 
) [inline]

Definition at line 625 of file vector.hpp.

References ASSERT, C, CF(), copy(), is_non_scalar(), N(), n, seg(), and Vector.

00625                                      {
00626   typedef implementation<vector_linear,V> Vec;
00627   ASSERT (is_non_scalar (v), "non-scalar vector expected");
00628   nat n= N(v);
00629   nat l= aligned_size<C,V> (n+1);
00630   C* a= mmx_formatted_new<C> (l, CF(v));
00631   a[n]= c;
00632   Vec::copy (a, seg (v), n);
00633   return Vector (a, n+1, l, CF(v));
00634 }

table<C,T,V> mmx::append ( const table< C, T, V > &  t,
const table< C, T, V > &  u 
) [inline]

Definition at line 765 of file table.hpp.

References busy(), CF2(), entries(), I(), and Table.

00765                                         {
00766   Table r (I (u), CF2(t));
00767   for (iterator<T> it= entries (t); busy (it); ++it)
00768     r[*it]= t[*it];
00769   for (iterator<T> it= entries (u); busy (it); ++it)
00770     r[*it]= u[*it];
00771   return r;
00772 }

new_table<C,T,V> mmx::append ( const new_table< C, T, V > &  t,
const new_table< C, T, V > &  u 
) [inline]

Definition at line 836 of file new_table.hpp.

References busy(), CF2(), entries(), I(), and Table.

00836                                         {
00837   Table r (I (u), CF2(t));
00838   for (iterator<T> it= entries (t); busy (it); ++it)
00839     r[*it]= t[*it];
00840   for (iterator<T> it= entries (u); busy (it); ++it)
00841     r[*it]= u[*it];
00842   return r;
00843 }

list<C> mmx::append ( const list< C > &  l1,
const list< C > &  l2 
) [inline]

Return a list comprising all the elements of l1 and l2.

Definition at line 283 of file list.hpp.

References append(), car(), cdr(), cons(), copy(), and is_nil().

00283                                         {
00284   if (is_nil (l1)) return copy (l2);
00285   return cons (car (l1), append (cdr (l1), l2));
00286 }

generic append ( const generic g1,
const generic g2 
)

Definition at line 29 of file generic_utils.cpp.

References append(), compound_to_vector(), and vector_to_compound().

00029                                               {
00030   return vector_to_compound (append (compound_to_vector (g1),
00031                                      compound_to_vector (g2)));
00032 }

cache<C,T> mmx::append ( const cache< C, T > &  t,
const cache< C, T > &  u 
) [inline]

Definition at line 78 of file cache.hpp.

References Cache.

Referenced by access(), append(), cons(), detach(), GLUE_10(), GLUE_16(), GLUE_9(), insert(), append_op::op(), operator*(), append_op::set_op(), and vector_append().

00078                                                           {
00079   return Cache (append (*t, *u)); }

syntactic mmx::apply ( const vector< syntactic > &  v  ) 

Definition at line 29 of file syntactic.cpp.

References as_string(), as_syntactic(), N(), pow(), s, vector_to_compound(), and VERIFY.

00029                                    {
00030   VERIFY (N(v) != 0, "non-empty vector expected");
00031   if (is<literal> (*v[0])) {
00032     string s= as_string (as<literal> (*v[0]));
00033     if (N(s) == 1) {
00034       if (s[0] == '-' && N(v) == 2) return -v[1];
00035       if (s[0] == '+' && N(v) == 3) return v[1] + v[2];
00036       if (s[0] == '-' && N(v) == 3) return v[1] - v[2];
00037       if (s[0] == '*' && N(v) == 3) return v[1] * v[2];
00038       if (s[0] == '/' && N(v) == 3) return v[1] / v[2];
00039       if (s[0] == '^' && N(v) == 3) return pow (v[1], v[2]);
00040     }
00041   }
00042   return as_syntactic (vector_to_compound (*((vector<generic>*) (void*) &v)));
00043 }

generic mmx::apply ( const routine fun,
const vector< dynamic > &  args 
)

Definition at line 178 of file dynamic.cpp.

References N().

00178                                                         {
00179   vector<generic> a= fill<generic> (N (args));
00180   for (nat i= 0; i<N(a); i++)
00181     a[i]= args[i]->val;
00182   generic r= fun->apply (a);
00183   return r;
00184 }

syntactic mmx::apply ( const generic &  f,
const vector< syntactic > &  a 
) [inline]

Definition at line 209 of file syntactic.hpp.

References apply(), and as_syntactic().

00209                                                                       {
00210   return apply (as_syntactic (f), a); }

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 204 of file syntactic.hpp.

References apply(), and as_syntactic().

00207                                                                   {
00208   return apply (as_syntactic (f), a1, a2, a3, a4, a5, a6); }

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 199 of file syntactic.hpp.

References apply(), and as_syntactic().

00202                                              {
00203   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 
) [inline]

Definition at line 195 of file syntactic.hpp.

References apply(), and as_syntactic().

00197                                                                   {
00198   return apply (as_syntactic (f), a1, a2, a3, a4); }

syntactic mmx::apply ( const generic &  f,
const syntactic &  a1,
const syntactic &  a2,
const syntactic &  a3 
) [inline]

Definition at line 192 of file syntactic.hpp.

References apply(), and as_syntactic().

00193                                                                   {
00194   return apply (as_syntactic (f), a1, a2, a3); }

syntactic mmx::apply ( const generic &  f,
const syntactic &  a1,
const syntactic &  a2 
) [inline]

Definition at line 189 of file syntactic.hpp.

References apply(), and as_syntactic().

00190                                              {
00191   return apply (as_syntactic (f), a1, a2); }

syntactic mmx::apply ( const generic &  f,
const syntactic &  a1 
) [inline]

Definition at line 187 of file syntactic.hpp.

References apply(), and as_syntactic().

00187                                                                {
00188   return apply (as_syntactic (f), a1); }

syntactic mmx::apply ( const generic &  f  )  [inline]

Definition at line 185 of file syntactic.hpp.

References apply(), and as_syntactic().

00185                                           {
00186   return apply (as_syntactic (f)); }

syntactic mmx::apply ( const char *  f,
const vector< syntactic > &  a 
) [inline]

Definition at line 182 of file syntactic.hpp.

References apply().

00182                                                                    {
00183   return apply (syntactic (f), a); }

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 177 of file syntactic.hpp.

References apply().

00180                                                                   {
00181   return apply (syntactic (f), a1, a2, a3, a4, a5, a6); }

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 172 of file syntactic.hpp.

References apply().

00175                                              {
00176   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 
) [inline]

Definition at line 168 of file syntactic.hpp.

References apply().

00170                                                                   {
00171   return apply (syntactic (f), a1, a2, a3, a4); }

syntactic mmx::apply ( const char *  f,
const syntactic &  a1,
const syntactic &  a2,
const syntactic &  a3 
) [inline]

Definition at line 165 of file syntactic.hpp.

References apply().

00166                                                                   {
00167   return apply (syntactic (f), a1, a2, a3); }

syntactic mmx::apply ( const char *  f,
const syntactic &  a1,
const syntactic &  a2 
) [inline]

Definition at line 162 of file syntactic.hpp.

References apply().

00163                                              {
00164   return apply (syntactic (f), a1, a2); }

syntactic mmx::apply ( const char *  f,
const syntactic &  a1 
) [inline]

Definition at line 160 of file syntactic.hpp.

References apply().

00160                                                             {
00161   return apply (syntactic (f), a1); }

syntactic mmx::apply ( const char *  f  )  [inline]

Definition at line 158 of file syntactic.hpp.

References apply().

00158                                        {
00159   return apply (syntactic (f)); }

syntactic apply ( const syntactic f,
const vector< syntactic > &  a 
)

Definition at line 69 of file syntactic.cpp.

References apply(), and cons().

00069                                                                  {
00070   return apply (cons (f, a)); }

syntactic apply ( const syntactic f,
const syntactic a1,
const syntactic a2,
const syntactic a3,
const syntactic a4,
const syntactic a5,
const syntactic a6 
)

Definition at line 64 of file syntactic.cpp.

References apply(), and vec().

00067                                                            {
00068   return apply (vec (f, a1, a2, a3, a4, a5, a6)); }

syntactic apply ( const syntactic f,
const syntactic a1,
const syntactic a2,
const syntactic a3,
const syntactic a4,
const syntactic a5 
)

Definition at line 59 of file syntactic.cpp.

References apply(), and vec().

00062                                       {
00063   return apply (vec (f, a1, a2, a3, a4, a5)); }

syntactic apply ( const syntactic f,
const syntactic a1,
const syntactic a2,
const syntactic a3,
const syntactic a4 
)

Definition at line 55 of file syntactic.cpp.

References apply(), and vec().

00057                                                            {
00058   return apply (vec (f, a1, a2, a3, a4)); }

syntactic apply ( const syntactic f,
const syntactic a1,
const syntactic a2,
const syntactic a3 
)

Definition at line 52 of file syntactic.cpp.

References apply(), and vec().

00053                                                            {
00054   return apply (vec (f, a1, a2, a3)); }

syntactic apply ( const syntactic f,
const syntactic a1,
const syntactic a2 
)

Definition at line 49 of file syntactic.cpp.

References apply(), and vec().

00050                                       {
00051   return apply (vec (f, a1, a2)); }

syntactic apply ( const syntactic f,
const syntactic a1 
)

Definition at line 47 of file syntactic.cpp.

References apply(), and vec().

00047                                                           {
00048   return apply (vec (f, a1)); }

syntactic apply ( const syntactic f  ) 

Definition at line 45 of file syntactic.cpp.

References apply(), and vec().

00045                                      {
00046   return apply (vec (f)); }

generic apply ( const generic f,
const vector< generic > &  x 
)

Definition at line 274 of file generic.cpp.

References current_ev.

00274                                                               {
00275   return current_ev->apply (g, args); }

generic apply ( const generic f,
const generic x,
const generic y,
const generic z 
)

Definition at line 271 of file generic.cpp.

References current_ev, and vec().

00272                                                    {
00273   return current_ev->apply (g, vec (x, y, z)); }

generic apply ( const generic f,
const generic x,
const generic y 
)

Definition at line 269 of file generic.cpp.

References current_ev.

00269                                                                      {
00270   return current_ev->apply (g, x, y); }

generic apply ( const generic f,
const generic x 
)
syntactic arg ( const syntactic g1  ) 

Definition at line 453 of file syntactic.cpp.

References GEN_ARG, and syn().

00453 { return syn (GEN_ARG, g1); }

generic arg ( const generic x1  ) 

Definition at line 732 of file generic.cpp.

References current_ev, and GEN_ARG.

Referenced by arg_op::op(), arg_op::Real_type(), arg_op::set_op(), and vector_map_n().

00732                                 {
00733   return current_ev->apply (GEN_ARG, x1); }

observer mmx::argument_observer ( dynamic_rep arg,
const updater u 
)

Definition at line 152 of file dynamic.cpp.

Referenced by dynamic::dynamic().

00152                                                        {
00153   return observer (new argument_observer_rep (arg, u));
00154 }

vector< syntactic > arguments ( const syntactic g  ) 

Definition at line 93 of file syntactic.cpp.

References cdr(), and components().

Referenced by flatten().

00093                                {
00094   return cdr (components (g));
00095 }

T as ( const F &  x  )  [inline]

Definition at line 704 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().

00704                 {
00705   return as_helper<T,F>::cv (x);
00706 }

bool mmx::as_bool ( const generic g  )  [inline]

Definition at line 293 of file generic.cpp.

Referenced by operator<(), operator<=(), operator==(), operator>(), and operator>=().

00293                                        {
00294   return is<bool> (g) && as<bool> (g); }

char* mmx::as_charp ( const string obj->lex_string  ) 

Definition at line 74 of file string.cpp.

References mmx_malloc(), and N().

00074                            {
00075   nat i, n= N(s);
00076   char* r= (char*) mmx_malloc (n+1);
00077   for (i=0; i<n; i++) r[i]= s[i];
00078   r[i]= '\0';
00079   return r;
00080 }

char* mmx::as_charp ( const string &  s  ) 
string as_cpp ( const generic g  ) 

Definition at line 1286 of file cpp_printer.cpp.

References inside(), N(), and cpp_printer::pp().

Referenced by flatten_as_cpp().

01286                           {
01287   cpp_printer pp;
01288   pp.pp (g);
01289   while (N (pp.out) > 0 && pp.out [N (pp.out) - 1] == '\n')
01290     inside (pp.out) -> resize (N (pp.out) - 1);
01291   return pp.out;
01292 }

document mmx::as_document ( const generic g  )  [inline]
vector<document> mmx::as_documents ( const vector< generic > &  v  ) 

Definition at line 38 of file document.cpp.

References as_document(), and N().

Referenced by make_document().

00038                                         {
00039   vector<document> r= fill<document> (N(v));
00040   for (nat i=0; i<N(v); i++) r[i]= as_document (v[i]);
00041   return r;
00042 }

double mmx::as_double ( const string obj->lex_string  ) 

Definition at line 180 of file string.cpp.

References max(), and N().

00180                             {
00181   double x;
00182   char buffer[100];
00183   strncpy (buffer, s->a, 99);
00184   buffer[max(N(s),(nat) 99)]= '\0';
00185   sscanf (buffer, "%lf", &x);
00186   return x;
00187 }

double mmx::as_double ( const string &  s  ) 
double mmx::as_double ( const double &  x  )  [inline]

Definition at line 123 of file double.hpp.

Referenced by mmc_unliteral().

00123 { return x; }

exception as_exception ( const generic x  )  [final]

Make an exception from x.

Definition at line 39 of file basix.cpp.

00039                                 {
00040   return exception (x);
00041 }

generic mmx::as_generic ( const syntactic &  g  )  [inline]

Definition at line 45 of file syntactic.hpp.

00045 { return *g; }

generic mmx::as_generic ( const C &  c  )  [inline]

Definition at line 568 of file generic.hpp.

References construct().

00568                         {
00569   return construct (new generic_concrete_rep<C> (c));
00570 }

generic as_generic ( const generic obj,
const generic tp 
)

Definition at line 216 of file generic_object.cpp.

References ASSERT, get_user_type(), and type().

00216                                                  {
00217   ASSERT (type (g) == get_user_type (tp), "type mismatch");
00218   return ((generic_object_rep*) inspect (g)) -> rep;
00219 };

generic as_generic ( const generic obj,
nat  tp_id 
)

Definition at line 210 of file generic_object.cpp.

References ASSERT, and type().

00210                                          {
00211   ASSERT (type (g) == tp_id, "type mismatch");
00212   return ((generic_object_rep*) inspect (g)) -> rep;
00213 };

generic mmx::as_generic ( const document g  )  [inline]
vector<generic> mmx::as_generics ( const vector< document > &  v  ) 

Definition at line 31 of file document.cpp.

References as_generic(), and N().

Referenced by make_row(), and make_texmacs().

00031                                         {
00032   vector<generic> r= fill<generic> (N(v));
00033   for (nat i=0; i<N(v); i++) r[i]= as_generic (v[i]);
00034   return r;
00035 }

nat mmx::as_hash ( const C *  p  )  [inline]

Definition at line 182 of file basix.hpp.

Referenced by exact_hash(), hard_hash(), and hash().

00182                                                      {
00183   return ((nat) ((uintptr_t) ((void*) p))) >> 3; }

int mmx::as_int ( const string obj->lex_string  ) 

Definition at line 137 of file string.cpp.

References N().

00137                          {
00138   int i=0, n=N(s), val=0;
00139   if (n==0) return 0;
00140   if (s[0]=='-') i++;
00141   while (i<n) {
00142     if (s[i]<'0') break;
00143     if (s[i]>'9') break;
00144     val *= 10;
00145     val += (int) (s[i]-'0');
00146     i++;
00147   }
00148   if (s[0]=='-') val=-val;
00149   return val;
00150 }

int mmx::as_int ( const string &  s  ) 
int mmx::as_int ( const double_int &  x  )  [inline]

Definition at line 36 of file int.hpp.

00036                                         {
00037   return (int) x; }

int mmx::as_int ( const double &  x  )  [inline]

Definition at line 122 of file double.hpp.

Referenced by GLUE_3(), mmc_unliteral(), and parse_nat().

00122 { 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().

00019                                                                         {
00020   if (is<literal> (g)) {
00021     if (quote_flag && !fun_flag) out << quote (literal_to_string (g));
00022     else out << literal_to_string (g);
00023   }
00024   else if (is<compound> (g)) {
00025     nat i, n= N (g);
00026     out << "(";
00027     if (n>0) as_lisp (out, g[0], quote_flag, true);
00028     for (i=1; i<n; i++) {
00029       out << " ";
00030       as_lisp (out, g[i], quote_flag, false);
00031     }
00032     out << ")";
00033   }
00034   else {
00035     generic f= as_generic (flatten (g));
00036     as_lisp (out, f, quote_flag, fun_flag);
00037   }
00038 }

string as_lisp ( const generic g,
bool  quote_flag = true 
)

Definition at line 41 of file lisp_printer.cpp.

Referenced by as_lisp(), flatten_as_lisp(), and GLUE_5().

00041                                             {
00042   string out;
00043   as_lisp (out, g, quote_flag, false);
00044   return out;
00045 }

double as_literal_double ( const literal l  ) 

Definition at line 72 of file literal.cpp.

00072                                      {
00073   return string_as_numeric<double> (*l);
00074 }

int as_literal_int ( const literal l  ) 

Definition at line 67 of file literal.cpp.

00067                                   {
00068   return string_as_numeric<int> (*l);
00069 }

string as_literal_string ( const literal l  ) 

Definition at line 62 of file literal.cpp.

References unquote().

00062                                      {
00063   return unquote (*l);
00064 }

static void mmx::as_math ( string out,
const generic g 
) [static]

Definition at line 135 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.

00135                                         {
00136   static table<string, string, exact_eq_table> t (math_symbol_table ());
00137   if (is<literal> (g)) {
00138     string tmp;
00139     string s (literal_to_string (g));
00140     if (t->get (s, tmp))
00141       out << tmp;
00142     else if (N(s) > 0 && s[0]>='0' && s[0] <= '9')
00143       out << "\"" << s << "\"";
00144     else
00145       out << s;
00146   }
00147   else if (is<compound> (g)) {
00148     nat i, n= N (g);
00149     out << "(";
00150     if (n>0) {
00151       if (exact_eq (g[0], GEN_SQTUPLE) && n>1 &&
00152           is<compound> (g[1]) && exact_eq (g[1][0], GEN_ROW))
00153         out << "matrix";
00154       else as_math (out, g[0]);
00155     }
00156     for (i=1; i<n; i++) {
00157       out << " ";
00158       as_math (out, g[i]);
00159     }
00160     out << ")";
00161   }
00162   else {
00163     generic f= as_generic (flatten (g));
00164     as_math (out, f);
00165   }
00166 }

string as_math ( const generic g  ) 

Definition at line 169 of file math_printer.cpp.

Referenced by as_math(), and flatten_as_math().

00169                            {
00170   string out;
00171   as_math (out, g);
00172   return out;
00173 }

string as_mmx ( const generic g  ) 

Definition at line 963 of file mmx_printer.cpp.

References print_mmx(), and serialize().

Referenced by flatten_as_mmx(), and output_as_mmx().

00963                           {
00964   return serialize (print_mmx (g));
00965 }

generic as_object ( const generic v,
const generic tp 
)

Definition at line 205 of file generic_object.cpp.

References get_user_type().

00205                                                 {
00206   return new generic_object_rep (g, get_user_type (tp));
00207 };

generic as_object ( const generic v,
nat  tp_id 
)

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().

00200                                         {
00201   return new generic_object_rep (g, tp_id);
00202 };

static string mmx::as_snippet ( const generic g  )  [static]

Definition at line 578 of file mmx_texmacs.cpp.

References as_texmacs(), print_mmx(), replace_lf(), and texmacs_to_scheme().

Referenced by flatten_as_tm().

00578                               {
00579   string  r= "";
00580   generic h= print_mmx (g);
00581   generic m= h;//add_modes (h, 0, 1);
00582   generic t= as_texmacs (m);
00583   generic l= replace_lf (t);
00584   texmacs_to_scheme (r, l);
00585   return r;
00586 }

string as_string ( const syntactic g  ) 

Definition at line 26 of file syntactic.cpp.

References literal_to_string().

00026 { return literal_to_string (*g); }

string as_string ( long double  x  ) 

Definition at line 173 of file string.cpp.

00173                           {
00174   char buffer[64];
00175   sprintf (buffer, "%Lf", x);
00176   return string (buffer);
00177 }

string as_string ( double  x  ) 

Definition at line 163 of file string.cpp.

References as_string_hook.

00163                      {
00164   if (as_string_hook != NULL)
00165     return as_string_hook (x);
00166   if (x == 0.0) return "0";
00167   char buffer[32];
00168   sprintf (buffer, "%1.12g", x);
00169   return string (buffer);
00170 }

string as_string ( float  x  ) 

Definition at line 153 of file string.cpp.

00153                     {
00154   if (x == 0.0) return "0";
00155   char buffer[32];
00156   sprintf (buffer, "%1.3e", x);
00157   return string (buffer);
00158 }

string as_string ( long long unsigned int  i  ) 

Definition at line 130 of file string.cpp.

00130                                      {
00131   char buffer[100];
00132   sprintf (buffer, "%llu", i);
00133   return string (buffer);
00134 }

string as_string ( long long int  i  ) 

Definition at line 123 of file string.cpp.

00123                             {
00124   char buffer[100];
00125   sprintf (buffer, "%lld", i);
00126   return string (buffer);
00127 }

string as_string ( long unsigned int  i  ) 

Definition at line 116 of file string.cpp.

00116                                 {
00117   char buffer[100];
00118   sprintf (buffer, "%lu", i);
00119   return string (buffer);
00120 }

string as_string ( long int  i  ) 

Definition at line 109 of file string.cpp.

00109                        {
00110   char buffer[100];
00111   sprintf (buffer, "%ld", i);
00112   return string (buffer);
00113 }

string mmx::as_string ( unsigned char  i  )  [inline]

Definition at line 128 of file string.hpp.

References as_string().

00128                                           {
00129   return as_string ((unsigned int) i); }

string mmx::as_string ( signed char  i  )  [inline]

Definition at line 126 of file string.hpp.

References as_string().

00126                                         {
00127   return as_string ((int) i); }

string mmx::as_string ( short unsigned int  i  )  [inline]

Definition at line 124 of file string.hpp.

References as_string().

00124                                                {
00125   return as_string ((unsigned int) i); }

string mmx::as_string ( short int  i  )  [inline]

Definition at line 122 of file string.hpp.

References as_string().

00122                                       {
00123   return as_string ((int) i); }

string as_string ( void *  ptr  ) 

Definition at line 88 of file string.cpp.

00088                       {
00089   char buffer[100];
00090   sprintf (buffer, "0x%lx", (unsigned long) ptr);
00091   return string (buffer);
00092 }

string as_string ( unsigned int  i  ) 

Definition at line 102 of file string.cpp.

00102                            {
00103   char buffer[100];
00104   sprintf (buffer, "%u", i);
00105   return string (buffer);
00106 }

string as_string ( int  i  ) 

Definition at line 95 of file string.cpp.

00095                   {
00096   char buffer[100];
00097   sprintf (buffer, "%d", i);
00098   return string (buffer);
00099 }

string as_string ( const exception e  ) 
string mmx::as_string_hexa ( ulong  i  )  [inline]

Definition at line 138 of file string.hpp.

Referenced by GLUE_4().

00138                                        {
00139   static char buf[sizeof(ulong)*2+1];
00140   snprintf (buf, sizeof(buf), "%lx", i);
00141   return buf; }

syntactic mmx::as_syntactic ( const generic &  g  )  [inline]
generic mmx::as_texmacs ( const generic g  ) 

Definition at line 243 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().

00243                               {
00244   if (is<literal> (g)) {
00245     if (g == "$lf") return gen ("$lf");
00246     if (g == "$cr") return gen ("$cr");
00247     if (g == "$spc") return gen (" ");
00248     static table<generic,generic> t= texmacs_symbol_table ();
00249     generic h= g;
00250     if (contains (t, h)) h= t[h];
00251     if (!is<literal> (h)) return h;
00252     string s= literal_to_string (h);
00253     if (starts (s, "tm$"))
00254       return generic ("<" * s (3, N(s)) * ">");
00255     string r;
00256     for (nat i=0; i<N(s); i++)
00257       if (s[i] == '<') r << "<less>";
00258       else if (s[i] == '>') r << "<gtr>";
00259       else r << s[i];
00260     return r;
00261   }
00262   else if (is_func (g, "$concat")) {
00263     vector<generic> v;
00264     for (nat i=1; i<N(g); i++)
00265       concat_append (v, as_texmacs (g[i]));
00266     if (N(v) == 0) return generic ("");
00267     else if (N(v) == 1) return v[0];
00268     else return gen ("$concat", v);
00269   }
00270   else if (is_func (g, "$keyword", 1))
00271     return as_texmacs (gen ("$strong", g[1]));
00272   else if (is_func (g, "$keyword", 2))
00273     return as_texmacs (gen ("$concat", gen ("$strong", g[1]), "$spc", g[2]));
00274   else if (is_func (g, "$bracket", 3))
00275     return as_texmacs (gen ("$around*", g[1], g[2], g[3]));
00276   else if (is_func (g, "$prefix", 2)) {
00277     if (g[1] == "'" || g[1] == "`")
00278       return as_texmacs (gen ("$concat", gen ("$lprime", g[1]), g[2]));
00279     else return as_texmacs (gen ("$concat", g[1], g[2]));
00280   }
00281   else if (is_func (g, "$postfix", 2)) {
00282     if (g[2] == "'" || g[2] == "`")
00283       return as_texmacs (gen ("$concat", g[1], gen ("$lprime", g[2])));
00284     else return as_texmacs (gen ("$concat", g[1], g[2]));
00285   }
00286   else if (is_func (g, "$infix", 3)) {
00287     if (g[2] == "/")
00288       return as_texmacs (gen ("$frac", unbracket (g[1]), unbracket (g[3])));
00289     else if (g[2] == "^")
00290       return as_texmacs (gen ("$concat",
00291                               g[1], gen ("$rsup", unbracket (g[3]))));
00292     else if (g[2] == "|" || g[2] == "||")
00293       return as_texmacs (gen ("$concat", g[1], gen ("$mid", g[2]), g[3]));
00294     else {
00295       generic op= as_texmacs (g[2]);
00296       if (is_alpha (op))
00297         op= gen ("$concat", "$spc", gen ("$strong", op), "$spc");
00298       return as_texmacs (gen ("$concat", g[1], g[2], g[3]));
00299     }
00300   }
00301   else if (is_func (g, "$bigop") && N(g) >= 3) {
00302     vector<generic> v;
00303     if (g[1] == GEN_PLUS && is_func (g[2], GEN_MINUS, 1))
00304       v << generic ("-") << g[2][1];
00305     else v << g[2];
00306     for (nat i=3; i<N(g); i++) {
00307       if (g[1] == GEN_PLUS && is_func (g[i], GEN_MINUS, 1))
00308         v << generic ("-") << g[i][1];
00309       else
00310         v << g[1] << g[i];
00311     }
00312     return as_texmacs (gen ("$concat", v));
00313   }
00314   else if (is_func (g, "$operate", 2)) {
00315     if (is_func (g[2], "$bracket", 3) && g[2][1] == "[")
00316       return as_texmacs (gen ("$concat",
00317                               g[1], gen ("$rsub", unbracket (g[2]))));
00318     else return as_texmacs (gen ("$concat", g[1], g[2]));
00319   }
00320   else if (is_func (g, "$hlist")) {
00321     if (N(g) == 1) return generic ("");
00322     vector<generic> v= vec (g[1]);
00323     for (nat i=2; i<N(g); i++) v << generic (",") << g[i];
00324     return as_texmacs (gen ("$concat", v));
00325   }
00326   else if (is_func (g, "$vlist")) {
00327     vector<generic> v;
00328     for (nat i=1; i<N(g); i++)
00329       if (is_func (g[i], "$hlist"))
00330         v << gen ("$row", cdr (compound_to_vector (g[i])));
00331     if (N(v) == 0) return generic ("");
00332     return as_texmacs (gen ("$tabular*", gen ("$table", v)));
00333   }
00334   else if (is_func (g, "$indent")) {
00335     vector<generic> v;
00336     for (nat i=1; i<N(g); i++)
00337       concat_append (v, as_texmacs (g[i]));
00338     return gen ("$concat", gen ("$indent", gen ("$concat", v)), gen ("$lf"));
00339   }
00340   else if (is_func (g, "$text", 1))
00341     return gen ("$text", as_texmacs (g[1]));
00342   else if (is_func (g, "$math", 1))
00343     return gen ("$math", as_texmacs (g[1]));
00344   else if (is_func (g, "$dynamic"))
00345     return gen ("$locus", gen ("$id", as_texmacs (g[1])), as_texmacs (g[2]));
00346   else if (is<compound> (g)) {
00347     vector<generic> v;
00348     for (nat i=1; i<N(g); i++)
00349       v << as_texmacs (g[i]);
00350     return gen (g[0], v);
00351   }
00352   else ERROR ("not implemented");
00353 }

string as_texmacs_scheme ( const generic g  ) 

Definition at line 477 of file mmx_texmacs.cpp.

References add_modes(), as_texmacs(), print_mmx(), replace_lf(), and texmacs_to_scheme().

Referenced by flatten_as_texmacs_scheme().

00477                                      {
00478   string  r= "(document ";
00479   generic h= print_mmx (g);
00480   generic m= add_modes (h, 0, 1);
00481   generic t= as_texmacs (m);
00482   generic l= replace_lf (t);
00483   texmacs_to_scheme (r, l);
00484   r << ")";
00485   return r;
00486 }

string as_texmacs_snippet ( const generic g  ) 

Definition at line 466 of file mmx_texmacs.cpp.

References add_modes(), as_texmacs(), print_mmx(), replace_lf(), and texmacs_to_scheme().

Referenced by texmacs_dynamic_event().

00466                                       {
00467   string  r= "";
00468   generic h= print_mmx (g);
00469   generic m= add_modes (h, 0, 1);
00470   generic t= as_texmacs (m);
00471   generic l= replace_lf (t);
00472   texmacs_to_scheme (r, l);
00473   return r;
00474 }

vector<T> mmx::as_vector ( const list< T > &  l  )  [inline]

Definition at line 21 of file glue_list_map.cpp.

References car(), cdr(), is_nil(), and N().

00021                              {
00022   vector<T> a (fill<T> (N (l)));
00023   list<T> it= l;
00024   for (nat i= 0; !is_nil (it); it= cdr (it), i++)
00025     a[i]= car (it);
00026   return a;
00027 }

vector<C> mmx::as_vector ( const tuple< C > &  t  )  [inline]

Definition at line 67 of file tuple.hpp.

References N(), and n.

00067                            {
00068   nat i, n= N(t);
00069   vector<C> a= fill<C> (n);
00070   for (i=0; i<n; i++)
00071     a[i]= t[i];
00072   return a;
00073 }

vector<C> mmx::as_vector ( const row_tuple< C > &  t  )  [inline]

Definition at line 69 of file row_tuple.hpp.

References N(), and n.

Referenced by inspector< compound >::access(), compound_to_vector(), solve_vector_lde_op::diff_op(), flatten(), GLUE_1(), GLUE_11(), GLUE_12(), GLUE_13(), GLUE_17(), GLUE_18(), GLUE_19(), GLUE_2(), GLUE_20(), GLUE_21(), GLUE_3(), GLUE_5(), GLUE_6(), GLUE_7(), GLUE_8(), hard_eq(), hard_hash(), hard_neq(), iterate(), inspector< compound >::length(), and map().

00069                                {
00070   nat i, n= N(t);
00071   vector<C> a= fill<C> (n);
00072   for (i=0; i<n; i++)
00073     a[i]= t[i];
00074   return a;
00075 }

vector<C,V> mmx::asin ( const vector< C, V > &  v  )  [inline]

Definition at line 1184 of file vector.hpp.

01184 { return unary_map<asin_op> (v); }

table<C,T,V> mmx::asin ( const table< C, T, V > &  t  )  [inline]

Definition at line 705 of file table.hpp.

00705 { return unary_map<asin_op> (t); }

syntactic asin ( const syntactic g  ) 

Definition at line 434 of file syntactic.cpp.

References GEN_ARCSIN, and syn().

00434 { return syn (GEN_ARCSIN, g); }

new_table<C,T,V> mmx::asin ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 776 of file new_table.hpp.

00776 { return unary_map<asin_op> (t); }

generic asin ( const generic x1  ) 

Definition at line 469 of file generic.cpp.

References ACC_ASIN, ACC_UNARY, current_ev, and GEN_ARCSIN.

00469                          {
00470   ACC_UNARY (ACC_ASIN, x1);
00471   return current_ev->apply (GEN_ARCSIN, x1);
00472 }

double asin ( const double &  x  )  [inline]

Definition at line 56 of file double.hpp.

Referenced by asin_op::op(), and asin_op::set_op().

00056 { return std::asin (x); }

syntactic asin_init ( const syntactic x,
const syntactic c 
)

Definition at line 495 of file syntactic.cpp.

References syn().

00495                                                              {
00496   return syn ("asin_init", x, c); }

generic asin_init ( const generic x,
const generic c 
)

Definition at line 808 of file generic.cpp.

References current_ev.

Referenced by asin_op::op_init().

00808                                                          {
00809   return current_ev->apply ("asin_init", x1, x2); }

syntactic asinh ( const syntactic g  ) 

Definition at line 440 of file syntactic.cpp.

References GEN_ARGSH, and syn().

00440 { return syn (GEN_ARGSH, g); }

generic asinh ( const generic x1  ) 

Definition at line 505 of file generic.cpp.

References ACC_ASINH, ACC_UNARY, log(), sqrt(), and square().

00505                           {
00506   ACC_UNARY (ACC_ASINH, x1);
00507   return log (x1 + sqrt (square (x1) + 1));
00508 }

double mmx::asinh ( const double &  x  )  [inline]

Definition at line 71 of file double.hpp.

00077 { return std::isfinite (x); }

C mmx::asinh ( const C &  x  )  [inline]

Definition at line 597 of file defaults.hpp.

References log(), promote(), sqrt(), and square().

Referenced by asinh_op::op(), and asinh_op::set_op().

00597                                                  {
00598   return log (x + sqrt (square (x) + promote (1, x))); }

void assign ( const dynamic d,
const generic val 
)

Definition at line 33 of file dynamic.cpp.

References inside(), and N().

Referenced by GLUE_4(), and updater_rep::update().

00033                                               {
00034   if (val == d->val) return;
00035   inside (d) -> val= val;
00036   for (nat i=0; i<N(d->obs); i++)
00037     d->obs[i]->modify ();
00038 }

vector<C,V> mmx::atan ( const vector< C, V > &  v  )  [inline]

Definition at line 1185 of file vector.hpp.

01185 { return unary_map<atan_op> (v); }

table<C,T,V> mmx::atan ( const table< C, T, V > &  t  )  [inline]

Definition at line 706 of file table.hpp.

00706 { return unary_map<atan_op> (t); }

syntactic atan ( const syntactic g  ) 

Definition at line 435 of file syntactic.cpp.

References GEN_ARCTAN, and syn().

00435 { return syn (GEN_ARCTAN, g); }

new_table<C,T,V> mmx::atan ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 777 of file new_table.hpp.

00777 { return unary_map<atan_op> (t); }

generic atan ( const generic x1  ) 

Definition at line 475 of file generic.cpp.

References ACC_ATAN, ACC_UNARY, current_ev, and GEN_ARCTAN.

00475                          {
00476   ACC_UNARY (ACC_ATAN, x1);
00477   return current_ev->apply (GEN_ARCTAN, x1);
00478 }

double atan ( const double &  x  )  [inline]

Definition at line 57 of file double.hpp.

Referenced by atan2(), atan_op::op(), atan_op::set_op(), and set_pi().

00057 { return std::atan (x); }

syntactic atan2 ( const syntactic g1,
const syntactic g2 
)

Definition at line 447 of file syntactic.cpp.

References GEN_ARCTAN2, and syn().

00447                                                            {
00448   return syn (GEN_ARCTAN2, g1, g2); }

generic atan2 ( const generic x1,
const generic x2 
)

Definition at line 523 of file generic.cpp.

References abs(), ACC_ATAN2, ACC_BINARY, atan(), and sign().

00523                                            {
00524   ACC_BINARY (ACC_ATAN2, x, y);
00525   if (x > 0) return atan (y/x);
00526   else if (y == 0)
00527     return x == 0? generic (0): generic (-4) * atan (generic (1));
00528   else if (x == 0)
00529     return generic (2 * sign (y)) * atan (generic (1));
00530   else return sign (y) * (4 * atan (generic (1)) - atan (abs (y/x)));
00531 }

double atan2 ( const double &  y,
const double &  x 
) [inline]

Definition at line 60 of file double.hpp.

References atan2().

00060                                                        {
00061   return std::atan2 (y, x); }

C mmx::atan2 ( const C &  y,
const C &  x 
) [inline]

Definition at line 577 of file defaults.hpp.

References abs(), atan(), promote(), and sign().

Referenced by atan2(), atan2_op::op(), and atan2_op::set_op().

00577                                                       {
00578   if (!(x <= promote (0, x)))
00579     return atan (y/x);
00580   else if (y == promote (0, x))
00581     return x == promote (0, x)?
00582            promote (0, x): promote (-4, x) * atan (promote (1, x));
00583   else if (x == promote (0, x))
00584     return promote (2 * sign (y), x) * atan (promote (1, x));
00585   else
00586     return promote (sign (y), x) *
00587            (promote (4, x) * atan (promote (1, x)) - atan (abs (y/x))); }

syntactic atan_init ( const syntactic x,
const syntactic c 
)

Definition at line 497 of file syntactic.cpp.

References syn().

00497                                                              {
00498   return syn ("atan_init", x, c); }

generic atan_init ( const generic x,
const generic c 
)

Definition at line 810 of file generic.cpp.

References current_ev.

Referenced by atan_op::op_init().

00810                                                          {
00811   return current_ev->apply ("atan_init", x1, x2); }

syntactic atanh ( const syntactic g  ) 

Definition at line 441 of file syntactic.cpp.

References GEN_ARGTH, and syn().

00441 { return syn (GEN_ARGTH, g); }

generic atanh ( const generic x1  ) 

Definition at line 511 of file generic.cpp.

References ACC_ATANH, ACC_UNARY, and log().

00511                           {
00512   ACC_UNARY (ACC_ATANH, x1);
00513   return log ((1 + x1) / (1 - x1)) / 2;
00514 }

double mmx::atanh ( const double &  x  )  [inline]

Definition at line 71 of file double.hpp.

00077 { return std::isfinite (x); }

C mmx::atanh ( const C &  x  )  [inline]

Definition at line 599 of file defaults.hpp.

References log(), and promote().

Referenced by atanh_op::op(), and atanh_op::set_op().

00599                                                  {
00600   return log ((promote (1, x) + x) / (promote (1, x) - x)) / promote (2, x); }

void attach ( const dynamic d,
const observer o 
)

Definition at line 47 of file dynamic.cpp.

References inside().

Referenced by dynamic::dynamic(), and flatten().

00047                                              {
00048   inside (d) -> obs << o;
00049 }

void mmx::attach_generic_binary_assembler (  )  [inline]

Definition at line 269 of file port.hpp.

References attach_generic_binary_assembler().

00269                                    {
00270   attach_generic_binary_assembler (binary_helper<T>::full_type_name (),
00271                                    binary_assemble_generic_via<T>);
00272 }

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().

00072                                                                      {
00073   if (!is<string> (tp) || as<string> (tp) != "?")
00074     current_ev->set (gen ("assembler", tp),
00075                      as<generic> (unary_routine ("binary_assembler", r)));
00076 }

void mmx::attach_generic_binary_reader (  )  [inline]

Definition at line 284 of file port.hpp.

References attach_generic_binary_reader().

00284                                 {
00285   attach_generic_binary_reader (binary_helper<T>::short_type_name (),
00286                                 binary_read_generic<T>);
00287 }

void attach_generic_binary_reader ( const string s,
unary_generic  r 
)

Definition at line 99 of file generic.cpp.

References binary_readers, and unary_routine().

Referenced by attach_generic_binary_reader().

00099                                                                 {
00100   if (s != "?")
00101     binary_readers[s]= as<generic> (unary_routine ("binary_reader", r));
00102 }

string mmx::backtrace ( const generic g  ) 

Definition at line 354 of file source_track.cpp.

References has_trace(), source_exception(), trace_pull(), and trace_top().

Referenced by source_exception().

00354                              {
00355   if (has_trace (g))
00356     return backtrace (trace_pull (g)) * backtrace (trace_top (g));
00357   else return source_exception (as<exception> (g));
00358 }

chain< C > balance_left ( const chain< C > &  c  )  [inline]

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*().

00260                               {
00261   // Ensure that #left(c) >= #right(c)
00262   switch (N(c)) {
00263   case 0:
00264   case 1:
00265     return c;
00266   case 2:
00267     if (is_nil (right (c))) return c;
00268     return Chain (Chain (middle (c)), middle (right (c)), Chain ());
00269   case 3:
00270     return c;
00271   default:
00272     if (N (left (c)) >= N (right (c))) return c;
00273     else {
00274       Chain aux= balance_right (right (c));
00275       return shift_left (Chain (left (c), middle (c), aux));
00276     }
00277   }
00278 }

chain< C > balance_right ( const chain< C > &  c  )  [inline]

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*().

00281                                {
00282   // Ensure that #left(c) <= #right(c)
00283   switch (N(c)) {
00284   case 0:
00285   case 1:
00286     return c;
00287   case 2:
00288     if (is_nil (left (c))) return c;
00289     return Chain (Chain (), middle (left (c)), Chain (middle (c)));
00290   case 3:
00291     return c;
00292   default:
00293     if (N (left (c)) <= N (right (c))) return c;
00294     else {
00295       Chain aux= balance_left (left (c));
00296       return shift_right (Chain (aux, middle (c), right (c)));
00297     }
00298   }
00299 }

void batch_mode_initialize (  ) 

Definition at line 61 of file terminal_interface.cpp.

References batch_mode, and texmacs_mode.

00061                          {
00062   batch_mode = !isatty(STDIN_FILENO) && !texmacs_mode;
00063 }

unary_return_type_helper< Op , C >::RET mmx::big ( const vector< C, V > &  v  )  [inline]

Definition at line 871 of file vector.hpp.

References ASSERT, CF(), is_non_scalar(), N(), and seg().

00871                            {
00872   typedef implementation<vector_linear,V> Vec;
00873   ASSERT (is_non_scalar (v), "non scalar vector expected");
00874   return Vec::template vec_unary_big<Op> (seg (v), N(v), CF(v));
00875 }

C mmx::big ( const table< C, T, V > &  t  )  [inline]

Definition at line 563 of file table.hpp.

References busy(), C, done(), and entries().

00563                      {
00564   iterator<T> it= entries (t);
00565   if (done (it)) return Op::template neutral<C> ();
00566   C r= t[*it];
00567   for (++it; busy (it); ++it)
00568     Op::set_op (r, t[*it]);
00569   return r;
00570 }

C mmx::big ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 634 of file new_table.hpp.

References busy(), C, done(), and entries().

00634                      {
00635   iterator<T> it= entries (t);
00636   if (done (it)) return Op::template neutral<C> ();
00637   C r= t[*it];
00638   for (++it; busy (it); ++it)
00639     Op::set_op (r, t[*it]);
00640   return r;
00641 }

C mmx::big ( const iterator< C > &  it  )  [inline]

Definition at line 445 of file iterator.hpp.

References busy(), C, CF(), done(), and get_sample().

00445                          {
00446   if (done (it)) {
00447     C r= get_sample (CF (it));
00448     Op::set_neutral (r);
00449     return r;
00450   }
00451   C r= *it;
00452   for (++it; busy (it); ++it)
00453     Op::set_op (r, *it);
00454   return r;
00455 }

C mmx::big_add ( const vector< C, V > &  v  )  [inline]

Definition at line 1212 of file vector.hpp.

01212 { return big<add_op> (v); }

C mmx::big_add ( const table< C, T, V > &  t  )  [inline]

Definition at line 715 of file table.hpp.

00715 { return big<add_op> (t); }

C mmx::big_add ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 786 of file new_table.hpp.

00786 { return big<add_op> (t); }

C mmx::big_add ( const iterator< C > &  it  )  [inline]

Definition at line 457 of file iterator.hpp.

00457 { return big<add_op> (it); }

C mmx::big_and ( const vector< C, V > &  v  )  [inline]

Definition at line 1215 of file vector.hpp.

01215 { return big<and_op> (v); }

C mmx::big_and ( const table< C, T, V > &  t  )  [inline]

Definition at line 718 of file table.hpp.

00718 { return big<and_op> (t); }

C mmx::big_and ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 789 of file new_table.hpp.

00789 { return big<and_op> (t); }

C mmx::big_and ( const iterator< C > &  it  )  [inline]

Definition at line 460 of file iterator.hpp.

00460 { return big<and_op> (it); }

unary_return_type_helper< Op , C >::RET mmx::big_dicho ( const vector< C, V > &  v  )  [inline]

Definition at line 878 of file vector.hpp.

References ASSERT, CF(), is_non_scalar(), N(), and seg().

00878                                  {
00879   typedef implementation<vector_linear,V> Vec;
00880   ASSERT (is_non_scalar (v), "non scalar vector expected");
00881   return Vec::template vec_unary_big_dicho<Op> (seg (v), N(v), CF(v));
00882 }

C mmx::big_inf ( const vector< C, V > &  v  )  [inline]

Definition at line 1218 of file vector.hpp.

01218 { return big<inf_op> (v); }

C mmx::big_inf ( const table< C, T, V > &  t  )  [inline]

Definition at line 721 of file table.hpp.

00721 { return big<inf_op> (t); }

C mmx::big_inf ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 792 of file new_table.hpp.

00792 { return big<inf_op> (t); }

C mmx::big_max ( const vector< C, V > &  v  )  [inline]

Definition at line 1217 of file vector.hpp.

01217 { return big<max_op> (v); }

C mmx::big_max ( const table< C, T, V > &  t  )  [inline]

Definition at line 720 of file table.hpp.

00720 { return big<max_op> (t); }

C mmx::big_max ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 791 of file new_table.hpp.

00791 { return big<max_op> (t); }

C mmx::big_max ( const iterator< C > &  it  )  [inline]

Definition at line 462 of file iterator.hpp.

00462 { return big<max_op> (it); }

C mmx::big_min ( const vector< C, V > &  v  )  [inline]

Definition at line 1216 of file vector.hpp.

01216 { return big<min_op> (v); }

C mmx::big_min ( const table< C, T, V > &  t  )  [inline]

Definition at line 719 of file table.hpp.

00719 { return big<min_op> (t); }

C mmx::big_min ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 790 of file new_table.hpp.

00790 { return big<min_op> (t); }

C mmx::big_min ( const iterator< C > &  it  )  [inline]

Definition at line 461 of file iterator.hpp.

00461 { return big<min_op> (it); }

C mmx::big_mul ( const vector< C, V > &  v  )  [inline]

Definition at line 1213 of file vector.hpp.

01213 { return big<mul_op> (v); }

C mmx::big_mul ( const table< C, T, V > &  t  )  [inline]

Definition at line 716 of file table.hpp.

00716 { return big<mul_op> (t); }

C mmx::big_mul ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 787 of file new_table.hpp.

00787 { return big<mul_op> (t); }

C mmx::big_mul ( const iterator< C > &  it  )  [inline]

Definition at line 458 of file iterator.hpp.

00458 { return big<mul_op> (it); }

C mmx::big_or ( const vector< C, V > &  v  )  [inline]

Definition at line 1214 of file vector.hpp.

01214 { return big< or_op> (v); }

C mmx::big_or ( const table< C, T, V > &  t  )  [inline]

Definition at line 717 of file table.hpp.

00717 { return big< or_op> (t); }

C mmx::big_or ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 788 of file new_table.hpp.

00788 { return big< or_op> (t); }

C mmx::big_or ( const iterator< C > &  it  )  [inline]

Definition at line 459 of file iterator.hpp.

00459 { return big<or_op > (it); }

int big_small_compare ( const generic g1,
const generic g2 
)

Definition at line 176 of file generic_utils.cpp.

References compare().

Referenced by product_less_op::op(), and sum_less_op::op().

00176                                                          {
00177   return compare (g1, g2, -1);
00178 }

C mmx::big_sup ( const vector< C, V > &  v  )  [inline]

Definition at line 1219 of file vector.hpp.

01219 { return big<sup_op> (v); }

C mmx::big_sup ( const table< C, T, V > &  t  )  [inline]

Definition at line 722 of file table.hpp.

00722 { return big<sup_op> (t); }

C mmx::big_sup ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 793 of file new_table.hpp.

00793 { return big<sup_op> (t); }

generic mmx::bigop ( const generic op,
const vector< generic > &  v 
) [inline]

Definition at line 131 of file mmx_printer.cpp.

References cons(), and gen().

00131                                                                    {
00132   return gen ("$bigop", cons (op, v)); }

generic mmx::binary_access ( const C &  x,
nat  i 
) [inline]

Definition at line 213 of file port.hpp.

References access().

00213                                   {
00214   return binary_helper<C>::access (x, i);
00215 }

C binary_assemble ( const generic &  x  )  [inline]

Definition at line 223 of file port.hpp.

Referenced by binary_helper< compound >::assemble().

00223                                    {
00224   return binary_helper<C>::assemble (x);
00225 }

generic binary_assemble_generic ( const generic tp,
const generic val 
)

Definition at line 89 of file generic.cpp.

References ASSERT, current_ev, gen(), and mmerr.

Referenced by binary_helper< generic >::assemble().

00089                                                                 {
00090   if (!current_ev->contains (gen ("assembler", tp)))
00091     mmerr << "val= " << val << "\n";
00092   ASSERT (current_ev->contains (gen ("assembler", tp)),
00093           "unsupported type for generic binary assemble");
00094   routine r= as<routine> (current_ev->get (gen ("assembler", tp)));
00095   return r->apply (val);
00096 }

generic mmx::binary_assemble_generic_via ( const generic &  x  )  [inline]

Definition at line 264 of file port.hpp.

00264                                                {
00265   return as<generic> (binary_assemble<T> (x));
00266 } 

table<C,T,V> mmx::binary_combine ( const table< C, T, V > &  t,
const table< C, T, V > &  u 
) [inline]

Definition at line 573 of file table.hpp.

References busy(), entries(), simplify(), and Table.

00573                                                 {
00574   Table r (Op::template neutral<C> ());
00575   for (iterator<T> it1= entries (t); busy (it1); ++it1)
00576     for (iterator<T> it2= entries (u); busy (it2); ++it2)
00577       Op::set_op (r[Op::rhs_op::op (*it1, *it2)], t[*it1], u[*it2]);
00578   simplify (r);
00579   return r;
00580 }

new_table<C,T,V> mmx::binary_combine ( const new_table< C, T, V > &  t,
const new_table< C, T, V > &  u 
) [inline]

Definition at line 644 of file new_table.hpp.

References busy(), entries(), simplify(), and Table.

00644                                                 {
00645   Table r (Op::template neutral<C> ());
00646   for (iterator<T> it1= entries (t); busy (it1); ++it1)
00647     for (iterator<T> it2= entries (u); busy (it2); ++it2)
00648       Op::set_op (r[Op::rhs_op::op (*it1, *it2)], t[*it1], u[*it2]);
00649   simplify (r);
00650   return r;
00651 }

generic binary_disassemble ( const C &  x  )  [inline]

Definition at line 218 of file port.hpp.

Referenced by generic_concrete_rep< C >::binary_disassemble(), and binary_helper< format< T > >::disassemble().

00218                                 {
00219   return binary_helper<C>::disassemble (x);
00220 }

generic binary_disassemble_generic ( const generic g  ) 

Definition at line 84 of file generic.cpp.

Referenced by binary_helper< generic >::access().

00084                                               {
00085   return g->binary_disassemble ();
00086 }

nat mmx::binary_id ( nat  id1,
nat  id2 
) [inline]

Definition at line 178 of file generic.hpp.

00178 { return id1 ^ (0x10115 * id2); }

port mmx::binary_ll ( const port &  out,
const C &  x 
) [inline]

Definition at line 238 of file port.hpp.

References write().

00238                                         {
00239   binary_helper<C>::write (out, x);
00240   return out;
00241 }

vector<typename binary_return_type_helper< Op , C1 , C2 >::RET,V> mmx::binary_map ( const vector< C1, V > &  v,
const vector< C2, V > &  w 
) [inline]

Definition at line 780 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.

00780                                                           {
00781   typedef implementation<vector_linear,V> Vec;
00782   typedef Binary_return_type(Op,C1,C2) T;
00783   format<T> fm= binary_map<Op> (CF(v), CF(w));
00784   if (is_a_scalar (v) || is_a_scalar (w)) {
00785     if (is_non_scalar (v)) return binary_map<Op> (v, extend (w, v));
00786     if (is_non_scalar (w)) return binary_map<Op> (extend (v, w), w);
00787     return vector<T,V> (Op::op (v.scalar(), w.scalar()));
00788   }
00789   nat n= N(v);
00790   ASSERT (N(w) == n, "lengths don't match");
00791   nat l= aligned_size<T,V> (n);
00792   T* r= mmx_formatted_new<T> (l, fm);
00793   Vec::template vec_binary<Op> (r, seg (v), seg (w), n);
00794   return vector<T,V> (r, n, l, fm);
00795 }

format<typename binary_return_type_helper< Op , C1 , C2 >::RET > mmx::binary_map ( const format< C1 > &  fm1,
const format< C2 > &  fm2 
) [inline]

Definition at line 686 of file type_props.hpp.

References Binary_return_type, and C2.

00686                                                           {
00687   typedef Binary_return_type(Op,C1,C2) R;
00688   typedef typename format<R>::FT FT;
00689   return format_binary_map_helper<Op,FT,R,C1,C2>::op (fm1, fm2);
00690 }

table<C,T,V> mmx::binary_map ( const table< C, T, V > &  t,
const table< C, T, V > &  u 
) [inline]

Definition at line 505 of file table.hpp.

References busy(), CF2(), entries(), I(), simplify(), and Table.

00505                                             {
00506   Table r (Op::op (I(t), I(u)), CF2(t));
00507   for (iterator<T> it= entries (t); busy (it); ++it)
00508     r[*it]= Op::op (t[*it], u[*it]);
00509   for (iterator<T> it= entries (u); busy (it); ++it)
00510     if (!(t->contains (*it)))
00511       r[*it]= Op::op (t[*it], u[*it]);
00512   simplify (r);
00513   return r;
00514 }

sparse_vector<C,T,V> mmx::binary_map ( const sparse_vector< C, T, V > &  v1,
const sparse_vector< C, T, V > &  v2 
) [inline]

Definition at line 197 of file sparse_vector.hpp.

References C, n, N(), Pair, set_zero(), and Sparse_vector.

00197                                                               {
00198   typedef typename V::val_op Eq;
00199   typedef typename V::l_op Less;
00200   static C zero; set_zero (zero);
00201   nat i1, i2, n1= N(v1), n2= N(v2), j, n= n1 + n2;
00202   Pair* r= mmx_new<Pair > (n);
00203   for (i1= i2= j= 0; i1 < n1 && i2 < n2; ) {
00204     if (Less::op (v1[i1].x1, v2[i2].x1)) {
00205       Pair e (v1[i1].x1, Op::op (v1[i1].x2, zero));
00206       i1++; if (Eq::not_op (e.x2, zero)) r[j++]= e;
00207     }
00208     else if (Less::op (v2[i2].x1, v1[i1].x1)) {
00209       Pair e (v2[i2].x1, Op::op (zero, v2[i2].x2));
00210       i2++; if (Eq::not_op (e.x2, zero)) r[j++]= e;
00211     }
00212     else {
00213       Pair e (v2[i2].x1, Op::op (v1[i1].x2, v2[i2].x2));
00214       i1++; i2++; if (Eq::not_op (e.x2, zero)) r[j++]= e;
00215     }
00216   }
00217   while (i1 < n1) {
00218     Pair e (v1[i1].x1, Op::op (v1[i1].x2, zero));
00219     i1++; if (Eq::not_op (e.x2, zero)) r[j++]= e;
00220   }
00221   while (i2 < n2) {
00222     Pair e (v2[i2].x1, Op::op (zero, v2[i2].x2));
00223     i2++; if (Eq::not_op (e.x2, zero)) r[j++]= e;
00224   }
00225   return Sparse_vector (r, j, n);
00226 }

new_table<C,T,V> mmx::binary_map ( const new_table< C, T, V > &  t,
const new_table< C, T, V > &  u 
) [inline]

Definition at line 576 of file new_table.hpp.

References busy(), CF2(), entries(), I(), simplify(), and Table.

00576                                             {
00577   Table r (Op::op (I(t), I(u)), CF2(t));
00578   for (iterator<T> it= entries (t); busy (it); ++it)
00579     r[*it]= Op::op (t[*it], u[*it]);
00580   for (iterator<T> it= entries (u); busy (it); ++it)
00581     if (!(t->contains (*it)))
00582       r[*it]= Op::op (t[*it], u[*it]);
00583   simplify (r);
00584   return r;
00585 }

sparse_vector<C,T,V> mmx::binary_map_optimized ( const sparse_vector< C, T, V > &  v1,
const sparse_vector< C, T, V > &  v2 
) [inline]

Definition at line 229 of file sparse_vector.hpp.

References C, n, N(), Pair, set_zero(), and Sparse_vector.

00229                                                                         {
00230   // With optimizations for addition and subtraction
00231   typedef typename V::val_op Eq;
00232   typedef typename V::l_op Less;
00233   static C zero; set_zero (zero);
00234   nat i1, i2, n1= N(v1), n2= N(v2), j, n= n1 + n2;
00235   Pair* r= mmx_new<Pair > (n);
00236   for (i1= i2= j= 0; i1 < n1 && i2 < n2; ) {
00237     if (Less::op (v1[i1].x1, v2[i2].x1)) {
00238       typedef typename Op::lop Lop;
00239       r[j++]= Pair (v1[i1].x1, Lop::op (v1[i1].x2)); i1++;
00240     }
00241     else if (Less::op (v2[i2].x1, v1[i1].x1)) {
00242       typedef typename Op::rop Rop;
00243       r[j++]= Pair (v2[i2].x1, Rop::op (v2[i2].x2)); i2++;
00244     }
00245     else {
00246       Pair e (v2[i2].x1, Op::op (v1[i1].x2, v2[i2].x2));
00247       i1++; i2++; if (Eq::not_op (e.x2, zero)) r[j++]= e;
00248     }
00249   }
00250   while (i1 < n1) {
00251     typedef typename Op::lop Lop;
00252     r[j++]= Pair (v1[i1].x1, Lop::op (v1[i1].x2)); i1++;
00253   }
00254   while (i2 < n2) {
00255     typedef typename Op::rop Rop;
00256     r[j++]= Pair (v2[i2].x1, Rop::op (v2[i2].x2)); i2++;
00257   }
00258   return Sparse_vector (r, j, n);
00259 }

vector<typename binary_return_type_helper< Op , C , X >::RET,V> mmx::binary_map_scalar ( const vector< C, V > &  v,
const X &  x 
) [inline]

Definition at line 799 of file vector.hpp.

References Binary_return_type, C, CF(), is_a_scalar(), N(), n, vector< C, V >::scalar(), seg(), and T.

00799                                                      {
00800   typedef implementation<vector_linear,V> Vec;
00801   typedef Binary_return_type(Op,C,X) T;
00802   format<T> fm= binary_map_scalar<C> (CF(v), x);
00803   if (is_a_scalar (v)) return vector<T,V> (Op::op (v.scalar(), x));
00804   nat n= N(v);
00805   nat l= aligned_size<T,V> (n);
00806   T* r= mmx_formatted_new<T> (l, fm);
00807   Vec::template vec_binary_scalar<Op> (r, seg (v), x, n);
00808   return vector<T,V> (r, n, l, fm);
00809 }

format<typename binary_return_type_helper< Op , C1 , C2 >::RET > mmx::binary_map_scalar ( const format< C1 > &  fm,
const C2 &  x 
) [inline]

Definition at line 654 of file type_props.hpp.

References Binary_return_type, and C2.

00654                                                       {
00655   typedef Binary_return_type(Op,C1,C2) R;
00656   typedef typename format<R>::FT FT;
00657   return format_binary_map_scalar_helper<Op,FT,R,C1,C2>::op (fm, x);
00658 }

table<C,T,V> mmx::binary_map_scalar ( const table< C, T, V > &  t,
const X &  x 
) [inline]

Definition at line 517 of file table.hpp.

References busy(), CF2(), entries(), I(), simplify(), and Table.

00517                                                {
00518   Table r (Op::op (I(t), x), CF2(t));
00519   for (iterator<T> it= entries (t); busy (it); ++it)
00520     r[*it]= Op::op (t[*it], x);
00521   simplify (r);
00522   return r;
00523 }

sparse_vector<C,T,V> mmx::binary_map_scalar ( const sparse_vector< C, T, V > &  v,
const C &  x 
) [inline]

Definition at line 283 of file sparse_vector.hpp.

References C, N(), n, Pair, set_zero(), and Sparse_vector.

00283                                                        {
00284   typedef typename V::val_op Eq;
00285   static C zero; set_zero (zero);
00286   nat i, j, n= N(v);
00287   Pair* r= mmx_new<Pair > (n);
00288   for (i=0, j=0; i<n; i++) {
00289     Pair e (v[i].x1, Op::op (v[i].x2, x));
00290     if (Eq::not_op (e.x2, zero)) r[j++]= e;
00291   }
00292   return Sparse_vector (r, j, n);
00293 }

new_table<C,T,V> mmx::binary_map_scalar ( const new_table< C, T, V > &  t,
const X &  x 
) [inline]

Definition at line 588 of file new_table.hpp.

References busy(), CF2(), entries(), I(), simplify(), and Table.

00588                                                {
00589   Table r (Op::op (I(t), x), CF2(t));
00590   for (iterator<T> it= entries (t); busy (it); ++it)
00591     r[*it]= Op::op (t[*it], x);
00592   simplify (r);
00593   return r;
00594 }

C binary_read ( const port &  in  )  [inline]

Definition at line 233 of file port.hpp.

References read().

Referenced by binary_helper< compound >::read().

00233                              {
00234   return binary_helper<C>::read (in);
00235 }

generic mmx::binary_read_generic ( const generic &  in  )  [inline]

Definition at line 279 of file port.hpp.

00279                                         {
00280   return as<generic> (binary_read<T> (as<port> (in)));
00281 } 

generic binary_read_generic ( const port in  ) 

Definition at line 110 of file generic.cpp.

References ASSERT, binary_readers, mmerr, and read().

Referenced by GLUE_29(), and binary_helper< generic >::read().

00110                                      {
00111   string name;
00112   char buf[1];
00113   while (true) {
00114     mmx::read (in, buf, 1);
00115     if (buf[0] == ':') break;
00116     name << buf[0];
00117   }
00118   if (!binary_readers->contains (name))
00119     mmerr << "name= " << name << "\n";
00120   ASSERT (binary_readers->contains (name),
00121           "unsupported type for generic binary read");
00122   routine r= as<routine> (binary_readers[name]);
00123   return r->apply (as<generic> (in));
00124 }

routine mmx::binary_routine ( const generic name,
D(*)(const S1 &, const S2 &)  f 
) [inline]

Definition at line 267 of file routine.hpp.

Referenced by accelerate(), define_type_helper< C >::def_type(), define(), and define_user_type().

00267                                                                     {
00268   return new binary_routine_rep<D,S1,S2> (name, f);
00269 }

port mmx::binary_rr ( const port &  in,
C &  x 
) [inline]

Definition at line 244 of file port.hpp.

References read().

00244                                  {
00245   x= binary_helper<C>::read (in);
00246   return in;
00247 }

nat mmx::binary_size ( const C &  x  )  [inline]

Definition at line 208 of file port.hpp.

References size().

00208                          {
00209   return binary_helper<C>::size (x);
00210 }

bool mmx::binary_test ( const vector< C1, V > &  v,
const vector< C2, V > &  w 
) [inline]

Definition at line 851 of file vector.hpp.

References extend(), is_a_scalar(), is_non_scalar(), N(), n, vector< C, V >::scalar(), and seg().

00851                                                            {
00852   typedef implementation<vector_linear,V> Vec;
00853   if (is_a_scalar (v) || is_a_scalar (w)) {
00854     if (is_non_scalar (v)) return binary_test<Op> (v, extend (w, v));
00855     if (is_non_scalar (w)) return binary_test<Op> (extend (v, w), w);
00856     return Op::op (v.scalar(), w.scalar());
00857   }
00858   nat n= N(v);
00859   if (N(w) != n) return false;
00860   return Vec::template vec_binary_test<Op> (seg (v), seg (w), n);
00861 }

bool mmx::binary_test ( const triple< C1, C2, C3 > &  t1,
const triple< C1, C2, C3 > &  t2 
) [inline]

Definition at line 54 of file triple.hpp.

00054                                                  {
00055   return Op::op (t1.x1,t2.x1) && Op::op(t1.x2, t2.x2) && Op::op(t1.x3, t2.x3);
00056 }

bool mmx::binary_test ( const table< C, T, V > &  t,
const table< C, T, V > &  u 
) [inline]

Definition at line 545 of file table.hpp.

References busy(), entries(), and I().

00545                                              {
00546   if (Op::not_op (I(t), I(u))) return false;
00547   for (iterator<T> it= entries (t); busy (it); ++it)
00548     if (Op::not_op (t[*it], u[*it])) return false;
00549   for (iterator<T> it= entries (u); busy (it); ++it)
00550     if (!t->contains (*it) && Op::not_op (t[*it], u[*it])) return false;
00551   return true;
00552 }

bool mmx::binary_test ( const sparse_vector< C, T, V > &  v1,
const sparse_vector< C, T, V > &  v2 
) [inline]

Definition at line 159 of file sparse_vector.hpp.

References N().

00159                                                                {
00160   nat n1= N(v1), n2= N(v2);
00161   if (n1 != n2) return false;
00162   for (nat i=0; i<n1; i++)
00163     if (!Op::op (v1[i], v2[i]))
00164       return false;
00165   return true;
00166 }

bool mmx::binary_test ( const pair< C1, C2 > &  p1,
const pair< C1, C2 > &  p2 
) [inline]

Definition at line 49 of file pair.hpp.

00049                                              {
00050   return Op::op (p1.x1, p2.x1) && Op::op (p1.x2, p2.x2);
00051 }

bool mmx::binary_test ( const new_table< C, T, V > &  t,
const new_table< C, T, V > &  u 
) [inline]

Definition at line 616 of file new_table.hpp.

References busy(), entries(), and I().

00616                                              {
00617   if (Op::not_op (I(t), I(u))) return false;
00618   for (iterator<T> it= entries (t); busy (it); ++it)
00619     if (Op::not_op (t[*it], u[*it])) return false;
00620   for (iterator<T> it= entries (u); busy (it); ++it)
00621     if (!t->contains (*it) && Op::not_op (t[*it], u[*it])) return false;
00622   return true;
00623 }

bool mmx::binary_test ( const list< C > &  l1,
const list< C > &  l2 
) [inline]

Definition at line 222 of file list.hpp.

References is_nil(), read_car(), and read_cdr().

00222                                              {
00223   if (is_nil (l1) || is_nil (l2)) return is_nil (l1) && is_nil (l2);
00224   return Op::op (read_car (l1), read_car (l2)) &&
00225          binary_test<Op> (read_cdr (l1), read_cdr (l2));
00226 }

bool mmx::binary_test ( const iterator< C > &  it1b,
const iterator< C > &  it2b 
) [inline]

Definition at line 170 of file iterator.hpp.

References ERROR.

00170                                                          {
00171   (void) it1b; (void) it2b;
00172   ERROR ("invalid test on iterators");
00173   return false;
00174   /*
00175   Iterator it1= copy (it1b), it2= copy (it2b);
00176   while (busy (it1) && busy (it2)) {
00177     if (Op::not_op (*it1, *it2)) return false;
00178     ++it1; ++it2;
00179   }
00180   return done (it1) && done (it2);
00181   */
00182 }

bool mmx::binary_test ( const heap< C > &  h1b,
const heap< C > &  h2b 
) [inline]

Definition at line 235 of file heap.hpp.

References copy(), Heap, N(), and pull().

00235                                                {
00236   if (N(h1b) != N(h2b)) return false;
00237   Heap h1= copy (h1b), h2= copy (h2b);
00238   while (N(h1) > 0)
00239     if (Op::not_op (pull (h1), pull (h2))) return false;
00240   return true;
00241 }

bool mmx::binary_test ( const chain< C > &  c1,
const chain< C > &  c2 
) [inline]

Definition at line 230 of file chain.hpp.

References left(), middle(), N(), and right().

00230                                                {
00231   if (N (c1) != N (c2)) return false;
00232   if (N (c1) == 0) return true;
00233   return binary_test<Op> (left (c1), left(c2)) &&
00234     Op::op (middle (c1), middle (c2)) &&
00235     binary_test<Op> (right (c1), right(c2));
00236 }

bool mmx::binary_test_scalar ( const vector< C, V > &  v,
const X &  c 
) [inline]

Definition at line 864 of file vector.hpp.

References is_a_scalar(), N(), vector< C, V >::scalar(), and seg().

00864                                                       {
00865   typedef implementation<vector_linear,V> Vec;
00866   if (is_a_scalar (v)) return Op::op (v.scalar(), c);
00867   return Vec::template vec_binary_test_scalar<Op> (seg (v), c, N(v));
00868 }

bool mmx::binary_test_scalar ( const table< C, T, V > &  t,
const X &  c 
) [inline]

Definition at line 555 of file table.hpp.

References busy(), entries(), and I().

00555                                                 {
00556   if (Op::not_op (I(t), c)) return false;
00557   for (iterator<T> it= entries (t); busy (it); ++it)
00558     if (Op::not_op (t[*it], c)) return false;
00559   return true;
00560 }

bool mmx::binary_test_scalar ( const new_table< C, T, V > &  t,
const X &  c 
) [inline]

Definition at line 626 of file new_table.hpp.

References busy(), entries(), and I().

00626                                                 {
00627   if (Op::not_op (I(t), c)) return false;
00628   for (iterator<T> it= entries (t); busy (it); ++it)
00629     if (Op::not_op (t[*it], c)) return false;
00630   return true;
00631 }

generic binary_type_generic ( const generic g  ) 

Definition at line 79 of file generic.cpp.

Referenced by binary_helper< generic >::access().

00079                                        {
00080   return g->binary_type ();
00081 }

void binary_write ( const port &  out,
const C &  x 
) [inline]

Definition at line 228 of file port.hpp.

References write().

Referenced by generic_concrete_rep< C >::binary_write().

00228                                            {
00229   binary_helper<C>::write (out, x);
00230 }

void binary_write_generic ( const port out,
const generic g 
)

Definition at line 105 of file generic.cpp.

Referenced by GLUE_28(), and binary_helper< generic >::write().

00105                                                          {
00106   g->binary_write (out);
00107 }

C mmx::binpow ( const C &  i,
const nat &  n 
) [inline]

Definition at line 540 of file defaults.hpp.

References C, promote(), and square().

Referenced by prem_op::op(), and powint().

00540                                   {
00541   // FIXME: how to merge with pow?
00542   if (n <= 1) return n==0? promote (1, i): i;
00543   C j= square (binpow (i, n >> 1));
00544   if ((n&1) == 0) return j;
00545   else return i * j;
00546 }

static nat mmx::bit_size ( const C &  p  )  [inline, static]

Return the bitsize of abs (p).

Definition at line 309 of file int.hpp.

References abs(), C, and s.

00309                       {
00310   typedef typename unsigned_of_helper<C>::type uC;
00311   if (p == 0) return 0;
00312   uC up = abs (p);
00313   nat s = 0;
00314   nat k = 4 * sizeof(C);
00315   uC mask = ((uC) -1) << k;
00316   while (k != 0) {
00317     if (up & mask) { up >>= k; s += k; }
00318     k >>= 1;
00319     mask >>= k;
00320   }
00321   return up == 0 ? s : s + 1;
00322 }

vector<C,V> mmx::blur ( const vector< C, V > &  v,
const vector< C2, V2 > &  w 
) [inline]

Definition at line 1358 of file vector.hpp.

01358                                                {
01359   return binary_map<blur_op> (v, w); }

vector<C,V> mmx::blur ( const vector< C, V > &  v,
const K &  x 
) [inline]

Definition at line 1355 of file vector.hpp.

01355                                                        {
01356   return binary_map_scalar<blur_op> (v, x); }

table<C,T,V> mmx::blur ( const table< C, T, V > &  t,
const K &  x 
) [inline]

Definition at line 741 of file table.hpp.

00741                                                      {
00742   return binary_map_scalar<blur_op> (t, x); }

new_table<C,T,V> mmx::blur ( const new_table< C, T, V > &  t,
const K &  x 
) [inline]

Definition at line 812 of file new_table.hpp.

00812                                                      {
00813   return binary_map_scalar<blur_op> (t, x); }

generic blur ( const generic x1,
const generic x2 
)

Definition at line 827 of file generic.cpp.

References current_ev.

00827                                                     {
00828   return current_ev->apply ("blur", x1, x2); }

C mmx::blur ( const C &  x,
const D &  y 
) [inline]

Definition at line 709 of file defaults.hpp.

Referenced by blur_op::op(), and blur_op::set_op().

00709                                                                         {
00710   (void) y; return x; }

unary_return_type_helper<abs_op, C >::RET mmx::bnd_down ( const C &  x  )  [inline]

Definition at line 1100 of file type_props.hpp.

01100 { return as<Abs_type(C) > (x); }

unary_return_type_helper<abs_op, C >::RET mmx::bnd_up ( const C &  x  )  [inline]

Definition at line 1102 of file type_props.hpp.

01102 { return as<Abs_type(C) > (x); }

mmx::bool ( (((const generic &g)>='0')&&((const generic &g)<='9'))||(((const generic &g)>='A')&&((const generic &g)<='Z'))||(((const generic &g)>='a')&&((const generic &g)<='z'))||(((const generic &g)=='_')||((const generic &g)=='?')||((const generic &g)=='$'))   ) 

Definition at line 211 of file mmx_texmacs.cpp.

References literal_to_string(), N(), and s.

00211                             {
00212   if (!is<literal> (g)) return false;
00213   string s= literal_to_string (g);
00214   for (nat i=0; i<N(s); i++)
00215     if ((s[i] < 'a' || s[i] > 'z') &&
00216         (s[i] < 'A' || s[i] > 'Z'))
00217       return false;
00218   return true;
00219 }

generic mmx::bracket ( const generic l,
const generic g,
const generic r 
) [inline]

Definition at line 133 of file mmx_printer.cpp.

References gen().

Referenced by mmx_printer::pp_E0().

00133                                                                               {
00134   return gen ("$bracket", l, g, r); }

bool mmx::busy ( const port &  p  )  [inline]

Definition at line 101 of file port.hpp.

References inside().

00101                                  {
00102   return inside (p)->busy (); }

bool busy ( const iterator< C > &  it  )  [inline]
storage cached_storage ( const storage st  ) 

Create storage which will be stored on disk in the directory root.

Definition at line 183 of file storage.cpp.

Referenced by GLUE_3().

00183                                    {
00184   return st;
00185 }

void call_glue ( const string s  ) 
nat mmx::can_read ( const port &  p  )  [inline]

Definition at line 105 of file port.hpp.

References inside().

Referenced by composite_port_rep::can_read(), GLUE_15(), composite_port_rep::read(), and var_load().

00105                                     {
00106   return inside (p)->can_read (); }

nat mmx::can_write ( const port &  p  )  [inline]

Definition at line 103 of file port.hpp.

References inside().

Referenced by composite_port_rep::can_write(), and GLUE_14().

00103                                      {
00104   return inside (p)->can_write (); }

string canonical_name ( const string name  ) 

Definition at line 356 of file system.cpp.

References ends(), get_directory(), and N().

Referenced by path_name(), recursive_search_name(), relative_name(), and semi_recursive_search_name().

00356                                     {
00357   //mmout << "canonical_name: " << name << lf;
00358   for (int i= N(name)-1; i>=0; i--)
00359     if (name[i] == '/') {
00360       nat j=i;
00361       while (j>0 && name[j-1] == '/') j--;
00362       string pre = canonical_name (name (0, j));
00363       string post= name (i+1, N(name));
00364       if (pre == "") return "/" * post;
00365       else if (pre == ".") return post;
00366       else if (post == ".") return pre;
00367       else if (ends (pre, "..") && post == "..") return pre * "/" * post;
00368       else if (post == "..") return get_directory (pre);
00369       else return pre * "/" * post;
00370     }
00371   return name;
00372 }

generic mmx::cAr ( const vector< generic > &  a  )  [inline]

Definition at line 131 of file cpp_printer.cpp.

References N().

00131                                {
00132   if (N(a) == 0)
00133     return generic ();
00134   return a[N(a)-1];
00135 }

C mmx::car ( const vector< C, V > &  v  )  [inline]

Definition at line 621 of file vector.hpp.

00621 { return v[0]; }

C2 C1 mmx::car ( const pair< C1, C2 > &  p  )  [inline]

Definition at line 37 of file pair.hpp.

00037 { return p.x1; }

C & car ( list< C > &  l  )  [inline]

Return the head of l.

Return a copy of car (l) for write access.

Definition at line 144 of file list.hpp.

00144 { l.secure(); return l.rep->item; }

const C & car ( const list< C > &  l  )  [inline]

Return the head of l.

Definition at line 140 of file list.hpp.

00140 { return l.rep->item; }

generic car ( const generic g  ) 

Definition at line 46 of file generic_utils.cpp.

00046                        {
00047   return g[0];
00048 }

C mmx::cAr ( const chain< C > &  c  )  [inline]

Definition at line 214 of file chain.hpp.

References ASSERT, is_nil(), middle(), and right().

Referenced by operator*().

00214                      {
00215   ASSERT (!is_nil (c), "non-empty chain expected");
00216   if (is_nil (right (c))) return middle (c);
00217   return cAr (right (c));
00218 }

C mmx::car ( const chain< C > &  c  )  [inline]
C mmx::catalan_cst ( const format< C > &  fm  )  [inline]

Definition at line 933 of file type_props.hpp.

References C, promote(), and set_catalan().

00933                                   {
00934   C r= promote (0, fm); set_catalan (r); return r; }

C mmx::catalan_cst (  )  [inline]

Definition at line 900 of file type_props.hpp.

References C, and set_catalan().

00900 { C r; set_catalan (r); return r; }

vector<generic> mmx::cDr ( const vector< generic > &  a  )  [inline]

Definition at line 138 of file cpp_printer.cpp.

References N(), and range().

00138                                {
00139   if (N(a) == 0)
00140     return a;
00141   return range (a,0,N(a)-1);
00142 }

vector<C,V> mmx::cdr ( const vector< C, V > &  v  )  [inline]

Definition at line 622 of file vector.hpp.

References N(), and range().

00622 { return range (v, 1, N(v)); }

C2 mmx::cdr ( const pair< C1, C2 > &  p  )  [inline]

Definition at line 38 of file pair.hpp.

00038 { return p.x2; }

list< C > & cdr ( list< C > &  l  )  [inline]

Return the tail of l.

Return a copy of cdr (l) for write access.

Definition at line 149 of file list.hpp.

00149 { l.secure(); return l.rep->next; }

const list< C > & cdr ( const list< C > &  l  )  [inline]

Return the tail of l.

Definition at line 145 of file list.hpp.

00145 { return l.rep->next; }

generic cdr ( const generic g  ) 

Definition at line 51 of file generic_utils.cpp.

References compound_to_vector(), N(), range(), and vector_to_compound().

00051                        {
00052   return vector_to_compound (range (compound_to_vector (g), 1, N(g)));
00053 }

chain<C> mmx::cDr ( const chain< C > &  c  )  [inline]

Definition at line 310 of file chain.hpp.

References ASSERT, balance_right(), Chain, is_nil(), left(), middle(), N(), and right().

Referenced by operator*().

00310                      {
00311   ASSERT (!is_nil (c), "non-empty chain expected");
00312   if (N (c) == 1) return Chain ();
00313   if (2 * N (right (c)) <= N (left (c))) return cDr (balance_right (c));
00314   return Chain (left (c), middle (c), cDr (right (c)));
00315 }

chain<C> mmx::cdr ( const chain< C > &  c  )  [inline]
generic ceil ( const generic x  ) 

Definition at line 753 of file generic.cpp.

References current_ev, and GEN_CEIL.

00753                                 {
00754   return current_ev->apply (GEN_CEIL, x); }

double ceil ( const double &  x  )  [inline]

Definition at line 131 of file double.hpp.

Referenced by ceil_op::op(), and ceil_op::set_op().

00131 { return std::ceil (x); }

vector<typename unary_return_type_helper<center_op, C >::RET,V> mmx::center ( const vector< C, V > &  v  )  [inline]

Definition at line 1345 of file vector.hpp.

01345                                             {
01346   return unary_map<center_op> (v); }

C mmx::center ( const C &  x  )  [inline]

Definition at line 1092 of file type_props.hpp.

01092 { return x; }

syntactic center ( const syntactic g1  ) 

Definition at line 460 of file syntactic.cpp.

References GEN_CENTER, and syn().

00460 { return syn (GEN_CENTER, g1); }

generic center ( const generic x1  ) 

Definition at line 821 of file generic.cpp.

References current_ev.

Referenced by center_op::Center_type(), and center_op::set_op().

00821                                    {
00822   return current_ev->apply ("center", x1); }  

format<C> mmx::CF ( const vector< C, V > &  v  )  [inline]

Definition at line 211 of file vector.hpp.

00211 { return v->tfm (); }

format<C> mmx::CF ( const iterator< C > &  it  )  [inline]
format<C1> mmx::CF1 ( const triple< C1, C2, C3 > &  t  )  [inline]

Definition at line 43 of file triple.hpp.

References get_format().

00043 { return get_format (t.x1); }

format<C> mmx::CF1 ( const table< C, T, V > &  t  )  [inline]

Definition at line 162 of file table.hpp.

00162 { return t->tfm1 (); }

format<C1> mmx::CF1 ( const pair< C1, C2 > &  p  )  [inline]

Definition at line 39 of file pair.hpp.

References get_format().

00039 { return get_format (p.x1); }

format<C> mmx::CF1 ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 184 of file new_table.hpp.

Referenced by reverse().

00184 { return t->tfm1 (); }

format<C2> mmx::CF2 ( const triple< C1, C2, C3 > &  t  )  [inline]

Definition at line 44 of file triple.hpp.

References get_format().

00044 { return get_format (t.x2); }

format<T> mmx::CF2 ( const table< C, T, V > &  t  )  [inline]

Definition at line 163 of file table.hpp.

00163 { return t->tfm2 (); }

format<C2> mmx::CF2 ( const pair< C1, C2 > &  p  )  [inline]

Definition at line 40 of file pair.hpp.

References get_format().

00040 { return get_format (p.x2); }

format<T> mmx::CF2 ( const new_table< C, T, V > &  t  )  [inline]
format<C3> mmx::CF3 ( const triple< C1, C2, C3 > &  t  )  [inline]

Definition at line 45 of file triple.hpp.

References get_format().

00045 { return get_format (t.x3); }

vector<C,V> mmx::change_precision ( const vector< C, V > &  v,
xnat  p 
) [inline]

Definition at line 1326 of file vector.hpp.

01326                                                               {
01327   return binary_map_scalar<change_precision_op> (v, p); }

generic change_precision ( const generic x,
xnat  p 
)

Definition at line 762 of file generic.cpp.

References current_ev, and GEN_CHANGE_PRECISION.

00762                                                     {
00763   return current_ev->apply (GEN_CHANGE_PRECISION, x, as<generic> ((int) p)); }

double mmx::change_precision ( const double &  x,
xnat  prec 
) [inline]

Definition at line 84 of file double.hpp.

References ASSERT.

00084                                                             {
00085   ASSERT (prec == 51, "invalid precision"); return x; }

C mmx::change_precision ( const C &  x,
xnat   
) [inline]

Definition at line 705 of file defaults.hpp.

Referenced by GLUE_44(), change_precision_op::op(), and change_precision_op::set_op().

00705                                                                   {
00706   return x; }

routine change_signature ( const routine r,
const vector< nat > &  sig 
)

Definition at line 201 of file routine.cpp.

Referenced by define_user_type().

00201                                                             {
00202   return new change_signature_routine_rep (r, sig);
00203 }

string mmx::charcode_as_string ( int  i  )  [inline]

Definition at line 144 of file string.hpp.

Referenced by GLUE_22(), and read_line().

00144                                          {
00145   return string ((char) i); }

void mmx::clear ( C &  x  )  [inline]

Definition at line 167 of file defaults.hpp.

References promote().

Referenced by clear_op::set_op().

00167 { 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().

00058 { a->close (); }

static vector<generic> mmx::collect ( const generic g  )  [static]

Definition at line 794 of file mmx_printer.cpp.

References collect(), GEN_MINUS, GEN_PLUS, is_func(), and N().

00794                            {
00795   vector<generic> v;
00796   collect (v, g, 0);
00797   vector<generic> w;
00798   for (nat i=0; i<N(v); i++)
00799     if (is_func (v[i], GEN_PLUS, 2) || is_func (v[i], GEN_MINUS, 2))
00800       w << collect (v[i]);
00801     else w << v[i];
00802   return w;
00803 }

static void mmx::collect ( vector< generic > &  v,
const generic g,
nat  depth 
) [static]

Definition at line 780 of file mmx_printer.cpp.

References gen(), GEN_MINUS, GEN_PLUS, and is_func().

Referenced by collect().

00780                                                           {
00781   if (depth >= 16384) v << g;
00782   else if (is_func (g, GEN_PLUS, 2)) {
00783     collect (v, g[1], depth+1);
00784     collect (v, g[2], depth+1);
00785   }
00786   else if (is_func (g, GEN_MINUS, 2)) {
00787     collect (v, g[1], depth+1);
00788     v << gen (GEN_MINUS, g[2]);
00789   }
00790   else v << g;
00791 }

generic comma ( const generic x1,
const generic x2 
)

Definition at line 171 of file generic.cpp.

References gen(), and GEN_COMMA.

00171                                                      {
00172   return gen (GEN_COMMA, g1, g2); }

generic comma (  ) 

Definition at line 169 of file generic.cpp.

References gen(), and GEN_COMMA.

Referenced by trig_op::op(), trig(), and xaccess().

00169                  {
00170   return gen (generic (GEN_COMMA)); }

string command_dir (  ) 

Definition at line 196 of file system.cpp.

References _from_dos_to_unix(), command_name, and get_directory().

Referenced by global_path(), and prefix_dir().

00196                {
00197   return get_directory (_from_dos_to_unix (string (command_name)));
00198 }

table<C,T,V> mmx::common ( const table< C, T, V > &  t,
const table< C, T, V > &  u 
) [inline]

Definition at line 775 of file table.hpp.

References busy(), CF2(), entries(), I(), and Table.

00775                                         {
00776   Table r (I (t), CF2(t));
00777   for (iterator<T> it= entries (t); busy (it); ++it)
00778     if (V::val_op::op (u[*it], t[*it]))
00779       r[*it]= t[*it];
00780   return r;
00781 }

new_table<C,T,V> mmx::common ( const new_table< C, T, V > &  t,
const new_table< C, T, V > &  u 
) [inline]

Definition at line 846 of file new_table.hpp.

References busy(), CF2(), entries(), I(), and Table.

00846                                         {
00847   Table r (I (t), CF2(t));
00848   for (iterator<T> it= entries (t); busy (it); ++it)
00849     if (V::val_op::op (u[*it], t[*it]))
00850       r[*it]= t[*it];
00851   return r;
00852 }

C mmx::common_part ( const C &  x,
const C &  y 
) [inline]

Definition at line 735 of file defaults.hpp.

References promote().

Referenced by common_part_op::op().

00735                                      {
00736   if (x == y) return x;
00737   else return promote (0, x);
00738 }

static int compare ( const generic g1,
const generic g2,
const int &  dir 
) [static]

Definition at line 162 of file generic_utils.cpp.

References compare_N(), compare_P(), and MEMOIZE_BINARY.

00162                                                                {
00163   // NOTE: the splitting into two cases should not be necessary.
00164   // We do it in order to avoid an internal compiler error...
00165   if (dir < 0) {
00166     MEMOIZE_BINARY (std_memoizer,int,generic,generic,compare_N,g1,g2,
00167                    compare_N (g1, g2));
00168   }
00169   else {
00170     MEMOIZE_BINARY (std_memoizer,int,generic,generic,compare_P,g1,g2,
00171                    compare_P (g1, g2));
00172   }
00173 }

int mmx::compare ( const long long unsigned int &  x,
const long long unsigned int &  y 
) [inline]

Definition at line 449 of file defaults.hpp.

00450                                           {
00451   if (x < y) return -1;
00452   if (x > y) return  1;
00453   return 0;
00454 }

int mmx::compare ( const long unsigned int &  x,
const long unsigned int &  y 
) [inline]

Definition at line 442 of file defaults.hpp.

00442                                                                  {
00443   if (x < y) return -1;
00444   if (x > y) return  1;
00445   return 0;
00446 }

int mmx::compare ( const unsigned int &  x,
const unsigned int &  y 
) [inline]

Definition at line 435 of file defaults.hpp.

00435                                                        {
00436   if (x < y) return -1;
00437   if (x > y) return  1;
00438   return 0;
00439 }

int mmx::compare ( const short unsigned int &  x,
const short unsigned int &  y 
) [inline]

Definition at line 428 of file defaults.hpp.

00428                                                                    {
00429   if (x < y) return -1;
00430   if (x > y) return  1;
00431   return 0;
00432 }

int mmx::compare ( const unsigned char &  x,
const unsigned char &  y 
) [inline]

Definition at line 421 of file defaults.hpp.

00421                                                          {
00422   if (x < y) return -1;
00423   if (x > y) return  1;
00424   return 0;
00425 }

int mmx::compare ( const C &  x,
const C &  y 
) [inline]

Definition at line 416 of file defaults.hpp.

References sign().

Referenced by big_small_compare(), compare_sub(), and small_big_compare().

00416                                  {
00417   return sign (x-y);
00418 }

int mmx::compare_N ( const generic g1,
const generic g2 
)

Definition at line 156 of file generic_utils.cpp.

References compare_sub().

Referenced by compare().

00156                                                      {
00157   return compare_sub (g1, g2, -1); }

static int mmx::compare_numeric ( const string s1,
const string s2 
) [static]

Definition at line 112 of file generic_utils.cpp.

References N().

Referenced by compare_sub().

00112                                                      {
00113   if (s1[0] == '-' && s2[0] != '-') return -1;
00114   if (s1[0] != '-' && s2[0] == '-') return 1;
00115   if (s1[0] == '-' && s2[0] == '-')
00116     return -compare_numeric (s1 (1, N (s1)), s2 (1, N(s2)));
00117   if (N(s1) < N(s2)) return -1;
00118   if (N(s1) > N(s2)) return 1;
00119   if (s1 < s2) return -1;
00120   if (s1 > s2) return 1;
00121   return 0;
00122 }

int mmx::compare_P ( const generic g1,
const generic g2 
)

Definition at line 158 of file generic_utils.cpp.

References compare_sub().

Referenced by compare().

00158                                                      {
00159   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().

00127                                                                          {
00128   nat s1= size (g1), s2= size (g2);
00129   if (s1 < s2) return -direction;
00130   if (s1 > s2) return direction;
00131   if (is<literal> (g1) && is<literal> (g2)) {
00132     string l1= literal_to_string (g1), l2= literal_to_string (g2);
00133     if (is_numeric (l1) && !is_numeric (l2)) return -direction;
00134     if (is_numeric (l2) && !is_numeric (l1)) return direction;
00135     if (is_numeric (l1) && is_numeric (l2))
00136       return direction * compare_numeric (l1, l2);
00137     if (l1 < l2) return -1;
00138     if (l1 > l2) return 1;
00139     return 0;
00140   }
00141   if (is<literal> (g1) && is<compound> (g2)) return -direction;
00142   if (is<compound> (g1) && is<literal> (g2)) return direction;
00143   if (is<compound> (g1) && is<compound> (g2)) {
00144     nat i, n1= N (g1), n2= N (g2);
00145     if (n1 < n2) return -direction;
00146     if (n1 > n2) return direction;
00147     for (i=0; i<n1; i++) {
00148       int c= compare (g1[i], g2[i], direction);
00149       if (c != 0) return c;
00150     }
00151     return 0;
00152   }
00153   return compare (var_flatten (g1), var_flatten (g2), direction);
00154 }

static void mmx::complete ( const string text  )  [static]

Definition at line 42 of file texmacs_interface.cpp.

References car(), cdr(), cons(), entries(), identifiers_for_completion, is_nil(), N(), output_completion(), starts(), and strings_for_completion.

00042                               {
00043   list<string> matches, tomatch;
00044   string name;
00045   tomatch = identifiers_for_completion
00046       * as<list<string> > (list<generic> (entries (strings_for_completion)));
00047   while (!is_nil (tomatch)) {
00048     name = car (tomatch);
00049     tomatch = cdr (tomatch);
00050     if (starts (name, text))
00051       matches = cons (name (N(text), N(name)), matches);
00052   }
00053   output_completion (text, matches);
00054 }

static char** mmx::complete ( const char *  text,
int(obj->lex_start)  ,
int  end 
) [static]

Definition at line 262 of file terminal_interface.cpp.

References completion_generator().

00262                                                 {
00263   char **matches;
00264 
00265 #if defined(RL_VERSION_MAJOR) && RL_VERSION_MAJOR >= 4
00266   rl_completion_append_character = '\0';
00267 #endif
00268   matches = (char **)NULL;
00269   matches = rl_completion_matches(text, completion_generator);
00270   return (matches);
00271 }

vector<typename unary_return_type_helper<complete_op, C >::RET> mmx::complete ( const vector< C, V > &  v  )  [inline]

Definition at line 1303 of file vector.hpp.

Referenced by complete_op::Complete_type(), handle_completion_request(), complete_op::set_op(), and shell_terminal_input().

01303                                                  {
01304   return as<Completed_vector> (unary_map<complete_op> (v)); }

static char* mmx::completion_generator ( const char *  text,
int  state 
) [static]

Definition at line 210 of file terminal_interface.cpp.

References as_charp(), car(), cdr(), dot(), duplicate(), entries(), free_charp(), identifiers_for_completion, is_nil(), and strings_for_completion.

Referenced by complete().

00210                                                    {
00211   static nat text_len;
00212   static list<string> current_list;
00213   iterator<string> iter;
00214   string name;
00215   char *tmp, *copiedname;
00216   /* If this is a new word to complete, initialize now.  This includes
00217      saving the length of TEXT for efficiency, and initializing the index
00218      variable to 0. */
00219   if (!state) {
00220     rl_special_prefixes = "$";
00221     current_list = identifiers_for_completion
00222       * as<list<string> > (list<generic> (entries (strings_for_completion)));
00223     text_len = strlen (text);
00224   }
00225   
00226   /* Return the next name which partially matches from the command list. */
00227   while (!is_nil(current_list)) {
00228     name = car (current_list);
00229     current_list = cdr (current_list);
00230     tmp = as_charp (name);
00231     if (strncmp (tmp, text, text_len) == 0) {
00232       // Alloc memory for copiedname with malloc
00233       copiedname = duplicate (tmp);
00234       free_charp (tmp);
00235       // Readline frees the strings when it has finished with them.
00236       return copiedname;
00237     }
00238     else { // Completion of members of a class, such as z.re
00239       int dot;
00240       for (dot= text_len-1; dot>=0 && text[dot] != '.'; dot--);
00241       if (dot >= 0 && strncmp (text + dot, tmp, text_len - dot) == 0) {
00242         char* r= (char*) malloc (dot + strlen (tmp) + 1);
00243         strncpy (r, text, dot);
00244         strcpy  (r + dot, tmp);
00245         free_charp (tmp);
00246         return r;
00247       }
00248       else free_charp (tmp);
00249     }
00250   }
00251 
00252   /* If no names matched, then return NULL. */
00253   return ((char *)NULL);
00254 }

double mmx::complexity ( const table< C, T, V > &  t  )  [inline]

Definition at line 185 of file table.hpp.

00185                                                {
00186   return t->complexity (); }

double mmx::complexity ( const cache< C, T > &  c  )  [inline]

Definition at line 63 of file cache.hpp.

Referenced by symbol_rep< vector< generic >, exact_eq_table >::complexity_entries().

00063                                                {
00064   return complexity (*c); }

double mmx::complexity_entries (  )  [inline]

Definition at line 138 of file symbol.hpp.

References symbol_rep< C, V >::complexity_entries().

00138                                                   {
00139   return symbol_rep<C>::complexity_entries (); }

port component ( const port &  p,
const string &  name 
)

Definition at line 107 of file port.cpp.

References inside().

Referenced by GLUE_21().

00107                                                    {
00108   return inside (p)->component (name); }

vector< syntactic > components ( const syntactic g  ) 

Definition at line 86 of file syntactic.cpp.

References N().

Referenced by arguments().

00086                                 {
00087   vector<syntactic> v= fill<syntactic> (N(g));
00088   for (nat i=0; i<N(g); i++) v[i]= g[i];
00089   return v;
00090 }

routine mmx::compose ( const routine fun,
const routine arg 
) [inline]

Definition at line 441 of file routine.hpp.

References compose(), and vec().

00441                                                                 {
00442   return compose (fun, vec (arg)); }

routine compose ( const routine fun,
const vector< routine > &  args 
)

Definition at line 166 of file routine.cpp.

References exact_eq(), exact_neq(), GEN_IDENTITY, and N().

00166                                                           {
00167   // WARNING: the signature of the result is not necessarily correct
00168   // when simplifying with "fake identity functions", but that does not
00169   // matter for the application to overloading
00170   if (exact_eq (fun->name, GEN_IDENTITY) && N(args) == 1)
00171     return args [0];
00172   for (nat i=0; i<N(args); i++) {
00173     if (exact_neq (args[i]->name, GEN_IDENTITY))
00174       return new composed_routine_rep (fun, args);
00175   }
00176   return fun;
00177 }

generic compose ( const generic x1,
const generic x2 
)

Definition at line 698 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().

00698                                                        {
00699   return current_ev->apply (GEN_COMPOSE, x1, x2); }

port composite_port ( const vector< port > &  ps,
const vector< string > &  names 
)

Definition at line 129 of file composite_port.cpp.

References ASSERT, and N().

00129                                                                      {
00130   ASSERT (N(ps) == N(names), "lengths do not match");
00131   return (port_rep*) new composite_port_rep (ps, names);
00132 }

port composite_port ( const vector< port > &  ps  ) 

Definition at line 135 of file composite_port.cpp.

References as_string(), N(), and n.

Referenced by GLUE_7(), and pipe_port().

00135                                         {
00136   nat i, n= N(ps);
00137   vector<string> names= fill<string> (n);
00138   for (i=0; i<n; i++) names[i]= as_string (i);
00139   return composite_port (ps, names);
00140 }

compound mmx::compound_apply ( const compound f,
const vector< generic > &  v 
) [inline]

Definition at line 75 of file mmc_glue.hpp.

References cons().

00075                                                              {
00076   return compound (cons (as<generic> (f), v));
00077 }

vector< generic > compound_to_vector ( const generic g  ) 
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().

00126                                                              {
00127   return gen ("$concat", g1, g2, g3, g4); }

generic mmx::concat ( const generic g1,
const generic g2,
const generic g3 
) [inline]

Definition at line 122 of file mmx_printer.cpp.

References gen().

00123                                           {
00124   return gen ("$concat", g1, g2, g3); }

generic mmx::concat ( const generic g1,
const generic g2 
) [inline]

Definition at line 120 of file mmx_printer.cpp.

References gen().

00120                                                              {
00121   return gen ("$concat", g1, g2); }

generic mmx::concat (  )  [inline]

Definition at line 118 of file mmx_printer.cpp.

References gen().

00118                          {
00119   return gen ("$concat"); }

generic mmx::concat ( const vector< generic > &  v  )  [inline]

Definition at line 116 of file mmx_printer.cpp.

References gen().

00116                                                  {
00117   return gen ("$concat", v); }

void mmx::concat_append ( vector< generic > &  v,
const generic g 
)

Definition at line 222 of file mmx_texmacs.cpp.

References compound_to_vector(), gen(), is_func(), literal_to_string(), and N().

Referenced by as_texmacs().

00222                                                      {
00223   if (g == "");
00224   else if (is_func (g, "$concat")) {
00225     vector<generic> w= compound_to_vector (g);
00226     for (nat i=1; i<N(w); i++) concat_append (v, w[i]);
00227   }
00228   else if (N(v) == 0) v << g;
00229   else if (is<literal> (v[N(v)-1]) && is<literal> (g))
00230     v[N(v)-1]= generic (literal_to_string (v[N(v)-1]) * literal_to_string (g));
00231   else if (is_func (v[N(v)-1], "$lprime", 1) && is_func (g, "$lprime", 1)) {
00232     generic p (literal_to_string (v[N(v)-1][1]) * literal_to_string (g[1]));
00233     v[N(v)-1]= gen ("$lprime", p);
00234   }
00235   else if (is_func (v[N(v)-1], "$rprime", 1) && is_func (g, "$rprime", 1)) {
00236     generic p (literal_to_string (v[N(v)-1][1]) * literal_to_string (g[1]));
00237     v[N(v)-1]= gen ("$rprime", p);
00238   }
00239   else v << g;
00240 }

U mmx::concrete_to_abstract ( const T &  g  )  [inline]

Definition at line 182 of file mmc_glue.hpp.

00182                                   {
00183   return any_as_generic<T> (g);
00184 }

generic mmx::concrete_vector ( const vector< generic > &  abst,
const generic conc 
) [inline]

Definition at line 304 of file vector.hpp.

00304                                                                    {
00305   return conc->make_concrete_vector (as<generic> (abst));
00306 }

vector<C,V> mmx::conj ( const vector< C, V > &  v  )  [inline]

Definition at line 1343 of file vector.hpp.

01343 { return unary_map<conj_op> (v); }

syntactic conj ( const syntactic g1  ) 

Definition at line 454 of file syntactic.cpp.

References GEN_CONJ, and syn().

00454 { return syn (GEN_CONJ, g1); }

generic conj ( const generic x1  ) 

Definition at line 738 of file generic.cpp.

References current_ev, and GEN_CONJ.

00738                                  {
00739   return current_ev->apply (GEN_CONJ, x1); }

C mmx::conj ( const C &  x  )  [inline]

Definition at line 718 of file defaults.hpp.

Referenced by conj_op::op(), and conj_op::set_op().

00718 { return x; }

static port connect_to_server (  )  [static]

Definition at line 57 of file storage.cpp.

References ASSERT, error_flag(), file_exists(), path_name(), socket_client_port(), system(), and wait_port_event().

00057                      {
00058   port server= socket_client_port ("localhost", 3124);
00059   if (error_flag (server)) {
00060     ASSERT (file_exists (path_name ("$PATH", "storage_server")),
00061             "storage server cannot be started");
00062     system ("storage_server&");
00063     nat pause= 1;
00064     while (error_flag (server)) {
00065       (void) wait_port_event (pause);
00066       server= socket_client_port ("localhost", 3124);
00067       pause *= 2;
00068       ASSERT (pause < 5000, 
00069               "storage server cannot be started");
00070     }
00071   }
00072   binary_write<string> (server, "connect");
00073   return server;
00074 }

vector<C,V> mmx::cons ( const C &  c,
const vector< C, V > &  v 
) [inline]

Definition at line 650 of file vector.hpp.

References ASSERT, C, CF(), copy(), is_non_scalar(), N(), n, seg(), and Vector.

00650                                    {
00651   typedef implementation<vector_linear,V> Vec;
00652   ASSERT (is_non_scalar (v), "non-scalar vector expected");
00653   nat n= N(v);
00654   nat l= aligned_size<C,V> (n+1);
00655   C* a= mmx_formatted_new<C> (l, CF(v));
00656   a[0]= c;
00657   Vec::copy (a+1, seg (v), n);
00658   return Vector (a, n+1, l, CF(v));
00659 }

list< C > cons ( const C &  c,
const list< C > &  l 
) [inline]

Return a new list with head and tail l.

Definition at line 139 of file list.hpp.

References List.

00139 { return List (c, l); }

generic cons ( const generic g1,
const generic g2,
const generic g3 
)

Definition at line 40 of file generic_utils.cpp.

References append(), compound_to_vector(), and vector_to_compound().

00040                                                                {
00041   return vector_to_compound (append (vec<generic> (g1, g2),
00042                                      compound_to_vector (g3)));
00043 }

generic cons ( const generic g1,
const generic g2 
)
generic construct ( const generic x  ) 

Definition at line 214 of file generic.cpp.

References current_ev.

00214                              {
00215   return current_ev->construct (x);
00216 }

generic construct ( const float &  x  ) 

Definition at line 209 of file generic.cpp.

References current_ev.

00209                            {
00210   return current_ev->construct (as<generic> ((double) x));
00211 }

generic construct ( const double &  x  ) 

Definition at line 204 of file generic.cpp.

References current_ev.

00204                             {
00205   return current_ev->construct (as<generic> (x));
00206 }

generic construct ( const nat &  i  ) 

Definition at line 199 of file generic.cpp.

References current_ev.

00199                          {
00200   return current_ev->construct (as<generic> ((int) i));
00201 }

generic construct ( const int &  i  ) 

Definition at line 194 of file generic.cpp.

References current_ev.

Referenced by generic_concrete_rep< C >::acc_construct(), and as_generic().

00194                          {
00195   return current_ev->construct (as<generic> (i));
00196 }

bool mmx::contains ( const vector< C, V > &  v,
const C &  x 
) [inline]

Definition at line 713 of file vector.hpp.

References find(), and N().

00713                                        {
00714   return find (v, x) < ((int) N(v));
00715 }

bool mmx::contains ( const table< C, T, V > &  t,
const T &  x 
) [inline]

Definition at line 180 of file table.hpp.

00180                                                        {
00181   return t->contains (x); }

bool mmx::contains ( const table< C, T, V > &  t,
const K &  x 
) [inline]

Definition at line 169 of file table.hpp.

00169                                                         {
00170   return t->contains (as<T> (x)); }

bool mmx::contains ( const new_table< C, T, V > &  t,
const T &  x 
) [inline]

Definition at line 202 of file new_table.hpp.

00202                                                        {
00203   return t->contains (x); }

bool mmx::contains ( const new_table< C, T, V > &  t,
const K &  x 
) [inline]

Definition at line 191 of file new_table.hpp.

00191                                                         {
00192   return t->contains (as<T> (x)); }

bool mmx::contains ( const list< C > &  l,
const C &  x 
) [inline]

Definition at line 327 of file list.hpp.

References car(), cdr(), and is_nil().

00327                                      {
00328   if (is_nil (l)) return false;
00329   else return car (l) == x || contains<C> (cdr (l), x);
00330 }

bool mmx::contains ( const cache< C, T > &  c,
const T &  x 
) [inline]
generic mmx::contents ( const dynamic d  )  [inline]

Definition at line 90 of file dynamic.hpp.

References inside().

Referenced by GLUE_2(), and shell_save_session().

00090 { return inside (d) -> val; }

generic convert ( const generic from,
const generic to 
)

Definition at line 286 of file generic.cpp.

References current_ev, GEN_CONVERT, is_nil(), same_type(), and type_name().

00286                                                  {
00287   if (same_type (from, to)) return from;
00288   routine* cv= to->acc_construct (from->acc_id ());
00289   if (cv != NULL && !is_nil (*cv)) return (*cv) (from);
00290   return current_ev->apply (GEN_CONVERT, from, type_name (to));
00291 }

string mmx::copy ( const string obj->lex_string  ) 

Definition at line 362 of file string.cpp.

References N(), and string::rep.

00362                        {
00363   register nat i, n= N(s);
00364   string r (n);
00365   for (i=0; i<n; i++) r.rep->a[i]= s.rep->a[i];
00366   return r;
00367 }

vector<C,V> mmx::copy ( const vector< C, V > &  v  )  [inline]

Definition at line 1043 of file vector.hpp.

01043                                    {
01044   return unary_map<id_op> (v); }

format<C> mmx::copy ( const format< C > &  x  )  [inline]

Definition at line 206 of file type_props.hpp.

00206 { return format<C> (x); }

table<C,T,V> mmx::copy ( const table< C, T, V > &  t  )  [inline]

Definition at line 488 of file table.hpp.

References busy(), CF2(), entries(), I(), and Table.

00488                       {
00489   Table r (I(t), CF2(t));
00490   for (iterator<T> it= entries (t); busy (it); ++it)
00491     r[*it]= t[*it];
00492   return r;
00493 }

new_table<C,T,V> mmx::copy ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 559 of file new_table.hpp.

References busy(), CF2(), entries(), I(), and Table.

00559                       {
00560   Table r (I(t), CF2(t));
00561   for (iterator<T> it= entries (t); busy (it); ++it)
00562     r[*it]= t[*it];
00563   return r;
00564 }

list<C> mmx::copy ( const list< C > &  l  )  [inline]

Definition at line 276 of file list.hpp.

References car(), cdr(), cons(), and is_nil().

00276                      {
00277   if (is_nil (l)) return l;
00278   return cons (car (l), cdr (l));
00279 }

iterator< C > copy ( const iterator< C > &  it  )  [inline]

Definition at line 100 of file iterator.hpp.

00100 { return it.rep->clone (); }

heap< C > copy ( const heap< C > &  h  )  [inline]

Definition at line 247 of file heap.hpp.

References C, and Heap.

00247                      {
00248   C* b= mmx_new<C> (h->l);
00249   for (nat i=0; i<h->n; i++) b[i]= h->a[i];
00250   return Heap (b, h->n, h->l, h->compare);
00251 }

void* mmx::copy ( C *  p  )  [inline]

Definition at line 165 of file defaults.hpp.

00165 { return p; }

double mmx::copy ( double  c  )  [inline]

Definition at line 163 of file defaults.hpp.

00163 { return c; }

float mmx::copy ( float  c  )  [inline]

Definition at line 162 of file defaults.hpp.

00162 { return c; }

long long unsigned int mmx::copy ( long long unsigned int  c  )  [inline]

Definition at line 160 of file defaults.hpp.

00160 { return c; }

long long int mmx::copy ( long long int  c  )  [inline]

Definition at line 159 of file defaults.hpp.

00159 { return c; }

long unsigned int mmx::copy ( long unsigned int  c  )  [inline]

Definition at line 158 of file defaults.hpp.

00158 { return c; }

long int mmx::copy ( long int  c  )  [inline]

Definition at line 157 of file defaults.hpp.

00157 { return c; }

unsigned int mmx::copy ( unsigned int  c  )  [inline]

Definition at line 156 of file defaults.hpp.

00156 { return c; }

int mmx::copy ( int  c  )  [inline]

Definition at line 155 of file defaults.hpp.

00155 { return c; }

short unsigned int mmx::copy ( short unsigned int  c  )  [inline]

Definition at line 154 of file defaults.hpp.

00154 { return c; }

short int mmx::copy ( short int  c  )  [inline]

Definition at line 153 of file defaults.hpp.

00153 { return c; }

unsigned char mmx::copy ( unsigned char  c  )  [inline]

Definition at line 152 of file defaults.hpp.

00152 { return c; }

signed char mmx::copy ( signed char  c  )  [inline]

Definition at line 151 of file defaults.hpp.

00151 { return c; }

char mmx::copy ( char  c  )  [inline]

Definition at line 150 of file defaults.hpp.

00150 { return c; }

chain<C> mmx::copy ( const chain< C > &  c  )  [inline]

Definition at line 195 of file chain.hpp.

References Chain, is_nil(), left(), middle(), and right().

00195                       {
00196   if (is_nil (c)) return c;
00197   return Chain (left (c), middle (c), right (c));
00198 }

C mmx::copy ( const C &  x  )  [inline]
vector<C,V> mmx::cos ( const vector< C, V > &  v  )  [inline]

Definition at line 1180 of file vector.hpp.

01180 { return unary_map<cos_op> (v); }

table<C,T,V> mmx::cos ( const table< C, T, V > &  t  )  [inline]

Definition at line 701 of file table.hpp.

00701 { return unary_map<cos_op> (t); }

syntactic cos ( const syntactic g  ) 

Definition at line 430 of file syntactic.cpp.

References GEN_COS, and syn().

00430 { return syn (GEN_COS, g); }

new_table<C,T,V> mmx::cos ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 772 of file new_table.hpp.

00772 { return unary_map<cos_op> (t); }

generic cos ( const generic x1  ) 

Definition at line 445 of file generic.cpp.

References ACC_COS, ACC_UNARY, current_ev, and GEN_COS.

00445                         {
00446   ACC_UNARY (ACC_COS, x1);
00447   return current_ev->apply (GEN_COS, x1);
00448 }

double cos ( const double &  x  )  [inline]

Definition at line 49 of file double.hpp.

Referenced by cos_sin(), tan_op::diff_op(), sin_op::diff_op(), cos_op::op(), trig_op::op(), cos_op::op_init(), cos_op::set_op(), and trig().

00049 { return std::cos (x); }

vector<C> mmx::cos_sin ( const C &  x  )  [inline]

Definition at line 1407 of file vector.hpp.

References cos(), sin(), and vec().

Referenced by tan_op::def(), sin_op::def(), and cos_op::def().

01407                                                     {
01408   return vec (cos (x), sin (x)); }

syntactic cosh ( const syntactic g  ) 

Definition at line 436 of file syntactic.cpp.

References GEN_CH, and syn().

00436 { return syn (GEN_CH, g); }

generic cosh ( const generic x1  ) 

Definition at line 481 of file generic.cpp.

References ACC_COSH, ACC_UNARY, and exp().

00481                          {
00482   ACC_UNARY (ACC_COSH, x1);
00483   return (exp (x1) + exp (-x1)) / 2;
00484 }

double cosh ( const double &  x  )  [inline]

Definition at line 52 of file double.hpp.

References cosh().

00052 { return std::cosh (x); }

C mmx::cosh ( const C &  x  )  [inline]

Definition at line 589 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().

00589                                                 {
00590   return (exp (x) + exp (-x)) / promote (2, x); }

double mmx::cot ( const double &  x  )  [inline]

Definition at line 69 of file double.hpp.

00077 { return std::isfinite (x); }

double mmx::coth ( const double &  x  )  [inline]

Definition at line 70 of file double.hpp.

00077 { return std::isfinite (x); }

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_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  ) 

Definition at line 303 of file cpp_printer.cpp.

References ASSERT, and size().

Referenced by flatten().

00303                                       {
00304   size_t size= 4096;
00305   char* buf= (char*) malloc (size);
00306   int status;
00307   char* res= abi::__cxa_demangle (name, buf, &size, &status);
00308   string ans (res); free ((void*) res);
00309   ASSERT (status==0, "invalid C++ type name");
00310   return ans;
00311 }

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().

string cpp_identifier ( const string s  ) 

Definition at line 1234 of file cpp_printer.cpp.

References N().

01234                                  {
01235   bool ok= true;
01236   for (nat i=0; i<N(s); i++) {
01237     if (s[i] >= 'a' && s[i] <= 'z') ok= false;
01238     if (s[i] >= 'A' && s[i] <= 'Z') ok= false;
01239     if (s[i] >= '0' && s[i] <= '9') ok= false;
01240     if (s[i] == '#' || s[i] == '?' ||
01241         s[i] == '.' || s[i] == '@' ||
01242         s[i] == ':' || s[i] == '$')
01243       ok= false;
01244   }
01245   if (ok) return s;
01246 
01247   string r;
01248   for (nat i=0; i<N(s); i++)
01249     switch (s[i]) {
01250     case '#' : r << "SH"; break;
01251     case '$' : r << "SS"; break;
01252     case '?' : r << "PR"; break;
01253     case '.' : r << "DO"; break;
01254     case '@' : r << "OA"; break;
01255     case ':' : r << "SC"; break;
01256     case '+' : r << "PP"; break;
01257     case '-' : r << "MM"; break;
01258     case '*' : r << "TT"; break;
01259     case '/' : r << "DD"; break;
01260     case '<' : r << "LT"; break;
01261     case '=' : r << "EE"; break;
01262     case '>' : r << "GT"; break;
01263     case '!' : r << "NO"; break;
01264     case '(' : r << "LB"; break;
01265     case ')' : r << "RB"; break;
01266     case '[' : r << "LQ"; break;
01267     case '\\': r << "BS"; break;
01268     case ']' : r << "RQ"; break;
01269     case '^' : r << "PW"; break;
01270     case '~' : r << "EQ"; break;
01271     default: r << s[i]; break;
01272     }
01273   return r;
01274 }

generic mmx::CPP_IF ( "if"   ) 
generic mmx::CPP_INHERIT ( "inherit"   ) 
generic mmx::CPP_INITIALIZE ( "initialize"   ) 
generic mmx::CPP_INLINE ( "inline"   ) 
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 mmx::csc ( const double &  x  )  [inline]

Definition at line 69 of file double.hpp.

00077 { return std::isfinite (x); }

double mmx::csch ( const double &  x  )  [inline]

Definition at line 70 of file double.hpp.

00077 { return std::isfinite (x); }

generic decexp2 ( const generic x1,
const xint &  x2 
)

Definition at line 791 of file generic.cpp.

References current_ev.

00791                                                     {
00792   return current_ev->apply ("decrease_exponent", x1, as<generic> ((int) x2)); }

void decexp2 ( double &  x,
const double &  y,
const S &  z 
) [inline]

Definition at line 116 of file double.hpp.

00116 { x= ldexp (y, -z); }

double decexp2 ( const double &  x  )  [inline]

Definition at line 112 of file double.hpp.

00112 { return ldexp (x, -1); }

double decexp2 ( const double &  x,
const S &  y 
) [inline]

Definition at line 110 of file double.hpp.

00110 { return ldexp (x, -y); }

void mmx::decexp2 ( C &  x,
const C &  y,
const S &  z 
) [inline]

Definition at line 338 of file defaults.hpp.

00338 { x= y >> z; }

C mmx::decexp2 ( const C &  x  )  [inline]

Definition at line 334 of file defaults.hpp.

00334 { return decexp2<C,xint> (x, 1); }

C mmx::decexp2 ( const C &  x,
const S &  y 
) [inline]

Definition at line 332 of file defaults.hpp.

Referenced by GLUE_50(), decexp2_op::op(), set_accuracy(), decexp2_op::set_op(), and make_interval_helper< B, C >::val().

00332 { return x >> y; }

void decexp2_assign ( double &  x,
const S &  y 
) [inline]

Definition at line 114 of file double.hpp.

00114 { x= ldexp (x, -y); }

void mmx::decexp2_assign ( C &  x,
const S &  y 
) [inline]

Definition at line 336 of file defaults.hpp.

Referenced by decexp2_op::set_op().

00336 { x >>= y; }

string decode_name ( const string name  ) 

Definition at line 320 of file system.cpp.

References _from_dos_to_unix(), get_env(), N(), and starts().

Referenced by eval_system(), file_exists(), follow_link(), get_attributes(), input_file_port(), input_output_file_port(), load(), load_directory(), mkdir(), output_file_port(), and save().

00320                                  {
00321   if (name == "~") return _from_dos_to_unix (get_env ("HOME"));
00322   if (starts (name, "~/"))
00323     return _from_dos_to_unix (get_env ("HOME")) * "/" * name (2, N(name));
00324   if (starts (name, "$")) {
00325     nat i;
00326     for (i=0; i<N(name); i++)
00327       if (name[i] == '/') break;
00328     string r= _from_dos_to_unix (get_env (name (1, i)));
00329     if (i == N(name)) return r;
00330     return r * "/" * name (i+1, N(name));
00331   }
00332   return name;
00333 }

nat mmx::default_aligned_size ( nat  n  )  [inline]

Definition at line 76 of file vector_naive.hpp.

References V.

00076                              {
00077   typedef typename vector_variant_helper<C>::VV V;
00078   typedef implementation<vector_allocate,V> Vec;
00079   return aligned_size<C,V> (n);
00080 }

C mmx::default_cst ( const format< C > &  fm  )  [inline]

Definition at line 921 of file type_props.hpp.

References C, get_sample(), and set_default().

00921                                   {
00922   C r= get_sample (fm); set_default (r); return r; }

C mmx::default_cst (  )  [inline]

Definition at line 892 of file type_props.hpp.

References C, and set_default().

Referenced by make_cache_1(), make_cache_3(), make_mmx_new_table(), and make_mmx_table().

00892 { C r; set_default (r); return r; }

routine default_routine ( const generic name  ) 

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().

00218                                       {
00219   if (is<routine> (name))
00220     return as<routine> (name);
00221   if (is<alias<routine> > (name))
00222     return get_alias (as<alias<routine> > (name));
00223   return new default_routine_rep (name);
00224 }

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().

00218                                                               {
00219   current_ev->overload (name, as<generic> (quintary_routine (name, fun)));
00220 }

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().

00210                                                    {
00211   current_ev->overload (name, as<generic> (quaternary_routine (name, fun)));
00212 }

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().

00203                                                                          {
00204   current_ev->overload (name, as<generic> (ternary_routine (name, fun)));
00205 }

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.

00196                                                               {
00197   current_ev->overload (name, as<generic> (binary_routine (name, fun)));
00198   accelerate (name, fun);
00199 }

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().

00190                                                    {
00191   current_ev->overload (name, as<generic> (unary_routine (name, fun)));
00192   accelerate (name, fun);
00193 }

void mmx::define ( const generic name,
D(*)()  fun 
) [inline]
mmx::DEFINE_BINARY_FORMAT_2 ( pair   ) 
mmx::DEFINE_BINARY_FORMAT_3 ( table   ) 
mmx::DEFINE_BINARY_FORMAT_3 ( new_table   ) 
void mmx::define_constant ( const generic name,
const D &  x 
) [inline]

Definition at line 170 of file glue.hpp.

References current_ev.

00170                                                   {
00171   current_ev->set (name, as<generic> (x));
00172 }

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().

00175                                                {
00176   current_ev->overload (GEN_NEW, as<generic> (unary_routine (GEN_NEW, fun)));
00177 }

void mmx::define_converter ( const generic name,
C(*)(const S1 &)  f,
nat  p 
) [inline]

Definition at line 223 of file glue.hpp.

References accelerate_converter(), current_ev, gen(), GEN_INTO, and unary_routine().

Referenced by glue_basix_table_generic(), glue_basix_vector_generic(), glue_document(), glue_double(), glue_list_generic(), glue_routine(), and glue_syntactic().

00223                                                                   {
00224   generic con= gen (GEN_INTO, type_name<S1> (), type_name<C> ());
00225   routine fun= unary_routine (con, f);
00226   current_ev->overload (name, as<generic> (fun), p);
00227   accelerate_converter (name, f);
00228 }

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.

00039                         {
00040   define_type<generic> (GEN_GENERIC_TYPE);
00041   define_type<bool> (GEN_BOOLEAN_TYPE);
00042   define_type<int> (GEN_INT_TYPE);
00043   define_type<double> (GEN_DOUBLE_TYPE);
00044   define_type<literal> (GEN_LITERAL_TYPE);
00045   define_type<compound> (GEN_COMPOUND_TYPE);
00046   define_type<routine> (GEN_ROUTINE_TYPE);
00047   define_type<primitive> (GEN_MACRO_TYPE);
00048   define_constant<bool> (GEN_FALSE, false);
00049   define_constant<bool> (GEN_TRUE, true);
00050   define<bool,generic,generic> (GEN_EQUAL, fall_back_equal);
00051   define<bool,generic,generic> (GEN_UNEQUAL, fall_back_unequal);
00052 }

void mmx::define_primitive ( const generic name,
generic(*)(const generic &)  fun 
) [inline]

Definition at line 180 of file glue.hpp.

References current_ev.

00180                                                                         {
00181   current_ev->set (name, as<generic> (primitive (name, fun)));
00182 }

mmx::DEFINE_TERNARY_FORMAT_3 ( triple   ) 
void mmx::define_type ( const generic name  )  [inline]
void define_type_sub ( const generic name,
nat  id 
)

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().

00067                                               {
00068   current_ev->set (gen (GEN_TYPE_NAME, as<generic> (id)), name);
00069   current_ev->set (gen (GEN_TYPE_ID, name), as<generic> (id));
00070   if (!is_tuple_type (id) && !is_alias_type (id)) {
00071     vector<generic> all_types= all_type_names ();
00072     all_types << name;
00073     current_ev->set (gen (GEN_ALL_TYPES), as<generic> (all_types));
00074   }
00075 }

mmx::DEFINE_UNARY_FORMAT_1 ( list   )  const

Definition at line 100 of file list.hpp.

00102                                       {
00103   return l.tfm (); }

mmx::DEFINE_UNARY_FORMAT_1 ( chain   )  const

Definition at line 91 of file chain.hpp.

References Format.

00093                                        {
00094   return (Format) l; }

nat define_user_type ( const generic name  ) 

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_TUPLE_TYPE, GEN_UNALIAS, GEN_UNEQUAL, new_alias_type_id(), new_tuple_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().

00104                                        {
00105   nat id= new_type_id ();
00106   nat alias_id= new_alias_type_id (id);
00107   nat tuple_id= new_tuple_type_id (id);
00108   define_type_sub (name, id);
00109   define_type_sub (gen (GEN_ALIAS_TYPE, name), alias_id);
00110   define_type_sub (gen (GEN_TUPLE_TYPE, name), tuple_id);
00111 
00112   {
00113     vector<nat> sig= vec<nat> (alias_id, id);
00114     routine r = unary_routine (GEN_ALIAS, object_alias);
00115     routine r2= change_signature (r, sig);
00116     current_ev->overload (GEN_ALIAS, as<generic> (r2), PENALTY_INCLUSION);
00117   }
00118 
00119   {
00120     vector<nat> sig= vec<nat> (id, alias_id);
00121     routine r = unary_routine (GEN_UNALIAS, object_get_alias);
00122     routine r2= change_signature (r, sig);
00123     alias_getter (alias_id, r2);  
00124   }
00125 
00126   {
00127     vector<nat> sig= vec<nat> (id, alias_id, id);
00128     routine r = binary_routine (GEN_UNALIAS, object_set_alias);
00129     routine r2= change_signature (r, sig);
00130     alias_setter (alias_id, r2);  
00131   }
00132 
00133   {
00134     vector<nat> sig= vec<nat> (alias_id, type_id<alias<generic> > ());
00135     routine r = unary_routine (GEN_SPECIALIZE, object_specialize_alias);
00136     routine r2= change_signature (r, sig);
00137     alias_specializer (id, r2);
00138   }
00139 
00140   {
00141     vector<nat> sig= vec<nat> (id, alias_id);
00142     generic cv= gen (GEN_INTO, name, gen (GEN_ALIAS_TYPE, name));
00143     routine r = unary_routine (cv, object_get_alias);
00144     routine r2= change_signature (r, sig);
00145     current_ev->overload (GEN_REWRITE, as<generic> (r2), PENALTY_INCLUSION);
00146   }
00147 
00148   {
00149     vector<nat> sig= vec<nat> (type_id<alias<generic> > (), alias_id);
00150     generic cv= gen (GEN_INTO, gen (GEN_ALIAS_TYPE, GEN_GENERIC_TYPE),
00151                                gen (GEN_ALIAS_TYPE, name));
00152     routine r = unary_routine (cv, object_generalize_alias);
00153     routine r2= change_signature (r, sig);
00154     current_ev->overload (GEN_REWRITE, as<generic> (r2), PENALTY_INCLUSION);
00155   }
00156 
00157   {
00158     vector<nat> sig= vec<nat> (type_id<bool> (), id, id);
00159     routine r = binary_routine (GEN_EQUAL, object_equal);
00160     routine r2= change_signature (r, sig);
00161     current_ev->overload (GEN_EQUAL, as<generic> (r2), PENALTY_INCLUSION);
00162   }
00163 
00164   {
00165     vector<nat> sig= vec<nat> (type_id<bool> (), id, id);
00166     routine r = binary_routine (GEN_UNEQUAL, object_unequal);
00167     routine r2= change_signature (r, sig);
00168     current_ev->overload (GEN_UNEQUAL, as<generic> (r2), PENALTY_INCLUSION);
00169   }
00170 
00171   {
00172     vector<nat> sig= vec<nat> (type_id<syntactic> (), id);
00173     routine r = unary_routine (GEN_FLATTEN, object_flatten);
00174     routine r2= change_signature (r, sig);
00175     current_ev->overload (GEN_FLATTEN, as<generic> (r2), PENALTY_INCLUSION);
00176   }
00177 
00178   return id;
00179 }

syntactic denominator ( const syntactic x  ) 

Definition at line 464 of file syntactic.cpp.

References GEN_DENOMINATOR, and syn().

00464                                             {
00465   return syn (GEN_DENOMINATOR, g1); }

generic denominator ( const generic x  ) 

Definition at line 715 of file generic.cpp.

References current_ev, and GEN_DENOMINATOR.

Referenced by denominator_op::Denominator_type(), denominator_op::op(), and denominator_op::set_op().

00715                                        {
00716   return current_ev->apply (GEN_DENOMINATOR, x); }

vector<C,V> mmx::derive ( const vector< C, V > &  v,
const X &  x 
) [inline]

Definition at line 1206 of file vector.hpp.

01206                                      {
01207   return binary_map_scalar<derive_op> (v, x); }

vector<C,V> mmx::derive ( const vector< C, V > &  v  )  [inline]

Definition at line 1198 of file vector.hpp.

01198                                      {
01199   return unary_map<derive_op> (v); }

syntactic derive ( const syntactic g,
const syntactic v 
)

Definition at line 478 of file syntactic.cpp.

References GEN_DERIVE, and syn().

00478                                                           {
00479   return syn (GEN_DERIVE, g, v); }

syntactic derive ( const syntactic g  ) 

Definition at line 476 of file syntactic.cpp.

References GEN_DERIVE, and syn().

00476                                       {
00477   return syn (GEN_DERIVE, g); }

generic derive ( const generic x1,
const generic x2 
)

Definition at line 682 of file generic.cpp.

References ACC_BINARY_SCALAR, ACC_DERIVE_WRT, current_ev, derive(), GEN_CACHED_DERIVE, and MEMOIZE_BINARY.

00682                                              {
00683   ACC_BINARY_SCALAR (ACC_DERIVE_WRT, x1, v);
00684   MEMOIZE_BINARY (std_memoizer,generic,generic,generic,derive,x1,v,
00685                   current_ev->apply (GEN_CACHED_DERIVE, x1, v));
00686 }

generic derive ( const generic x1  ) 

Definition at line 670 of file generic.cpp.

References ACC_DERIVE, ACC_UNARY, current_ev, and GEN_CACHED_DERIVE.

00670                            {
00671   ACC_UNARY (ACC_DERIVE, x1);
00672   return current_ev->apply (GEN_CACHED_DERIVE, x1);
00673 }

T mmx::derive ( const T &  f,
const V &  v,
nat  n 
) [inline]
void destroy ( const updater u  ) 

Definition at line 208 of file dynamic.cpp.

References detach(), inside(), and N().

Referenced by result_observer_rep::destroy(), argument_observer_rep::destroy(), and dynamic_rep::~dynamic_rep().

00208                            {
00209   for (nat i=0; i<N(u->obs); i++) detach (u->obs[i]);
00210   inside (u) -> args = vector<dynamic> ();
00211   inside (u) -> obs  = vector<observer> ();
00212 }

void mmx::detach ( const observer o  ) 

Definition at line 52 of file dynamic.cpp.

References append(), ERROR, hard_eq(), N(), and range().

Referenced by destroy().

00052                            {
00053   vector<observer>& obs= o->ref->obs;
00054   for (nat i=0; i<N(obs); i++)
00055     if (hard_eq (obs[i], o)) {
00056       obs= append (range (obs, 0, i), range (obs, i+1, N(obs)));
00057       return;
00058     }
00059   ERROR ("observer not attached");
00060 }

table<C,T,V> mmx::difference ( const table< C, T, V > &  t,
const table< C, T, V > &  u 
) [inline]

Definition at line 784 of file table.hpp.

References busy(), CF2(), entries(), I(), and Table.

00784                                             {
00785   Table r (I (t), CF2(t));
00786   for (iterator<T> it= entries (t); busy (it); ++it)
00787     if (!V::val_op::op (u[*it], t[*it]))
00788       r[*it]= t[*it];
00789   return r;
00790 }

new_table<C,T,V> mmx::difference ( const new_table< C, T, V > &  t,
const new_table< C, T, V > &  u 
) [inline]

Definition at line 855 of file new_table.hpp.

References busy(), CF2(), entries(), I(), and Table.

00855                                             {
00856   Table r (I (t), CF2(t));
00857   for (iterator<T> it= entries (t); busy (it); ++it)
00858     if (!V::val_op::op (u[*it], t[*it]))
00859       r[*it]= t[*it];
00860   return r;
00861 }

generic dilate ( const generic x1,
const generic x2 
)

Definition at line 700 of file generic.cpp.

References current_ev.

00700                                                       {
00701   return current_ev->apply ("dilate", x1, x2); }

nat mmx::discrete_complexity ( const table< C, T, V > &  t  )  [inline]

Definition at line 187 of file table.hpp.

00187                                                      {
00188   return (nat) t->complexity (); }

nat mmx::discrete_complexity ( const cache< C, T > &  c  )  [inline]

Definition at line 65 of file cache.hpp.

Referenced by GLUE_9().

00065                                                      {
00066   return discrete_complexity (*c); }

nat mmx::discrete_complexity_entries (  )  [inline]

Definition at line 141 of file symbol.hpp.

References symbol_rep< C, V >::complexity_entries().

00141                                                         {
00142   return (nat) symbol_rep<C>::complexity_entries (); }

storage mmx::disk_storage ( const port server,
const string root 
)

Definition at line 87 of file storage.cpp.

00087                                                       {
00088   return (storage_rep*) new disk_storage_rep (server, root);
00089 }

storage disk_storage ( const string root  ) 

Create storage which will be stored on disk in ~/.mathemagix/cache.

Definition at line 82 of file storage.cpp.

00082                                   {
00083   return (storage_rep*) new disk_storage_rep (root);
00084 }

storage disk_storage (  ) 

Definition at line 77 of file storage.cpp.

References user_dir().

Referenced by disk_storage_rep::get_branch(), and GLUE_1().

00077                 {
00078   return (storage_rep*) new disk_storage_rep (user_dir () * "/cache");
00079 }

void mmx::div ( R &  x,
const C1 &  y1,
const C2 &  y2 
) [inline]

Definition at line 60 of file operators.hpp.

Referenced by ldiv_op::set_op(), rdiv_op::set_op(), and div_op::set_op().

00060 { x= y1 / y2; }

T mmx::div_operator ( const T &  x,
const T &  y 
) [inline]

Definition at line 34 of file operators.hpp.

00034 { return x/y; }

bool mmx::divides ( const unsigned long long int &  n,
const unsigned long long int &  m 
) [inline]

Definition at line 574 of file int.hpp.

00581 {

bool mmx::divides ( const unsigned long int &  n,
const unsigned long int &  m 
) [inline]

Definition at line 573 of file int.hpp.

00581 {

bool mmx::divides ( const unsigned int &  n,
const unsigned int &  m 
) [inline]

Definition at line 572 of file int.hpp.

00581 {

bool mmx::divides ( const unsigned short int &  n,
const unsigned short int &  m 
) [inline]

Definition at line 571 of file int.hpp.

00581 {

bool mmx::divides ( const unsigned char &  n,
const unsigned char &  m 
) [inline]

Definition at line 570 of file int.hpp.

00581 {

bool mmx::divides ( const long long int &  n,
const long long int &  m 
) [inline]

Definition at line 561 of file int.hpp.

00565 { return (m % n) == 0; } \

bool mmx::divides ( const long int &  n,
const long int &  m 
) [inline]

Definition at line 560 of file int.hpp.

00565 { return (m % n) == 0; } \

bool mmx::divides ( const int &  n,
const int &  m 
) [inline]

Definition at line 559 of file int.hpp.

00565 { return (m % n) == 0; } \

bool mmx::divides ( const short int &  n,
const short int &  m 
) [inline]

Definition at line 558 of file int.hpp.

00565 { return (m % n) == 0; } \

bool mmx::divides ( const signed char &  n,
const signed char &  m 
) [inline]

Definition at line 557 of file int.hpp.

Referenced by GLUE_29().

00565 { return (m % n) == 0; } \

bool dl_exists ( const string name  ) 

Definition at line 62 of file dlink.cpp.

References dl_find().

00062                                {
00063 #ifdef BASIX_ENABLE_EMBEDDED
00064   (void) name;
00065   return true;
00066 #else
00067   return dl_find (name) != "";
00068 #endif
00069 }

static string mmx::dl_find ( const string name  )  [static]

Definition at line 40 of file dlink.cpp.

References path_name(), and prefix_dir().

Referenced by dl_exists(), and dl_link().

00040                              {
00041   string lib;
00042   string pdir = prefix_dir () * "/lib";
00043 #if defined(__MINGW__) || defined(__MINGW32__)
00044   lib= path_name ("$LTDL_LIBRARY_PATH;$LD_LIBRARY_PATH;$PATH;$MMX_LOAD_PATH;"
00045                   * pdir, "libmmx" * name * "-0.dll"); // FIXME?
00046   if (lib != "") return lib;
00047 #else
00048   lib= path_name ("$LTDL_LIBRARY_PATH:$LD_LIBRARY_PATH:$DYLD_LIBRARY_PATH:"
00049                   * pdir, "libmmx" * name * ".la");
00050   if (lib != "") return lib;
00051   lib= path_name ("$LTDL_LIBRARY_PATH:$LD_LIBRARY_PATH:$MMX_LOAD_PATH:"
00052                   * pdir, "libmmx" * name * ".so");
00053   if (lib != "") return lib;
00054   lib= path_name ("$LTDL_LIBRARY_PATH:$DYLD_LIBRARY_PATH:$MMX_LOAD_PATH:"
00055                   * pdir, "libmmx" * name * ".dylib");
00056   if (lib != "") return lib;
00057 #endif
00058   return "";
00059 }

void dl_link ( const string name  ) 

Definition at line 123 of file dlink.cpp.

References dl_link().

00123                              {
00124   dl_link (name, "define_" * name);
00125 }

void dl_link ( const string name,
const string init 
)

Definition at line 85 of file dlink.cpp.

References as_charp(), contains(), dl_find(), dl_linked_table(), done(), embedded_link, ERROR, error_message(), and free_charp().

Referenced by dl_link().

00085                                                  {
00086   table<bool,string>& done= dl_linked_table ();
00087   if (contains (done, name)) return;
00088 #ifdef BASIX_ENABLE_EMBEDDED
00089   if (embedded_link != NULL)
00090     embedded_link (name);
00091 #else
00092   //mmout << "Linking " << name << "\n";
00093   string lib= dl_find (name);
00094   if (lib == "") ERROR ("library " * name * " not in library path");
00095   if (lt_dlinit () != 0) ERROR ("lt_dlinit failed for " * name);
00096 
00097   //mmout << "Opening " << lib << "\n";
00098   char* _lib = as_charp (lib);
00099   lt_dlhandle handle= lt_dlopen (_lib);
00100   free_charp (_lib);
00101   if (handle == NULL) {
00102     //mmerr << lt_dlerror () << lf; 
00103     throw mmx::error_message (string (lt_dlerror ()));
00104   }
00105 
00106   //mmout << "Searching " << init << "\n";
00107   char* _init= as_charp (init);
00108   lt_ptr ptr = lt_dlsym (handle, _init);
00109   free_charp (_init);
00110   if (ptr == NULL) {
00111     //mmerr << lt_dlerror () << lf;
00112     throw mmx::error_message (string (lt_dlerror ()));
00113   }
00114 
00115   //mmout << "Initializing " << name << "\n";
00116   void (**define_glue) (void)= (void (**) (void)) ptr;
00117   (*define_glue) ();
00118 #endif
00119   done[name]= true;
00120 }

bool dl_linked ( const string name  ) 

Definition at line 78 of file dlink.cpp.

References contains(), and dl_linked_table().

00078                                {
00079   return contains (dl_linked_table (), name);
00080 }

static table<bool,string>& mmx::dl_linked_table (  )  [static]

Definition at line 72 of file dlink.cpp.

Referenced by dl_link(), and dl_linked().

00072                    {
00073   static table<bool,string> t (false);
00074   return t;
00075 }

string dl_option (  ) 

Definition at line 31 of file dlink.cpp.

00031              {
00032 #ifdef __APPLE__ // also to be used for BSD system
00033   return " -dynamiclib";
00034 #else
00035   return " -shared";
00036 #endif
00037 }

string dl_suffix (  ) 

Definition at line 20 of file dlink.cpp.

00020              {
00021 #if defined( __APPLE__) // also to be used for BSD system
00022   return "dylib";
00023 #elif defined(__MINGW__) || defined(__MINGW32__)
00024   return "dll";
00025 #else
00026   return "so";
00027 #endif
00028 }

generic mmx::documentify ( const string s  ) 

Definition at line 18 of file document.cpp.

References gen(), N(), and tokenize().

00018                               {
00019   vector<string> v= tokenize (s, "\n");
00020   if (N(v) == 0) return gen ("$concat");
00021   if (N(v) == 1) return generic (v[0]);
00022   vector<generic> r= vec<generic> (v[0]);
00023   for (nat i=1; i<N(v); i++) r << generic ("$lf") << generic (v[i]);
00024   return gen ("$concat", r);
00025 }

bool done ( const iterator< C > &  it  )  [inline]
C mmx::dot ( const vector< C, V > &  v,
const vector< C, V > &  w 
) [inline]

Definition at line 1400 of file vector.hpp.

References ASSERT, CF(), is_non_scalar(), N(), and seg().

Referenced by completion_generator().

01400                                               {
01401   typedef implementation<vector_linear,V> Vec;
01402   ASSERT (is_non_scalar (v) && is_non_scalar (w),
01403           "non-scalar vectors expected");
01404   ASSERT (N(v) == N(w), "lengths don't match");
01405   return Vec::inn_prod (seg (v), seg (w), N(v), CF (v)); }

iterator<S> mmx::downwards_range ( const S &  start,
const T &  end 
) [inline]

Definition at line 371 of file iterator.hpp.

References range_iterator().

00371                                                {
00372   return range_iterator (start, outplace_set_as<S> (end),
00373                          outplace_set_as<S> (-1), false);
00374 }

static char* mmx::duplicate ( char *  obj->lex_string  )  [static]

Definition at line 199 of file terminal_interface.cpp.

00199                     {
00200   // strdup does not work on some platforms.
00201   char* r= (char*) malloc (strlen (s) + 1);
00202   strcpy (r, s);
00203   return r;
00204 }

generic mmx::duplicate ( const generic x1  ) 

Definition at line 131 of file generic.cpp.

00131                               {
00132   return x1->duplicate_me ();
00133 }

vector<C,V> mmx::duplicate ( const vector< C, V > &  v  )  [inline]

Definition at line 1045 of file vector.hpp.

01045                                         {
01046   return unary_map<duplicate_op> (v); }

table<C,T,V> mmx::duplicate ( const table< C, T, V > &  t  )  [inline]

Definition at line 611 of file table.hpp.

00611                                              {
00612   return unary_map<duplicate_op,C,T,V> (t); }

string mmx::duplicate ( const string &  s  )  [inline]

Definition at line 108 of file string.hpp.

References copy().

00108 { return copy (s); }

new_table<C,T,V> mmx::duplicate ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 682 of file new_table.hpp.

00682                                              {
00683   return unary_map<duplicate_op,C,T,V> (t); }

C mmx::duplicate ( const C &  x  )  [inline]
void(*) mmx::dynamic_event ( const string id,
const generic val 
)
unary_return_type_helper<abs_op, C >::RET mmx::elementary_error ( const C &  x  )  [inline]

Definition at line 1075 of file type_props.hpp.

References rounding_error().

01075                                                                       {
01076   return rounding_error (x); }

generic elementary_error ( const generic x  ) 

Definition at line 778 of file generic.cpp.

References current_ev, and GEN_ELEMENTARY_ERROR.

Referenced by elementary_error_op::Abs_type(), GLUE_54(), and elementary_error_op::set_op().

00778                                             {
00779   return current_ev->apply (GEN_ELEMENTARY_ERROR, x); }

void(*) mmx::embedded_link ( const string name  ) 
bool mmx::ends ( const string obj->lex_string,
const string what 
)

Definition at line 349 of file string.cpp.

References N(), and s.

00349                                            {
00350   return N(s) >= N(what) && s (N(s) - N(what), N(s)) == what;
00351 }

bool mmx::ends ( const string &  s,
const string &  what 
)

Tell if s ends with what.

Referenced by canonical_name(), GLUE_12(), scheme_to_tm(), unquote(), and write().

void * enlarge_malloc ( register size_t  sz  ) 

Definition at line 51 of file fast_new.cpp.

References alloc_mem, alloc_remains, fast_chunks, MMX_ALLOC_PTR, MMX_BLOCK_SIZE, MMX_IND, and safe_malloc().

Referenced by mmx_malloc_thread_unsafe().

00051                                     {
00052   if (alloc_remains<sz) {
00053     alloc_mem    = (char *) safe_malloc (MMX_BLOCK_SIZE);
00054     alloc_remains= MMX_BLOCK_SIZE - 16;
00055     fast_chunks++;
00056   }
00057   register void* ptr= alloc_mem;
00058   if ((sz&15) == 0 && (((nat) ((uintptr_t) ptr)) & 15) != 0) {
00059     // NOTE: force 16 byte alignment for sizes which are multiples of 16
00060     nat sz2= 16 - (((nat) ((uintptr_t) ptr)) & 15);
00061     MMX_IND (ptr)       = MMX_ALLOC_PTR (sz2);
00062     MMX_ALLOC_PTR (sz2) = ptr;
00063     alloc_mem      += sz2;
00064     alloc_remains  -= sz2;
00065     ptr             = alloc_mem;
00066   }
00067   alloc_mem    += sz;
00068   alloc_remains-= sz;
00069   return ptr;
00070 }

iterator<T> mmx::entries ( const table< C, T, V > &  t  )  [inline]

Definition at line 380 of file table.hpp.

00380                          {
00381   return iterator<T> (new entries_iterator_rep<C,T,V> (t));
00382 }

iterator<T> mmx::entries ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 453 of file new_table.hpp.

00453                          {
00454   return iterator<T> (new entries_iterator_rep<C,T,V> (t));
00455 }

iterator<T> mmx::entries ( const cache< C, T > &  c  )  [inline]
bool mmx::equal_operator ( const T &  x,
const T &  y 
) [inline]

Definition at line 36 of file operators.hpp.

00036 { return x==y; }

bool mmx::error_flag ( const port &  p  )  [inline]

Definition at line 98 of file port.hpp.

References inside().

Referenced by connect_to_server(), composite_port_rep::error_flag(), composite_port_rep::error_message(), GLUE_11(), save(), and var_load().

00098                                        {
00099   return inside (p)->error_flag (); }

string error_message ( const port &  p  ) 

Definition at line 105 of file port.cpp.

References inside().

00105                                      {
00106   return inside (p)->error_message (); }

exception error_message ( const string msg  )  [final]

Definition at line 49 of file basix.cpp.

00049                                   {
00050   return exception (msg, generic ("C++ code"));
00051 }

exception error_message ( const char *  msg  )  [final]

Make an exception from msg.

Definition at line 44 of file basix.cpp.

Referenced by dl_link(), composite_port_rep::error_message(), and GLUE_12().

00044                                 {
00045   return exception (msg, generic ("C++ code"));
00046 }

port mmx::error_port ( const string &  obj->lex_string  ) 

Definition at line 128 of file port.cpp.

00128                              {
00129   return (port_rep*) new error_port_rep (s);
00130 }

port mmx::error_port ( const string &  message  ) 
string mmx::escape ( const string obj->lex_string  ) 

Definition at line 478 of file string.cpp.

References N().

00478                          {
00479   int i, n= N(s);
00480   string r;
00481   for (i=0; i<n; i++)
00482     if ((s[i] == '\\') || (s[i] == '\"')) r << '\\' << s[i];
00483     else if (s[i] == '\b') r << "\\b";
00484     else if (s[i] == '\t') r << "\\t";
00485     else if (s[i] == '\n') r << "\\n";
00486     else if (s[i] == '\r') r << "\\r";
00487     else r << s[i];
00488   return r;
00489 }

string mmx::escape ( const string &  s  ) 

Replace "\n", "\t", and "\b" respectively by "\\n", "\\t", and "\\b".

Referenced by quote().

C mmx::euler_cst ( const format< C > &  fm  )  [inline]

Definition at line 930 of file type_props.hpp.

References C, promote(), and set_euler().

00930                                 {
00931   C r= promote (0, fm); set_euler (r); return r; }

C mmx::euler_cst (  )  [inline]

Definition at line 898 of file type_props.hpp.

References C, and set_euler().

00898 { C r; set_euler (r); return r; }

generic eval ( const generic x  ) 

Definition at line 219 of file generic.cpp.

References current_ev.

Referenced by include(), and rebuild().

00219                         {
00220   return current_ev->eval (x);
00221 }

string mmx::eval_system ( const string obj->lex_string  ) 

Definition at line 273 of file system.cpp.

References ASSERT, decode_name(), init_system(), N(), system(), user_dir(), var_load(), and var_rm().

00273                               {
00274   init_system ();
00275   string temp= user_dir () * "/tmp/eval_system";
00276   system (s * " > " * temp);
00277   string r;
00278   bool flag= var_load (temp, r);
00279   ASSERT (var_rm (decode_name ("rm " * temp)),
00280           "Cannot remove file eval_system");
00281   if (flag) return "";
00282   while ((N(r)>0) && (r[N(r)-1] == '\n')) r= r (0, N(r)-1);
00283   return r;
00284 }

string mmx::eval_system ( const string s  ) 

Referenced by prefix_dir(), and sysconf_dir().

vector<typename binary_return_type_helper<evaluate_op, C , K >::RET> mmx::evaluate ( const vector< C, V > &  v,
const K &  x 
) [inline]

Definition at line 1285 of file vector.hpp.

Referenced by evaluate_op::set_op().

01285                                                               {
01286   return as<Evaluated_vector> (binary_map_scalar<evaluate_op> (v, x)); }

bool mmx::exact_eq ( const vector< C, V > &  x,
const int &  y 
) [inline]

Definition at line 1155 of file vector.hpp.

01159 {

bool mmx::exact_eq ( const vector< C, V > &  x,
const vector< C, V > &  y 
) [inline]

Definition at line 1152 of file vector.hpp.

01159 {

bool mmx::exact_eq ( const format< C > &  x,
const format< C > &  y 
) [inline]

Definition at line 215 of file type_props.hpp.

00215 { return true; }

bool mmx::exact_eq ( const triple< C1, C2, C3 > &  x,
const triple< C1, C2, C3 > &  y 
) [inline]

Definition at line 59 of file triple.hpp.

00063 {

bool mmx::exact_eq ( const table< C, T, V > &  x,
const table< C, T, V > &  y 
) [inline]

Definition at line 694 of file table.hpp.

00698 { return unary_map<sqrt_op> (t); }

bool exact_eq ( const vector< syntactic > &  v,
const vector< syntactic > &  w 
)

Definition at line 532 of file syntactic.cpp.

References exact_eq(), exact_neq(), is_a_scalar(), N(), and vector< C, V >::scalar().

00532                                                                        {
00533   if (is_a_scalar (v))
00534     return is_a_scalar (w) && exact_eq (v.scalar (), w.scalar ());
00535   if (N(v) != N(w)) return false;
00536   for (nat i=0; i<N(v); i++)
00537     if (exact_neq (v[i], w[i])) return false;
00538   return true;
00539 }

bool mmx::exact_eq ( const syntactic &  c1,
const syntactic &  c2 
) [inline]

Definition at line 54 of file syntactic.hpp.

References exact_eq().

00054                                                                 {
00055   return exact_eq (*c1, *c2); }

bool exact_eq ( const symbol< C, V > &  s1,
const symbol< C, V > &  s2 
) [inline]

Definition at line 112 of file symbol.hpp.

00112                                                                {
00113   return s1.rep == s2.rep; }

bool mmx::exact_eq ( const string &  x,
const string &  y 
) [inline]

Definition at line 107 of file string.hpp.

00108 { return copy (s); }

bool mmx::exact_eq ( const storage x,
const storage y 
) [inline]

Definition at line 55 of file storage.hpp.

00057 { return "storage"; }

bool mmx::exact_eq ( const sparse_vector< C, T, V > &  x,
const sparse_vector< C, T, V > &  y 
) [inline]

Definition at line 169 of file sparse_vector.hpp.

00176 {

bool mmx::exact_eq ( const port &  x,
const port &  y 
) [inline]

Definition at line 63 of file port.hpp.

00066 { return p->expression (); }

bool mmx::exact_eq ( const pair< C1, C2 > &  x,
const pair< C1, C2 > &  y 
) [inline]

Definition at line 54 of file pair.hpp.

00058 {

bool mmx::exact_eq ( const new_table< C, T, V > &  x,
const new_table< C, T, V > &  y 
) [inline]

Definition at line 765 of file new_table.hpp.

00769 { return unary_map<sqrt_op> (t); }

bool mmx::exact_eq ( const Indirect< R > &  x,
const Indirect< R > &  y 
) [inline]

Definition at line 758 of file mmc_glue.hpp.

References Indirect< R >::rep.

00758                                                                        {
00759   return x.rep == y.rep; }

bool mmx::exact_eq ( const literal c1,
const literal c2 
) [inline]

Definition at line 48 of file literal.hpp.

References exact_eq().

00048                                                             {
00049   return exact_eq (as_symbol (c1), as_symbol (c2)); }

bool mmx::exact_eq ( const list< C > &  x,
const list< C > &  y 
) [inline]

Definition at line 229 of file list.hpp.

00236 {

bool mmx::exact_eq ( const iterator< C > &  x,
const iterator< C > &  y 
) [inline]

Definition at line 184 of file iterator.hpp.

00195 : public Iterator_rep {

bool mmx::exact_eq ( const heap< C > &  x,
const heap< C > &  y 
) [inline]

Definition at line 244 of file heap.hpp.

00247 {

bool exact_eq ( const int &  x1,
const generic x2 
)

Definition at line 615 of file generic.cpp.

References exact_eq().

00615                                                  {
00616   return exact_eq (x2, x1); }

bool exact_eq ( const generic x1,
const int &  x2 
)

Definition at line 601 of file generic.cpp.

References is_nil().

00601                                             {
00602   if (is<int> (x1)) return as<int> (x1) == x2;
00603   else {
00604     routine* cv= x1->acc_construct (accelerator<int>::id);
00605     if (cv != NULL && !is_nil (*cv))
00606       return x1 -> is_exact_eq ((*cv) (as<generic> (x2)));
00607   }
00608   return false;
00609 }

bool exact_eq ( const generic x1,
const generic x2 
)

Definition at line 586 of file generic.cpp.

References is_nil(), and same_type().

00586                                                 {
00587   if (same_type (x1, x2))
00588     return x1->is_exact_eq (x2);
00589   else {
00590     routine* cv= x1->acc_construct (x2->acc_id ());
00591     if (cv != NULL && !is_nil (*cv))
00592       return x1 -> is_exact_eq ((*cv) (x2));
00593     cv= x2->acc_construct (x1->acc_id ());
00594     if (cv != NULL && !is_nil (*cv))
00595       return (*cv) (x1) -> is_exact_eq (x2);
00596   }
00597   return false;
00598 }

bool mmx::exact_eq ( const function_8< D, S1, S2, S3, S4, S5, S6, S7, S8 > &  x,
const function_8< D, S1, S2, S3, S4, S5, S6, S7, S8 > &  y 
) [inline]

Definition at line 613 of file function.hpp.

00615 {

bool mmx::exact_eq ( const function_7< D, S1, S2, S3, S4, S5, S6, S7 > &  x,
const function_7< D, S1, S2, S3, S4, S5, S6, S7 > &  y 
) [inline]

Definition at line 553 of file function.hpp.

00555 {

bool mmx::exact_eq ( const function_6< D, S1, S2, S3, S4, S5, S6 > &  x,
const function_6< D, S1, S2, S3, S4, S5, S6 > &  y 
) [inline]

Definition at line 493 of file function.hpp.

00495 {

bool mmx::exact_eq ( const function_5< D, S1, S2, S3, S4, S5 > &  x,
const function_5< D, S1, S2, S3, S4, S5 > &  y 
) [inline]

Definition at line 434 of file function.hpp.

00436 {

bool mmx::exact_eq ( const function_4< D, S1, S2, S3, S4 > &  x,
const function_4< D, S1, S2, S3, S4 > &  y 
) [inline]

Definition at line 375 of file function.hpp.

00377 {

bool mmx::exact_eq ( const function_3< D, S1, S2, S3 > &  x,
const function_3< D, S1, S2, S3 > &  y 
) [inline]

Definition at line 316 of file function.hpp.

00318 {

bool mmx::exact_eq ( const function_2< D, S1, S2 > &  x,
const function_2< D, S1, S2 > &  y 
) [inline]

Definition at line 257 of file function.hpp.

00259 {

bool mmx::exact_eq ( const function_1< D, S1 > &  x,
const function_1< D, S1 > &  y 
) [inline]

Definition at line 157 of file function.hpp.

00159 {

bool mmx::exact_eq ( const function_0< D > &  x,
const function_0< D > &  y 
) [inline]

Definition at line 101 of file function.hpp.

00103 {

bool mmx::exact_eq ( const exception &  e1,
const exception &  e2 
) [inline]

Definition at line 43 of file exception.hpp.

References exact_eq().

00043                                                                 {
00044   return exact_eq (*e1, *e2); }

bool mmx::exact_eq ( const dynamic x,
const dynamic y 
) [inline]

Definition at line 95 of file dynamic.hpp.

bool mmx::exact_eq ( const observer x,
const observer y 
) [inline]

Definition at line 58 of file dynamic.hpp.

00065 : public rep_struct {

bool mmx::exact_eq ( const document c1,
const document c2 
) [inline]

Definition at line 55 of file document.hpp.

References exact_eq().

00055                                                               {
00056   return exact_eq (*c1, *c2); }

bool mmx::exact_eq ( const compound c1,
const compound c2 
) [inline]

Definition at line 53 of file compound.hpp.

References exact_eq().

00053                                                               {
00054   return exact_eq (as_symbol (c1), as_symbol (c2)); }

bool mmx::exact_eq ( const cache< C, T > &  c1,
const cache< C, T > &  c2 
) [inline]

Definition at line 46 of file cache.hpp.

References hard_eq().

00046                                                              {
00047   return hard_eq (*c1, *c2); }

bool mmx::exact_eq ( C *  p1,
C *  p2 
) [inline]

Definition at line 245 of file basix.hpp.

00245 { return p1 == p2; }

bool mmx::exact_eq ( double  x,
double  y 
) [inline]

Definition at line 244 of file basix.hpp.

00244 { return x == y; }

bool mmx::exact_eq ( float  x,
float  y 
) [inline]

Definition at line 243 of file basix.hpp.

00243 { return x == y; }

bool mmx::exact_eq ( long long unsigned int  c1,
long long unsigned int  c2 
) [inline]

Definition at line 240 of file basix.hpp.

00240                                                                             {
00241   return c1 == c2; }

bool mmx::exact_eq ( long long int  c1,
long long int  c2 
) [inline]

Definition at line 239 of file basix.hpp.

00239 { return c1 == c2; }

bool mmx::exact_eq ( long unsigned int  c1,
long unsigned int  c2 
) [inline]

Definition at line 237 of file basix.hpp.

00237                                                                   {
00238   return c1 == c2; }

bool mmx::exact_eq ( long int  c1,
long int  c2 
) [inline]

Definition at line 236 of file basix.hpp.

00236 { return c1 == c2; }

bool mmx::exact_eq ( unsigned int  c1,
unsigned int  c2 
) [inline]

Definition at line 235 of file basix.hpp.

00235 { return c1 == c2; }

bool mmx::exact_eq ( int  c1,
int  c2 
) [inline]

Definition at line 234 of file basix.hpp.

00234 { return c1 == c2; }

bool mmx::exact_eq ( short unsigned int  c1,
short unsigned int  c2 
) [inline]

Definition at line 232 of file basix.hpp.

00232                                                                     {
00233   return c1 == c2; }

bool mmx::exact_eq ( short int  c1,
short int  c2 
) [inline]

Definition at line 231 of file basix.hpp.

00231 { return c1 == c2; }

bool mmx::exact_eq ( unsigned char  c1,
unsigned char  c2 
) [inline]

Definition at line 230 of file basix.hpp.

00230 { return c1 == c2; }

bool mmx::exact_eq ( signed char  c1,
signed char  c2 
) [inline]

Definition at line 229 of file basix.hpp.

00229 { return c1 == c2; }

bool mmx::exact_eq ( char  c1,
char  c2 
) [inline]
nat mmx::exact_hash ( const vector< C, V > &  x  )  [inline]

Definition at line 1152 of file vector.hpp.

01159 {

nat mmx::exact_hash ( const format< C > &  x  )  [inline]

Definition at line 230 of file type_props.hpp.

00230 { return 0; }

nat mmx::exact_hash ( const triple< C1, C2, C3 > &  x  )  [inline]

Definition at line 59 of file triple.hpp.

00063 {

nat mmx::exact_hash ( const table< C, T, V > &  x  )  [inline]

Definition at line 694 of file table.hpp.

00698 { return unary_map<sqrt_op> (t); }

nat mmx::exact_hash ( const syntactic &  c  )  [inline]

Definition at line 48 of file syntactic.hpp.

References exact_hash().

00048 { return exact_hash (*c); }

nat exact_hash ( const symbol< C, V > &  s  )  [inline]

Definition at line 110 of file symbol.hpp.

References as_hash().

00110                                              {
00111   return as_hash (s.rep); }

nat mmx::exact_hash ( const string &  x  )  [inline]

Definition at line 107 of file string.hpp.

00108 { return copy (s); }

nat mmx::exact_hash ( const storage x  )  [inline]

Definition at line 55 of file storage.hpp.

00057 { return "storage"; }

nat mmx::exact_hash ( const sparse_vector< C, T, V > &  x  )  [inline]

Definition at line 169 of file sparse_vector.hpp.

00176 {

nat mmx::exact_hash ( const port &  x  )  [inline]

Definition at line 63 of file port.hpp.

00066 { return p->expression (); }

nat mmx::exact_hash ( const pair< C1, C2 > &  x  )  [inline]

Definition at line 54 of file pair.hpp.

00058 {

nat mmx::exact_hash ( const new_table< C, T, V > &  x  )  [inline]

Definition at line 765 of file new_table.hpp.

00769 { return unary_map<sqrt_op> (t); }

nat mmx::exact_hash ( const Indirect< R > &  x  )  [inline]

Definition at line 768 of file mmc_glue.hpp.

References as_hash(), and Indirect< R >::rep.

00768                                                   {
00769   return as_hash (x.rep); }

nat mmx::exact_hash ( const literal c  )  [inline]

Definition at line 42 of file literal.hpp.

References exact_hash().

00042 { return exact_hash (as_symbol (c)); }

nat mmx::exact_hash ( const list< C > &  x  )  [inline]

Definition at line 229 of file list.hpp.

00236 {

nat exact_hash ( const iterator< C > &  it  )  [inline]

Definition at line 184 of file iterator.hpp.

00195 : public Iterator_rep {

nat mmx::exact_hash ( const heap< C > &  x  )  [inline]

Definition at line 244 of file heap.hpp.

00247 {

nat mmx::exact_hash ( const generic &  g  )  [inline]

Definition at line 160 of file generic.hpp.

00160                                          {
00161   return g->get_exact_hash_value (); }

nat mmx::exact_hash ( const function_8< D, S1, S2, S3, S4, S5, S6, S7, S8 > &  x  )  [inline]

Definition at line 613 of file function.hpp.

00615 {

nat mmx::exact_hash ( const function_7< D, S1, S2, S3, S4, S5, S6, S7 > &  x  )  [inline]

Definition at line 553 of file function.hpp.

00555 {

nat mmx::exact_hash ( const function_6< D, S1, S2, S3, S4, S5, S6 > &  x  )  [inline]

Definition at line 493 of file function.hpp.

00495 {

nat mmx::exact_hash ( const function_5< D, S1, S2, S3, S4, S5 > &  x  )  [inline]

Definition at line 434 of file function.hpp.

00436 {

nat mmx::exact_hash ( const function_4< D, S1, S2, S3, S4 > &  x  )  [inline]

Definition at line 375 of file function.hpp.

00377 {

nat mmx::exact_hash ( const function_3< D, S1, S2, S3 > &  x  )  [inline]

Definition at line 316 of file function.hpp.

00318 {

nat mmx::exact_hash ( const function_2< D, S1, S2 > &  x  )  [inline]

Definition at line 257 of file function.hpp.

00259 {

nat mmx::exact_hash ( const function_1< D, S1 > &  x  )  [inline]

Definition at line 157 of file function.hpp.

00159 {

nat mmx::exact_hash ( const function_0< D > &  x  )  [inline]

Definition at line 101 of file function.hpp.

00103 {

nat mmx::exact_hash ( const exception &  e  )  [inline]

Definition at line 37 of file exception.hpp.

References exact_hash().

00037 { return exact_hash (*e); }

nat mmx::exact_hash ( const dynamic x  )  [inline]

Definition at line 95 of file dynamic.hpp.

nat mmx::exact_hash ( const observer x  )  [inline]

Definition at line 58 of file dynamic.hpp.

00065 : public rep_struct {

nat mmx::exact_hash ( const document c  )  [inline]

Definition at line 49 of file document.hpp.

References exact_hash().

00049 { return exact_hash (*c); }

nat mmx::exact_hash ( const compound c  )  [inline]

Definition at line 45 of file compound.hpp.

References exact_hash().

00045                                           {
00046   return exact_hash (as_symbol (c)); }

nat mmx::exact_hash ( const cache< C, T > &  c  )  [inline]

Definition at line 40 of file cache.hpp.

References hard_hash().

00040 { return hard_hash (*c); }

nat mmx::exact_hash ( C *  p  )  [inline]

Definition at line 226 of file basix.hpp.

References as_hash().

00226 { return as_hash (p); }

nat mmx::exact_hash ( const double &  x  )  [inline]

Definition at line 223 of file basix.hpp.

References n.

00223                                         {
00224   union { nat n; double d; } u;
00225   u.d= x; return u.n; }

nat mmx::exact_hash ( const float &  x  )  [inline]

Definition at line 221 of file basix.hpp.

00221                                        {
00222 return (*((nat*) ((void*) &x))) & 0xffffffff; }

nat mmx::exact_hash ( long long unsigned int  c  )  [inline]

Definition at line 218 of file basix.hpp.

00218                                                  {
00219   nat h = (nat) ((c >> (4 * sizeof (long int))) >> (4 * sizeof (long int)));
00220   return (h<<1) ^ (h<<5) ^ (h>>27) ^ ((nat) c); }

nat mmx::exact_hash ( long long int  c  )  [inline]

Definition at line 215 of file basix.hpp.

00215                                         {
00216   nat h = (nat) ((c >> (4 * sizeof (long int))) >> (4 * sizeof (long int)));
00217   return (h<<1) ^ (h<<5) ^ (h>>27) ^ ((nat) c); }

nat mmx::exact_hash ( long unsigned int  c  )  [inline]

Definition at line 214 of file basix.hpp.

00214 { return (nat) c; }

nat mmx::exact_hash ( long int  c  )  [inline]

Definition at line 213 of file basix.hpp.

00213 { return (nat) c; }

nat mmx::exact_hash ( unsigned int  c  )  [inline]

Definition at line 212 of file basix.hpp.

00212 { return (nat) c; }

nat mmx::exact_hash ( int  c  )  [inline]

Definition at line 211 of file basix.hpp.

00211 { return (nat) c; }

nat mmx::exact_hash ( short unsigned int  c  )  [inline]

Definition at line 210 of file basix.hpp.

00210 { return (nat) c; }

nat mmx::exact_hash ( short int  c  )  [inline]

Definition at line 209 of file basix.hpp.

00209 { return (nat) c; }

nat mmx::exact_hash ( unsigned char  c  )  [inline]

Definition at line 208 of file basix.hpp.

00208 { return (nat) c; }

nat mmx::exact_hash ( signed char  c  )  [inline]

Definition at line 207 of file basix.hpp.

00207 { return (nat) c; }

nat mmx::exact_hash ( char  c  )  [inline]
bool mmx::exact_neq ( const vector< syntactic > &  v,
const vector< syntactic > &  w 
)

Definition at line 541 of file syntactic.cpp.

References exact_eq().

00541                                                                         {
00542   return !exact_eq (v, w);
00543 }

bool mmx::exact_neq ( const vector< C, V > &  x,
const int &  y 
) [inline]

Definition at line 1155 of file vector.hpp.

01159 {

bool mmx::exact_neq ( const vector< C, V > &  x,
const vector< C, V > &  y 
) [inline]

Definition at line 1152 of file vector.hpp.

01159 {

bool mmx::exact_neq ( const format< C > &  x,
const format< C > &  y 
) [inline]

Definition at line 218 of file type_props.hpp.

00218 { return false; }

bool mmx::exact_neq ( const triple< C1, C2, C3 > &  x,
const triple< C1, C2, C3 > &  y 
) [inline]

Definition at line 59 of file triple.hpp.

00063 {

bool mmx::exact_neq ( const table< C, T, V > &  x,
const table< C, T, V > &  y 
) [inline]

Definition at line 694 of file table.hpp.

00698 { return unary_map<sqrt_op> (t); }

bool mmx::exact_neq ( const syntactic &  c1,
const syntactic &  c2 
) [inline]

Definition at line 56 of file syntactic.hpp.

References exact_neq().

00056                                                                  {
00057   return exact_neq (*c1, *c2); }

bool exact_neq ( const symbol< C, V > &  s1,
const symbol< C, V > &  s2 
) [inline]

Definition at line 114 of file symbol.hpp.

00114                                                                 {
00115   return s1.rep != s2.rep; }

bool mmx::exact_neq ( const string &  x,
const string &  y 
) [inline]

Definition at line 107 of file string.hpp.

00108 { return copy (s); }

bool mmx::exact_neq ( const storage x,
const storage y 
) [inline]

Definition at line 55 of file storage.hpp.

00057 { return "storage"; }

bool mmx::exact_neq ( const sparse_vector< C, T, V > &  x,
const sparse_vector< C, T, V > &  y 
) [inline]

Definition at line 169 of file sparse_vector.hpp.

00176 {

bool mmx::exact_neq ( const port &  x,
const port &  y 
) [inline]

Definition at line 63 of file port.hpp.

00066 { return p->expression (); }

bool mmx::exact_neq ( const pair< C1, C2 > &  x,
const pair< C1, C2 > &  y 
) [inline]

Definition at line 54 of file pair.hpp.

00058 {

bool mmx::exact_neq ( const new_table< C, T, V > &  x,
const new_table< C, T, V > &  y 
) [inline]

Definition at line 765 of file new_table.hpp.

00769 { return unary_map<sqrt_op> (t); }

bool mmx::exact_neq ( const Indirect< R > &  x,
const Indirect< R > &  y 
) [inline]

Definition at line 760 of file mmc_glue.hpp.

References Indirect< R >::rep.

00760                                                                         {
00761   return x.rep != y.rep; }

bool mmx::exact_neq ( const literal c1,
const literal c2 
) [inline]

Definition at line 50 of file literal.hpp.

References exact_neq().

00050                                                              {
00051   return exact_neq (as_symbol (c1), as_symbol (c2)); }

bool mmx::exact_neq ( const list< C > &  x,
const list< C > &  y 
) [inline]

Definition at line 229 of file list.hpp.

00236 {

bool mmx::exact_neq ( const iterator< C > &  x,
const iterator< C > &  y 
) [inline]

Definition at line 184 of file iterator.hpp.

00195 : public Iterator_rep {

bool mmx::exact_neq ( const heap< C > &  x,
const heap< C > &  y 
) [inline]

Definition at line 244 of file heap.hpp.

00247 {

bool exact_neq ( const int &  x1,
const generic x2 
)

Definition at line 617 of file generic.cpp.

References exact_neq().

00617                                                   {
00618   return exact_neq (x2, x1); }

bool exact_neq ( const generic x1,
const int &  x2 
)

Definition at line 613 of file generic.cpp.

References exact_eq().

00613                                                   {
00614   return !exact_eq (x1, x2); }

bool exact_neq ( const generic x1,
const generic x2 
)

Definition at line 611 of file generic.cpp.

References exact_eq().

00611                                                       {
00612   return !exact_eq (x1, x2); }

bool mmx::exact_neq ( const function_8< D, S1, S2, S3, S4, S5, S6, S7, S8 > &  x,
const function_8< D, S1, S2, S3, S4, S5, S6, S7, S8 > &  y 
) [inline]

Definition at line 613 of file function.hpp.

00615 {

bool mmx::exact_neq ( const function_7< D, S1, S2, S3, S4, S5, S6, S7 > &  x,
const function_7< D, S1, S2, S3, S4, S5, S6, S7 > &  y 
) [inline]

Definition at line 553 of file function.hpp.

00555 {

bool mmx::exact_neq ( const function_6< D, S1, S2, S3, S4, S5, S6 > &  x,
const function_6< D, S1, S2, S3, S4, S5, S6 > &  y 
) [inline]

Definition at line 493 of file function.hpp.

00495 {

bool mmx::exact_neq ( const function_5< D, S1, S2, S3, S4, S5 > &  x,
const function_5< D, S1, S2, S3, S4, S5 > &  y 
) [inline]

Definition at line 434 of file function.hpp.

00436 {

bool mmx::exact_neq ( const function_4< D, S1, S2, S3, S4 > &  x,
const function_4< D, S1, S2, S3, S4 > &  y 
) [inline]

Definition at line 375 of file function.hpp.

00377 {

bool mmx::exact_neq ( const function_3< D, S1, S2, S3 > &  x,
const function_3< D, S1, S2, S3 > &  y 
) [inline]

Definition at line 316 of file function.hpp.

00318 {

bool mmx::exact_neq ( const function_2< D, S1, S2 > &  x,
const function_2< D, S1, S2 > &  y 
) [inline]

Definition at line 257 of file function.hpp.

00259 {

bool mmx::exact_neq ( const function_1< D, S1 > &  x,
const function_1< D, S1 > &  y 
) [inline]

Definition at line 157 of file function.hpp.

00159 {

bool mmx::exact_neq ( const function_0< D > &  x,
const function_0< D > &  y 
) [inline]

Definition at line 101 of file function.hpp.

00103 {

bool mmx::exact_neq ( const exception &  e1,
const exception &  e2 
) [inline]

Definition at line 45 of file exception.hpp.

References exact_neq().

00045                                                                  {
00046   return exact_neq (*e1, *e2); }

bool mmx::exact_neq ( const dynamic x,
const dynamic y 
) [inline]

Definition at line 95 of file dynamic.hpp.

bool mmx::exact_neq ( const observer x,
const observer y 
) [inline]

Definition at line 58 of file dynamic.hpp.

00065 : public rep_struct {

bool mmx::exact_neq ( const document c1,
const document c2 
) [inline]

Definition at line 57 of file document.hpp.

References exact_neq().

00057                                                                {
00058   return exact_neq (*c1, *c2); }

bool mmx::exact_neq ( const compound c1,
const compound c2 
) [inline]

Definition at line 55 of file compound.hpp.

References exact_neq().

00055                                                                {
00056   return exact_neq (as_symbol (c1), as_symbol (c2)); }

bool mmx::exact_neq ( const cache< C, T > &  c1,
const cache< C, T > &  c2 
) [inline]

Definition at line 48 of file cache.hpp.

References hard_neq().

00048                                                               {
00049   return hard_neq (*c1, *c2); }

bool mmx::exact_neq ( C *  p1,
C *  p2 
) [inline]

Definition at line 264 of file basix.hpp.

00264 { return p1 != p2; }

bool mmx::exact_neq ( double  x,
double  y 
) [inline]

Definition at line 263 of file basix.hpp.

00263 { return x != y; }

bool mmx::exact_neq ( float  x,
float  y 
) [inline]

Definition at line 262 of file basix.hpp.

00262 { return x != y; }

bool mmx::exact_neq ( long long unsigned int  c1,
long long unsigned int  c2 
) [inline]

Definition at line 259 of file basix.hpp.

00259                                                                              {
00260   return c1 != c2; }

bool mmx::exact_neq ( long long int  c1,
long long int  c2 
) [inline]

Definition at line 258 of file basix.hpp.

00258 { return c1 != c2; }

bool mmx::exact_neq ( long unsigned int  c1,
long unsigned int  c2 
) [inline]

Definition at line 256 of file basix.hpp.

00256                                                                    {
00257   return c1 != c2; }

bool mmx::exact_neq ( long int  c1,
long int  c2 
) [inline]

Definition at line 255 of file basix.hpp.

00255 { return c1 != c2; }

bool mmx::exact_neq ( unsigned int  c1,
unsigned int  c2 
) [inline]

Definition at line 254 of file basix.hpp.

00254 { return c1 != c2; }

bool mmx::exact_neq ( int  c1,
int  c2 
) [inline]

Definition at line 253 of file basix.hpp.

00253 { return c1 != c2; }

bool mmx::exact_neq ( short unsigned int  c1,
short unsigned int  c2 
) [inline]

Definition at line 251 of file basix.hpp.

00251                                                                      {
00252   return c1 != c2; }

bool mmx::exact_neq ( short int  c1,
short int  c2 
) [inline]

Definition at line 250 of file basix.hpp.

00250 { return c1 != c2; }

bool mmx::exact_neq ( unsigned char  c1,
unsigned char  c2 
) [inline]

Definition at line 249 of file basix.hpp.

00249 { return c1 != c2; }

bool mmx::exact_neq ( signed char  c1,
signed char  c2 
) [inline]

Definition at line 248 of file basix.hpp.

00248 { return c1 != c2; }

bool mmx::exact_neq ( char  c1,
char  c2 
) [inline]
bool mmx::exact_new ( const vector< syntactic > &  v,
const vector< syntactic > &  w 
)
int exec ( const vector< string > &  v  ) 

Definition at line 287 of file system.cpp.

References as_charp(), ASSERT, N(), and n.

00287                                {
00288   nat n= N(v);
00289   ASSERT (n>0, "at least one argument expected");
00290   typedef char* charp;
00291   charp _v[n+1];
00292   for (nat i=0; i<n; i++)
00293     _v[i]= as_charp (v[i]);
00294   _v[n]= NULL;
00295 #if defined(__MINGW__) || defined(__MINGW32__)
00296   return _execvp (_v[0], _v);
00297 #else
00298   return execvp (_v[0], _v);
00299 #endif
00300   // NOTE: strings in _v never deallocated
00301 }

vector<C,V> mmx::exp ( const vector< C, V > &  v  )  [inline]

Definition at line 1178 of file vector.hpp.

01178 { return unary_map<exp_op> (v); }

table<C,T,V> mmx::exp ( const table< C, T, V > &  t  )  [inline]

Definition at line 699 of file table.hpp.

00699 { return unary_map<exp_op> (t); }

syntactic exp ( const syntactic g  ) 

Definition at line 428 of file syntactic.cpp.

References GEN_EXP, and syn().

00428 { return syn (GEN_EXP, g); }

new_table<C,T,V> mmx::exp ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 770 of file new_table.hpp.

00770 { return unary_map<exp_op> (t); }

generic exp ( const generic x1  ) 

Definition at line 433 of file generic.cpp.

References ACC_EXP, ACC_UNARY, current_ev, and GEN_EXP.

00433                         {
00434   ACC_UNARY (ACC_EXP, x1);
00435   return current_ev->apply (GEN_EXP, x1);
00436 }

double exp ( const double &  x  )  [inline]

Definition at line 45 of file double.hpp.

Referenced by cosh(), exp_op::op(), exp_op::op_init(), polar(), exp_op::set_op(), sinh(), and tanh().

00045 { return std::exp (x); }

double exp2 ( const double &  x  )  [inline]

Definition at line 46 of file double.hpp.

Referenced by exp2_op::op(), and exp2_op::set_op().

00046 { return ::exp2 (x); }

xint mmx::exponent ( const vector< C, V > &  v  )  [inline]

Definition at line 1331 of file vector.hpp.

01331                                             {
01332   return big<max_exponent_op> (v); }

xint exponent ( const generic x  ) 

Definition at line 781 of file generic.cpp.

References ASSERT, current_ev, and GEN_EXPONENT.

00781                                  {
00782   generic r= current_ev->apply (GEN_EXPONENT, x);
00783   ASSERT (is<int> (r), "Int return value expected");
00784   return as<int> (r); }

xint mmx::exponent ( const double &  x  )  [inline]

Definition at line 94 of file double.hpp.

References max().

Referenced by GLUE_47(), magnitude(), exponent_op::op(), max_exponent_op::set_op(), and exponent_op::set_op().

00094                                        {
00095   return (xint) max (-10000.0, logb (x)); }

vector<C,V> mmx::extend ( const vector< C, V > &  v,
const vector< C2, V2 > &  w 
) [inline]

Definition at line 221 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().

00221                                                  {
00222   VERIFY (is_a_scalar (v), "scalar vector expected");
00223   VERIFY (is_non_scalar (w), "non-scalar vector expected");
00224   return Vector (v.scalar(), N(w)); }

vector<C,V> mmx::extract ( const vector< C, V > &  v,
vector< nat >  e 
) [inline]

Definition at line 599 of file vector.hpp.

References C, CF(), N(), and Vector.

00599                                          {
00600   nat l= aligned_size<C,V> (N(e));
00601   C* r= mmx_formatted_new<C> (l, CF(v));
00602   for (nat i=0; i<N(e); i++)
00603     if (e[i] < N(v)) r[i]= v[e[i]];
00604   return Vector (r, N(e), l, CF(v));
00605 }

vector<C,V> mmx::extract_mod ( const vector< C, V > &  v,
nat  k,
nat  p 
) [inline]

Definition at line 590 of file vector.hpp.

References C, CF(), N(), n, and Vector.

00590                                             {
00591   nat n= (N(v) - k + p - 1) / p;
00592   nat l= aligned_size<C,V> (n);
00593   C* r= mmx_formatted_new<C> (l, CF(v));
00594   for (nat i=0; i<n; i++) r[i]= v[i*p+k];
00595   return Vector (r, n, l, CF(v));
00596 }

bool mmx::fall_back_equal ( const generic x,
const generic y 
)

Definition at line 29 of file glue.cpp.

References exact_eq().

Referenced by define_prerequisites().

00029                                                      {
00030   return exact_eq (x, y);
00031 }

static bool mmx::fall_back_unequal ( const generic x,
const generic y 
) [static]

Definition at line 34 of file glue.cpp.

References exact_neq().

Referenced by define_prerequisites().

00034                                                        {
00035   return exact_neq (x, y);
00036 }

format<typename fast_helper< T >::fast_type > mmx::fast ( const format< T > &  fm  )  [inline]

Definition at line 797 of file type_props.hpp.

References fast(), get_format(), and get_sample().

00797                            {
00798   return get_format (fast (get_sample (fm)));
00799 }

fast_helper< T >::fast_type mmx::fast ( const T &  x  )  [inline]

Definition at line 782 of file type_props.hpp.

Referenced by fast_helper< vector< C, V > >::dd(), fast(), fast_op::Fast_type(), and fast_op::set_op().

00782                   {
00783   return fast_helper<T>::dd (x);
00784 }

volatile void fatal_error ( char *  message,
char *  routine,
char *  file 
)

Print message coming from routine in file. Exit with 1.

Definition at line 31 of file basix.cpp.

References mmout.

00031                                                        {
00032   mmout << "\nFatal error: " << message
00033         << "\n             in '" << routine
00034         << "' in file '" << file << "'\n";
00035   exit (1);
00036 }

bool file_exists ( const string file_name  ) 

Definition at line 336 of file system.cpp.

References as_charp(), decode_name(), and free_charp().

Referenced by connect_to_server(), init_system(), path_name(), prefix_dir(), recursive_search_name(), resolve_name(), semi_recursive_search_name(), var_mkdir(), and var_rm().

00336                                  {
00337   //printf ("file_exists: %s\n", S(name));
00338   string name_s= decode_name (name);
00339   char* temp= as_charp (name_s);
00340   FILE* f= fopen (temp, "r");
00341   if (f != NULL) {
00342     fclose (f);
00343     free_charp (temp);
00344     return true;
00345   }
00346   DIR* d= opendir (temp);
00347   free_charp (temp);
00348   if (d != NULL) {
00349     closedir (d);
00350     return true;
00351   }
00352   return false;
00353 }

bool file_is_directory ( const string file_name  ) 

Definition at line 599 of file system.cpp.

References file_test().

Referenced by recursive_search_name(), and semi_recursive_search_name().

00599 { return file_test (name, "d"); }

bool file_is_file ( const string file_name  ) 

Definition at line 598 of file system.cpp.

References file_test().

Referenced by recursive_search_name(), and semi_recursive_search_name().

00598 { return file_test (name, "f"); }

bool file_is_script ( const string file_name  ) 

Definition at line 408 of file system.cpp.

References as_charp(), free_charp(), and starts().

00408                                          {
00409   char* _file_name= as_charp (file_name);
00410   FILE* f= fopen (_file_name, "r");
00411   free_charp (_file_name);
00412   if (f == NULL) return false;
00413   char c;
00414   string s= string ("");
00415   while ((c = fgetc (f)) != EOF && c != '\n') s << c;
00416   fclose (f);
00417   return starts (s, "#!/usr/bin/env mmx-light");
00418 
00419   /*
00420   port f= input_file_port (file_name);
00421   if (error_flag (f)) return false;
00422   char c;
00423   string s= "";
00424   while (can_read (f) > 0) {
00425     f >> c;
00426     if (c == '\n') break;
00427     s << c;
00428   }
00429   return starts (s, "#!/usr/bin/env mmx-light");
00430   */
00431 }

double file_last_modified ( const string file_name  ) 

Definition at line 540 of file system.cpp.

References ERROR, get_attributes(), and mmerr.

00540                                         {
00541   struct stat u_stat;
00542   if (get_attributes (name, &u_stat)) {
00543     mmerr << "name= " << name << "\n";
00544     ERROR ("could not stat file");
00545   }
00546   return (double) u_stat.st_mtime;
00547 }

bool file_test ( const string file_name,
const string attrs 
)

Definition at line 497 of file system.cpp.

References get_attributes(), N(), and n.

Referenced by file_is_directory(), and file_is_file().

00497                                                      {
00498   if (filter == "") return true;
00499   struct stat buf;
00500   if (get_attributes (name, &buf)) return false;
00501   int i, n= N (filter);
00502   for (i=0; i<n; i++)
00503     switch (filter [i]) {
00504       // FIXME: should check user id and group id for r, w and x
00505     case 'f':
00506       if (!S_ISREG (buf.st_mode)) return false;
00507       break;
00508     case 'd':
00509       if (!S_ISDIR (buf.st_mode)) return false;
00510       break;
00511     case 'r':
00512 #ifndef __MINGW32__
00513       if ((buf.st_mode & (S_IRUSR | S_IRGRP | S_IROTH)) == 0) return false;
00514 #else
00515       if ((buf.st_mode & 292) == 0) return false;
00516 #endif
00517       break;
00518     case 'w':
00519 #ifndef __MINGW32__
00520       if ((buf.st_mode & (S_IWUSR | S_IWGRP | S_IWOTH)) == 0) return false;
00521 #else
00522       if ((buf.st_mode & 146) == 0) return false;
00523 #endif
00524       break;
00525     case 'x':
00526 #ifdef OS_WIN32
00527       if (suffix(name) == "bat") break;
00528 #endif
00529 #ifndef __MINGW32__
00530       if ((buf.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)) == 0) return false;
00531 #else
00532       if ((buf.st_mode & 73) == 0) return false;
00533 #endif
00534       break;
00535     }
00536   return true;
00537 }

vector<C> mmx::fill ( const C &  c,
nat  n 
) [inline]

Definition at line 488 of file vector.hpp.

References C, Format, and get_format().

00488                          {
00489   Format fm= get_format (c);
00490   nat l= default_aligned_size<C> (n);
00491   C* a= mmx_formatted_new<C> (l, fm);
00492   for (nat i=0; i<n; i++) a[i]= c;
00493   return vector<C> (a, n, l, fm);
00494 }

vector<C> mmx::fill ( nat  n,
const format< C > &  fm 
) [inline]

Definition at line 481 of file vector.hpp.

References C.

00481                                {
00482   nat l= default_aligned_size<C> (n);
00483   C* a= mmx_formatted_new<C> (l, fm);
00484   return vector<C> (a, n, l, fm);
00485 }

vector<C> mmx::fill ( nat  n  )  [inline]

Definition at line 473 of file vector.hpp.

References C, and Format.

Referenced by is_evaluable(), and is_reconstructible().

00473              {
00474   Format fm;
00475   nat l= default_aligned_size<C> (n);
00476   C* a= mmx_formatted_new<C> (l, fm);
00477   return vector<C> (a, n, l, fm);
00478 }

void fill_out ( vec_routine v,
nat &  n,
nat  i,
const routine r 
)

Definition at line 347 of file generic.cpp.

Referenced by accelerator< C >::set_apply(), and accelerator< C >::set_construct().

00347                                                            {
00348   if (i >= n) {
00349     nat      new_n= (nat) (1.2 * ((double) (i + 2)));
00350     routine* new_v= mmx_new<routine> (new_n, routine ());
00351     for (nat j=0; j<n; j++) new_v[j]= v[j];
00352     if (v != NULL) mmx_delete<routine> (v, n);
00353     n= new_n;
00354     v= new_v;
00355   }
00356   v[i]= r;
00357 }

int mmx::find ( const vector< C, V > &  v,
const C &  x 
) [inline]

Definition at line 705 of file vector.hpp.

References N(), and n.

00705                                    {
00706   nat i, n=N(v);
00707   for (i=0; i<n; i++)
00708     if (v[i] == x) return (int) i;
00709   return (int) i;
00710 }

int mmx::find ( const list< C > &  l,
const C &  x 
) [inline]

Definition at line 321 of file list.hpp.

References car(), cdr(), and is_nil().

Referenced by contains(), GLUE_16(), GLUE_17(), and GLUE_18().

00321                                  {
00322   if (is_nil (l) || car (l) == x) return 0;
00323   else return find<C> (cdr (l), x) + 1;
00324 }

C3 C1 mmx::first ( const triple< C1, C2, C3 > &  t  )  [inline]
Type Constraints

Definition at line 40 of file triple.hpp.

00040 { return t.x1; }

syntactic mmx::flatten ( const string obj->lex_string  ) 

Definition at line 597 of file syntactic.cpp.

References quote(), and syn().

00597                                     {
00598   return syn ("$text", syntactic (quote (s))); }

syntactic mmx::flatten ( const char *const &  obj->lex_string  ) 

Definition at line 595 of file syntactic.cpp.

References quote(), and syn().

00595                                           {
00596   return syn ("$text", syntactic (quote (s))); }

syntactic mmx::flatten ( const generic g  ) 

Definition at line 136 of file generic.cpp.

References flatten(), and MEMOIZE_UNARY.

00136                            {
00137   MEMOIZE_UNARY (std_memoizer,syntactic,generic,flatten,g,
00138                  g->expression());
00139 }

syntactic mmx::flatten ( const cpp_printer p  )  [inline]

Definition at line 288 of file cpp_printer.cpp.

00288                                {
00289   return "#cpp_printer<>";
00290 }

syntactic mmx::flatten ( const vector< C, V > &  v  )  [inline]

Definition at line 524 of file vector.hpp.

References apply(), flatten(), GEN_SQTUPLE, is_a_scalar(), N(), and n.

00524                           {
00525   if (is_a_scalar (v)) return flatten (v.scalar());
00526   nat i, n= N(v);
00527   vector<syntactic> r= fill <syntactic> (n);
00528   for (i=0; i<n; i++)
00529     r[i]= flatten (v[i]);
00530   return apply (GEN_SQTUPLE, r);
00531 }

syntactic mmx::flatten ( const format< C > &  x  )  [inline]

Definition at line 236 of file type_props.hpp.

References apply(), cpp_demangle(), flatten(), and lit().

00236                              {
00237   string name= cpp_demangle (typeid (format<C>).name ());
00238   return apply (flatten (lit (name))); }

syntactic mmx::flatten ( const tuple< C > &  t  )  [inline]

Definition at line 46 of file tuple.hpp.

References cdr(), compound_to_vector(), flatten(), gen(), and GEN_TUPLE.

00046                          {
00047   return flatten (gen (GEN_TUPLE, cdr (compound_to_vector (*t))));
00048 }

syntactic mmx::flatten ( const triple< C1, C2, C3 > &  t  )  [inline]

Definition at line 63 of file triple.hpp.

References apply(), flatten(), and GEN_SQTUPLE.

00063                           {
00064   return apply (GEN_SQTUPLE, flatten (t.x1), flatten (t.x2), flatten (t.x3));
00065 }

syntactic mmx::flatten ( const table< C, T, V > &  t  )  [inline]

Definition at line 423 of file table.hpp.

References apply(), busy(), flatten(), and iterate().

00423                          {
00424   vector<syntactic> v;
00425   for (iterator<pair<T,C> > it= iterate (t); busy (it); ++it)
00426     v << apply ("~>", flatten ((*it).x1), flatten ((*it).x2));
00427   return apply ("table", v);
00428 }

syntactic mmx::flatten ( const string &  s  ) 
syntactic mmx::flatten ( const char *const &  s  ) 
syntactic flatten ( const long double &  x  ) 

Definition at line 593 of file syntactic.cpp.

References as_string().

00593                                          {
00594   return syntactic (as_string (x)); }

syntactic flatten ( const double &  x  ) 

Definition at line 591 of file syntactic.cpp.

References as_string().

00591                                     {
00592   return syntactic (as_string (x)); }

syntactic flatten ( const float &  x  ) 

Definition at line 589 of file syntactic.cpp.

References as_string().

00589                                    {
00590   return syntactic (as_string (x)); }

syntactic flatten ( const long long unsigned int &  i  ) 

Definition at line 587 of file syntactic.cpp.

References as_string().

00587                                                     {
00588   return syntactic (as_string (i)); }

syntactic flatten ( const long long int &  i  ) 

Definition at line 585 of file syntactic.cpp.

References as_string().

00585                                            {
00586   return syntactic (as_string (i)); }

syntactic flatten ( const long unsigned int &  i  ) 

Definition at line 583 of file syntactic.cpp.

References as_string().

00583                                                {
00584   return syntactic (as_string (i)); }

syntactic flatten ( const long int &  i  ) 

Definition at line 581 of file syntactic.cpp.

References as_string().

00581                                       {
00582   return syntactic (as_string (i)); }

syntactic flatten ( const unsigned int &  i  ) 

Definition at line 579 of file syntactic.cpp.

References as_string().

00579                                           {
00580   return syntactic (as_string (i)); }

syntactic flatten ( const int &  i  ) 

Definition at line 577 of file syntactic.cpp.

References as_string().

00577                                  {
00578   return syntactic (as_string (i)); }

syntactic flatten ( const short unsigned int &  i  ) 

Definition at line 575 of file syntactic.cpp.

References as_string().

00575                                                 {
00576   return syntactic (as_string (i)); }

syntactic flatten ( const short int &  i  ) 

Definition at line 573 of file syntactic.cpp.

References as_string().

00573                                        {
00574   return syntactic (as_string (i)); }

syntactic flatten ( const unsigned char &  i  ) 

Definition at line 571 of file syntactic.cpp.

References as_string().

00571                                            {
00572   return syntactic (as_string (i)); }

syntactic flatten ( const signed char &  i  ) 

Definition at line 569 of file syntactic.cpp.

References as_string().

00569                                          {
00570   return syntactic (as_string (i)); }

syntactic flatten ( const char &  i  ) 

Definition at line 567 of file syntactic.cpp.

References as_string().

00567                                   {
00568   return syntactic (as_string (i)); }

syntactic flatten ( const bool &  b  ) 

Definition at line 565 of file syntactic.cpp.

00565                                   {
00566   return b? syntactic ("true"): syntactic ("false"); }

syntactic mmx::flatten ( C *const &  x  )  [inline]

Definition at line 325 of file syntactic.hpp.

References as_string().

00325                        {
00326   return as_string ((void*) x);
00327 }

syntactic mmx::flatten ( const syntactic &  g  )  [inline]

Definition at line 62 of file syntactic.hpp.

00062 { return g; }

syntactic mmx::flatten ( const symbol< C, V > &  s  )  [inline]

Definition at line 144 of file symbol.hpp.

References apply(), and flatten().

00144                                                 {
00145   return apply ("symbol", flatten (*s)); }

syntactic mmx::flatten ( const storage st  )  [inline]

Definition at line 57 of file storage.hpp.

00057 { return "storage"; }

syntactic mmx::flatten ( const sparse_vector< C, T, V > &  v  )  [inline]

Definition at line 105 of file sparse_vector.hpp.

References apply(), flatten(), and N().

00105                                  {
00106   vector<syntactic> r;
00107   for (nat i=0; i<N(v); i++)
00108     r << flatten (v[i]);
00109   return apply ("sparse_vector", r);
00110 }

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.

00097                                    {
00098   return flatten (gen (GEN_TUPLE, l.obj, l.file_name, l.input_number,
00099                        gen (GEN_TUPLE, l.begin.line, l.begin.column),
00100                        gen (GEN_TUPLE, l.end.line, l.end.column)));
00101 }

syntactic mmx::flatten ( const routine fun  )  [inline]

Definition at line 100 of file routine.hpp.

References as_syntactic(), GEN_NIL, and is_nil().

00100                                               {
00101   if (is_nil (fun)) return as_syntactic (GEN_NIL);
00102   else return as_syntactic (fun->name); }

syntactic mmx::flatten ( const primitive &  fun  )  [inline]

Definition at line 47 of file primitive.hpp.

References as_syntactic(), GEN_NIL, and is_nil().

00047                                                 {
00048   if (is_nil (fun)) return as_syntactic (GEN_NIL);
00049   else return as_syntactic (fun->name); }

syntactic mmx::flatten ( const port &  p  )  [inline]

Definition at line 66 of file port.hpp.

00066 { return p->expression (); }

syntactic mmx::flatten ( const pair< C1, C2 > &  p  )  [inline]

Definition at line 63 of file pair.hpp.

References apply(), flatten(), and GEN_SQTUPLE.

00063                         {
00064   return apply (GEN_SQTUPLE, flatten (p.x1), flatten (p.x2));
00065 }

syntactic mmx::flatten ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 494 of file new_table.hpp.

References apply(), busy(), flatten(), and iterate().

00494                          {
00495   vector<syntactic> v;
00496   for (iterator<pair<T,C> > it= iterate (t); busy (it); ++it)
00497     v << apply ("~>", flatten ((*it).x1), flatten ((*it).x2));
00498   return apply ("table", v);
00499 }

syntactic mmx::flatten ( const Indirect< R > &  x  )  [inline]

Definition at line 772 of file mmc_glue.hpp.

00772                                                      {
00773   return syntactic ("category"); }

syntactic mmx::flatten ( const pair< pair< T1, T2 >, pair< U1, U2 > > &  p  )  [inline]

Definition at line 725 of file mmc_glue.hpp.

References apply(), arguments(), flatten(), and GEN_SQTUPLE.

00725                                                   {
00726   vector<syntactic> args;
00727   args << arguments (flatten (p.x1));
00728   args << arguments (flatten (p.x2));
00729   return apply (GEN_SQTUPLE, args);
00730 }

syntactic mmx::flatten ( const pair< pair< T1, T2 >, U > &  p  )  [inline]

Definition at line 717 of file mmc_glue.hpp.

References apply(), arguments(), flatten(), and GEN_SQTUPLE.

00717                                         {
00718   vector<syntactic> args;
00719   args << arguments (flatten (p.x1));
00720   args << flatten (p.x2);
00721   return apply (GEN_SQTUPLE, args);
00722 }

syntactic mmx::flatten ( const pair< T, pair< U1, U2 > > &  p  )  [inline]

Definition at line 709 of file mmc_glue.hpp.

References apply(), arguments(), flatten(), and GEN_SQTUPLE.

00709                                         {
00710   vector<syntactic> args;
00711   args << flatten (p.x1);
00712   args << arguments (flatten (p.x2));
00713   return apply (GEN_SQTUPLE, args);
00714 }

syntactic flatten ( const literal s  ) 

Definition at line 21 of file literal.cpp.

References as_syntactic().

00021                            {
00022   return as_syntactic (as<generic> (s));
00023 }

syntactic mmx::flatten ( const list< C > &  l  )  [inline]

Definition at line 236 of file list.hpp.

References apply(), flatten(), GEN_SQTUPLE, is_nil(), List, read_car(), and read_cdr().

00236                         {
00237   vector<syntactic> v;
00238   List counter= l;
00239   while (!is_nil (counter)) {
00240     v << flatten (read_car (counter));
00241     counter= read_cdr (counter);
00242   }
00243   return apply (GEN_SQTUPLE, v);
00244 }

syntactic mmx::flatten ( const iterator< C > &  it  )  [inline]

Definition at line 137 of file iterator.hpp.

References flatten().

00137                              {
00138   return flatten ("iterator", it);
00139   // NOTE: when C involves the generic type, then traversal of the iterator
00140   // is a non trivial operations which may cause trouble (like in 1..10)
00141   // Indeed, the traveral may require operations like < on generic which
00142   // are not defined in the output evaluator.
00143   // return flatten (generic ("iterator"), it);
00144   // (void) it; return "iterator";
00145 }

syntactic mmx::flatten ( const syntactic fun,
const iterator< C > &  it 
) [inline]

Definition at line 129 of file iterator.hpp.

References apply(), busy(), and flatten().

00129                                                    {
00130   vector<syntactic> v;
00131   for (; busy (it); ++it)
00132     v << flatten (*it);
00133   return apply (fun, v);
00134 }

syntactic mmx::flatten ( const heap< C > &  h  )  [inline]

Definition at line 254 of file heap.hpp.

References flatten(), and iterate().

00254                         {
00255   return flatten (syntactic ("heap"), iterate (h));
00256 }

syntactic mmx::flatten ( const generic_function fun  )  [inline]

Definition at line 49 of file generic_function.hpp.

00049                                                        {
00050   return fun -> Flatten (); }

syntactic mmx::flatten ( const function_8< D, S1, S2, S3, S4, S5, S6, S7, S8 > &  f  )  [inline]

Definition at line 605 of file function.hpp.

00605                                                   {
00606   return "function"; }

syntactic mmx::flatten ( const function_7< D, S1, S2, S3, S4, S5, S6, S7 > &  f  )  [inline]

Definition at line 545 of file function.hpp.

00545                                                   {
00546   return "function"; }

syntactic mmx::flatten ( const function_6< D, S1, S2, S3, S4, S5, S6 > &  f  )  [inline]

Definition at line 485 of file function.hpp.

00485                                                   {
00486   return "function"; }

syntactic mmx::flatten ( const function_5< D, S1, S2, S3, S4, S5 > &  f  )  [inline]

Definition at line 426 of file function.hpp.

00426                                                   {
00427   return "function"; }

syntactic mmx::flatten ( const function_4< D, S1, S2, S3, S4 > &  f  )  [inline]

Definition at line 367 of file function.hpp.

00367                                                   {
00368   return "function"; }

syntactic mmx::flatten ( const function_3< D, S1, S2, S3 > &  f  )  [inline]

Definition at line 308 of file function.hpp.

00308                                                   {
00309   return "function"; }

syntactic mmx::flatten ( const function_2< D, S1, S2 > &  f  )  [inline]

Definition at line 248 of file function.hpp.

References apply().

00248                                                   {
00249   return apply ("function",
00250                 flatten_type<S1> (), flatten_type<S2> (), flatten_type<D> ()); }

syntactic mmx::flatten ( const function_1< D, S1 > &  f  )  [inline]

Definition at line 149 of file function.hpp.

References apply().

00149                                                   {
00150   return apply ("function", flatten_type<S1> (), flatten_type<D> ()); }

syntactic mmx::flatten ( const function_0< D > &  f  )  [inline]

Definition at line 93 of file function.hpp.

References apply().

00093                                                   {
00094   return apply ("function", flatten_type<D> ()); }

syntactic mmx::flatten ( const exception &  e  )  [inline]

Definition at line 52 of file exception.hpp.

References flatten().

00052 { return flatten (*e); }

syntactic flatten ( const dynamic g  ) 

Definition at line 90 of file dynamic.cpp.

References apply(), attach(), flatten(), inside(), N(), output_observer(), OUTPUT_OBSERVER, and unique_identifier().

00090                            {
00091   syntactic r=
00092     apply ("$dynamic", syntactic (unique_identifier (g)), flatten (g->val));
00093   for (nat i=0; i<N(g->obs); i++)
00094     if (g->obs[i]->observer_type () == OUTPUT_OBSERVER)
00095       return r;
00096   attach (g, output_observer (inside (g)));
00097   inside (g) -> ref_count++;  // never destroy printed dynamic objects
00098   return r;
00099 }

syntactic mmx::flatten ( const document d  )  [inline]

Definition at line 68 of file document.hpp.

References as_generic(), as_syntactic(), and gen().

00068                                              {
00069   return as_syntactic (gen ("$text", as_generic (d))); }

syntactic flatten ( const compound c  ) 

Definition at line 27 of file compound.cpp.

References as_generic(), as_syntactic(), as_vector(), flatten(), N(), n, and vector_to_compound().

00027                             {
00028   const vector<generic> v= as_vector (c);
00029   nat i, n= N(v);
00030   vector<generic> w= fill<generic> (n);
00031   for (i=0; i<n; i++)
00032     w[i]= as_generic (flatten (v[i]));
00033   return as_syntactic (vector_to_compound (w));
00034 }

syntactic mmx::flatten ( const chain< C > &  c  )  [inline]

Definition at line 151 of file chain.hpp.

References flatten(), and iterate().

00151                          {
00152   return flatten (syntactic ("chain"), iterate (c));
00153 }

syntactic mmx::flatten ( const cache< C, T > &  c  )  [inline]

Definition at line 55 of file cache.hpp.

References flatten().

00055 { return flatten (*c); }

syntactic mmx::flatten ( const generic_alias< C > &  a  )  [inline]
string flatten_as_cpp ( const generic g  ) 

Definition at line 1295 of file cpp_printer.cpp.

References as_cpp(), as_generic(), and flatten().

Referenced by GLUE_7().

01295                                   {
01296   generic f= as_generic (flatten (g));
01297   return as_cpp (f);
01298 }

string flatten_as_lisp ( const generic g  ) 

Definition at line 48 of file lisp_printer.cpp.

References as_generic(), as_lisp(), and flatten().

00048                                    {
00049   generic f= as_generic (flatten (g));
00050   return as_lisp (f);
00051 }

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().

00028                              {
00029   return as_math (as_generic (flatten (x)));
00030 }

string flatten_as_mmx ( const generic g  ) 

Definition at line 968 of file mmx_printer.cpp.

References as_generic(), as_mmx(), and flatten().

Referenced by GLUE_6(), and std_exception().

00968                                   {
00969   generic f= as_generic (flatten (g));
00970   return as_mmx (f);
00971 }

syntactic mmx::flatten_as_syntactic ( const T &  x  )  [inline]

Definition at line 53 of file mmc_glue.hpp.

References flatten().

00053 { return flatten (x); }

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(), and shell_texmacs_output().

00040                                        {
00041   return as_texmacs_scheme (as_generic (flatten (x)));
00042 }

string flatten_as_tm ( const generic g,
const string style 
)

Definition at line 599 of file mmx_texmacs.cpp.

References as_generic(), as_snippet(), flatten(), gen(), is_func(), parse_lisp(), and scheme_to_tm().

00599                                                       {
00600   string r;
00601   generic g= as_generic (flatten (x));
00602   g= parse_lisp (as_snippet (g), true);
00603   if (is_func (g, "text", 1)) g= g[1];
00604   if (!is_func (g, "document")) g= gen ("document", g);
00605   g= gen ("document", gen ("TeXmacs", string ("1.0.7.8")),
00606           gen ("style", style), gen ("body", g));
00607   scheme_to_tm (r, g, 0);
00608   return r;
00609 }

string flatten_as_tm ( const generic g  ) 

Definition at line 589 of file mmx_texmacs.cpp.

References as_generic(), as_snippet(), flatten(), is_func(), parse_lisp(), and scheme_to_tm().

00589                                  {
00590   string r;
00591   generic g= as_generic (flatten (x));
00592   g= parse_lisp (as_snippet (g), true);
00593   if (is_func (g, "text", 1)) g= g[1];
00594   scheme_to_tm (r, g, 0);
00595   return r;
00596 }

syntactic mmx::flatten_type (  )  [inline]

Definition at line 19 of file function.hpp.

References as_syntactic(), and type_name().

00019                                                       {
00020   return as_syntactic (type_name (type_information<T>::id)); }

void mmx::floating_to_string ( const C &  val,
string obj->lex_string,
const char *  fm 
) [inline]

Definition at line 220 of file string.cpp.

Referenced by numeric_to_string().

00220                                                              {
00221   char buffer[40];
00222   sprintf (buffer, fm, val);
00223   s << string (buffer);
00224 }

generic floor ( const generic x  ) 

Definition at line 749 of file generic.cpp.

References current_ev, and GEN_FLOOR.

00749                                  {
00750   return current_ev->apply (GEN_FLOOR, x); }

double floor ( const double &  x  )  [inline]

Definition at line 129 of file double.hpp.

Referenced by floor_op::op(), round(), and floor_op::set_op().

00129 { return std::floor (x); }

unsigned long long int mmx::floor_sqrt ( const unsigned long long int &  x  )  [inline]

Definition at line 504 of file int.hpp.

00512 { return (m % n) == 0; } \

unsigned long int mmx::floor_sqrt ( const unsigned long int &  x  )  [inline]

Definition at line 503 of file int.hpp.

00512 { return (m % n) == 0; } \

unsigned int mmx::floor_sqrt ( const unsigned int &  x  )  [inline]

Definition at line 502 of file int.hpp.

00512 { return (m % n) == 0; } \

unsigned short int mmx::floor_sqrt ( const unsigned short int &  x  )  [inline]

Definition at line 501 of file int.hpp.

00512 { return (m % n) == 0; } \

unsigned char mmx::floor_sqrt ( const unsigned char &  x  )  [inline]

Definition at line 500 of file int.hpp.

00512 { return (m % n) == 0; } \

long long int mmx::floor_sqrt ( const long long int &  x  )  [inline]

Definition at line 480 of file int.hpp.

00484 {

long int mmx::floor_sqrt ( const long int &  x  )  [inline]

Definition at line 479 of file int.hpp.

00484 {

int mmx::floor_sqrt ( const int &  x  )  [inline]

Definition at line 478 of file int.hpp.

00484 {

short int mmx::floor_sqrt ( const short int &  x  )  [inline]

Definition at line 477 of file int.hpp.

00484 {

signed char mmx::floor_sqrt ( const signed char &  x  )  [inline]

Definition at line 476 of file int.hpp.

Referenced by GLUE_28().

00484 {

void mmx::flush ( const port &  p  )  [inline]

Definition at line 115 of file port.hpp.

References inside().

Referenced by composite_port_rep::flush(), and GLUE_18().

00115                                   {
00116   inside (p)->flush (); }

string follow_link ( const string name,
const bool &  recurse 
)

Definition at line 581 of file system.cpp.

References as_charp(), decode_name(), free_charp(), and n.

00581                                                       {
00582   char buf[1024];
00583   string name_s= decode_name (name);
00584   char* temp= as_charp (name_s);
00585   int n= readlink (temp, buf, 1024);
00586   free_charp (temp);
00587   if (n >= 0 && n < 1024) {
00588     string r (buf, n);
00589     if (recurse) return follow_link (r, true);
00590     else return r;
00591   }
00592   else {
00593     if (recurse) return name;
00594     else return "";
00595   }
00596 }

void mmx::foreach ( const Fun &  fun,
const vector< S1 > &  v1,
const vector< S2 > &  v2,
const vector< S3 > &  v3 
) [inline]

Definition at line 1012 of file vector.hpp.

References ASSERT, is_non_scalar(), and N().

01013                                                                            {
01014   ASSERT (is_non_scalar (v1) && is_non_scalar (v2) && is_non_scalar (v3),
01015           "non-scalar vectors expected");
01016   ASSERT (N(v1) == N(v2) && N(v2) == N(v3), "vectors of unequal lengths");
01017   for (nat i=0; i<N(v1); i++) fun (v1[i], v2[i], v3[i]);
01018 }

void mmx::foreach ( const Fun &  fun,
const vector< S1 > &  v1,
const vector< S2 > &  v2 
) [inline]

Definition at line 1004 of file vector.hpp.

References ASSERT, is_non_scalar(), and N().

01004                                                                      {
01005   ASSERT (is_non_scalar (v1) && is_non_scalar (v2),
01006           "non-scalar vectors expected");
01007   ASSERT (N(v1) == N(v2), "vectors of unequal lengths");
01008   for (nat i=0; i<N(v1); i++) fun (v1[i], v2[i]);
01009 }

void mmx::foreach ( const Fun &  fun,
const vector< S1 > &  v1 
) [inline]

Definition at line 998 of file vector.hpp.

References ASSERT, is_non_scalar(), and N().

00998                                                {
00999   ASSERT (is_non_scalar (v1), "non-scalar vector expected");
01000   for (nat i=0; i<N(v1); i++) fun (v1[i]);
01001 }

port formatting_port ( const port p  ) 

Definition at line 186 of file formatting_port.cpp.

Referenced by read_line().

00186                                 {
00187   return (port_rep*) new formatting_port_rep (p);
00188 }

void mmx::free_charp ( char *  obj->lex_string  ) 

Definition at line 83 of file string.cpp.

References mmx_free().

00083                      {
00084   mmx_free (s, strlen (s) + 1);
00085 }

void mmx::free_charp ( char *  s  ) 
C mmx::fuzz_cst ( const format< C > &  fm  )  [inline]

Definition at line 942 of file type_props.hpp.

References C, promote(), and set_fuzz().

00942                                {
00943   C r= promote (0, fm); set_fuzz (r); return r; }

C mmx::fuzz_cst (  )  [inline]

Definition at line 906 of file type_props.hpp.

References C, and set_fuzz().

00906 { C r; set_fuzz (r); return r; }

syntactic gaussian ( const syntactic g1,
const syntactic g2 
)

Definition at line 455 of file syntactic.cpp.

References Imaginary.

00455                                                               {
00456   return g1 + g2 * Imaginary (syntactic); }

generic gaussian ( const generic x1,
const generic x2 
)

Definition at line 740 of file generic.cpp.

References Imaginary.

Referenced by gaussian_op::op().

00740                                                         {
00741   return x1 + x2 * Imaginary (generic); }

syntactic gcd ( const syntactic g1,
const syntactic g2 
)

Definition at line 402 of file syntactic.cpp.

References exact_eq(), GEN_GCD, and syn().

00402                                                          {
00403   if (exact_eq (g1, 0)) return g2;
00404   if (exact_eq (g2, 0)) return g1;
00405   return syn (GEN_GCD, g1, g2);
00406 }

unsigned long long int mmx::gcd ( const unsigned long long int  a,
const unsigned long long int  b 
) [inline]

Definition at line 706 of file int.hpp.

00714 {

unsigned long int mmx::gcd ( const unsigned long int  a,
const unsigned long int  b 
) [inline]

Definition at line 705 of file int.hpp.

00714 {

unsigned int mmx::gcd ( const unsigned int  a,
const unsigned int  b 
) [inline]

Definition at line 704 of file int.hpp.

00714 {

unsigned short int mmx::gcd ( const unsigned short int  a,
const unsigned short int  b 
) [inline]

Definition at line 703 of file int.hpp.

00714 {

unsigned char mmx::gcd ( const unsigned char  a,
const unsigned char  b 
) [inline]

Definition at line 702 of file int.hpp.

00714 {

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]

Definition at line 695 of file int.hpp.

00699 {                                       \

long long int mmx::gcd ( const long long int  a,
const long long int  b,
long long int &  co_a 
) [inline]

Definition at line 695 of file int.hpp.

00699 {                                       \

long long int mmx::gcd ( const long long int  a,
const long long int  b 
) [inline]

Definition at line 695 of file int.hpp.

00699 {                                       \

long int mmx::gcd ( const long int  a,
const long int  b,
long int &  co_a,
long int &  co_b 
) [inline]

Definition at line 694 of file int.hpp.

00699 {                                       \

long int mmx::gcd ( const long int  a,
const long int  b,
long int &  co_a 
) [inline]

Definition at line 694 of file int.hpp.

00699 {                                       \

long int mmx::gcd ( const long int  a,
const long int  b 
) [inline]

Definition at line 694 of file int.hpp.

00699 {                                       \

int mmx::gcd ( const int  a,
const int  b,
int &  co_a,
int &  co_b 
) [inline]

Definition at line 693 of file int.hpp.

00699 {                                       \

int mmx::gcd ( const int  a,
const int  b,
int &  co_a 
) [inline]

Definition at line 693 of file int.hpp.

00699 {                                       \

int mmx::gcd ( const int  a,
const int  b 
) [inline]

Definition at line 693 of file int.hpp.

00699 {                                       \

short int mmx::gcd ( const short int  a,
const short int  b,
short int &  co_a,
short int &  co_b 
) [inline]

Definition at line 692 of file int.hpp.

00699 {                                       \

short int mmx::gcd ( const short int  a,
const short int  b,
short int &  co_a 
) [inline]

Definition at line 692 of file int.hpp.

00699 {                                       \

short int mmx::gcd ( const short int  a,
const short int  b 
) [inline]

Definition at line 692 of file int.hpp.

00699 {                                       \

signed char mmx::gcd ( const signed char  a,
const signed char  b,
signed char &  co_a,
signed char &  co_b 
) [inline]

Definition at line 691 of file int.hpp.

00699 {                                       \

signed char mmx::gcd ( const signed char  a,
const signed char  b,
signed char &  co_a 
) [inline]

Definition at line 691 of file int.hpp.

00699 {                                       \

signed char mmx::gcd ( const signed char  a,
const signed char  b 
) [inline]

Definition at line 691 of file int.hpp.

00699 {                                       \

generic gcd ( const generic x1,
const generic x2 
)

Definition at line 717 of file generic.cpp.

References current_ev, and GEN_GCD.

Referenced by gcd_op::op(), unsigned_int_reconstruct_helper< U >::reconstruct(), int_reconstruct_helper< I >::reconstruct(), and gcd_op::set_op().

00717                                                    {
00718   return current_ev->apply (GEN_GCD, x1, x2); }

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.

00102                                            {
00103   return as<generic> (compound (vec<generic> (x1, x2, x3, x4, x5, x6)));
00104 }

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.

00095                                                               {
00096   return as<generic> (compound (vec<generic> (x1, x2, x3, x4, x5)));
00097 }

generic gen ( const generic x1,
const generic x2,
const generic x3,
const generic x4 
)

Definition at line 88 of file compound.cpp.

00089                                            {
00090   return as<generic> (compound (vec<generic> (x1, x2, x3, x4)));
00091 }

generic gen ( const generic x1,
const generic x2,
const generic x3 
)

Definition at line 83 of file compound.cpp.

00083                                                               {
00084   return as<generic> (compound (vec<generic> (x1, x2, x3)));
00085 }

generic gen ( const generic x1,
const generic x2 
)

Definition at line 73 of file compound.cpp.

00073                                            {
00074   return as<generic> (compound (vec<generic> (x1, x2)));
00075 }

generic gen ( const generic x1,
const string x2 
)

Definition at line 78 of file compound.cpp.

00078                                           {
00079   return as<generic> (compound (vec<generic> (x1, generic (x2))));
00080 }

generic gen ( const generic x1  ) 

Definition at line 68 of file compound.cpp.

00068                         {
00069   return as<generic> (compound (vec<generic> (x1)));
00070 }

generic gen (  ) 

Definition at line 63 of file compound.cpp.

00063        {
00064   return as<generic> (compound (vec<generic> ()));
00065 }

generic gen ( const generic x1,
const vector< generic > &  v 
)

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< new_table< 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(), routine_rep::function_type(), glue_basix_table_generic(), glue_basix_vector_generic(), glue_list_generic(), glue_routine(), 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(), table_contains(), table_read(), table_reset(), table_set(), table_write(), 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().

00058                                                   {
00059   return as<generic> (compound (cons (x1, v)));
00060 }

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_AUTOFOLD ( "autofold"   ) 
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_COMPLETE ( "complete"   ) 
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_DO ( "do"   ) 
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().

00164                                                           {
00165   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_EVALUATE ( "evaluate"   ) 
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().

00158                                        {
00159   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_INCLUDED ( "included"   ) 
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_INTEGRATE_INIT ( "integrate_init"   ) 
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_LESSEQ ( "<="   ) 
generic mmx::GEN_LESSLESS ( "<<"   ) 
generic mmx::GEN_LIFT ( "lift"   ) 
generic mmx::GEN_LIST ( "list"   ) 
generic mmx::GEN_LITERAL_FLOATING ( "literal_floating"   ) 
generic mmx::GEN_LITERAL_INTEGER ( "literal_integer"   ) 
generic mmx::GEN_LITERAL_STRING ( "literal_string"   ) 
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_MATCH ( "match"   ) 
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().

00166                                                            {
00167   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_OUTLINE ( "outline"   ) 
generic mmx::GEN_OVER ( "/"   ) 
generic mmx::GEN_OVER_I ( "over_i"   ) 
generic mmx::GEN_PARTIAL ( "partial"   ) 
generic mmx::GEN_PATTERN ( "pattern"   ) 
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_PREFER ( "prefer"   ) 
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_RECONSTRUCT ( "reconstruct"   ) 
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_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_TIMES_I ( "times_i"   ) 
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_TRUNCATE ( "truncate"   ) 
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"   ) 
generic mmx::GEN_VARTRANSTYPE ( "::  ,
 
)
generic mmx::GEN_VARTYPE ( "::"   ) 
generic gen_vec ( const generic g1,
const generic g2,
const generic g3 
)

Definition at line 63 of file generic.cpp.

00063                                                                           {
00064   return as<generic> (vec<generic> (g1, g2, g3)); }

generic gen_vec ( const generic g1,
const generic g2 
)

Definition at line 61 of file generic.cpp.

00061                                                        {
00062   return as<generic> (vec<generic> (g1, g2)); }

generic gen_vec ( const generic g1  ) 

Definition at line 59 of file generic.cpp.

00059                                     {
00060   return as<generic> (vec<generic> (g1)); }

generic gen_vec (  ) 
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]

Definition at line 132 of file alias.hpp.

00132                                                                         {
00133   return *a; }

compound mmx::generic_apply ( const generic f,
const vector< generic > &  v 
) [inline]

Definition at line 84 of file mmc_glue.hpp.

References cons().

00084                                                            {
00085   return compound (cons (f, v));
00086 }

vector<generic> mmx::generic_arguments ( const generic g  )  [inline]

Definition at line 94 of file mmc_glue.hpp.

References cdr(), and generic_components().

00094                                      {
00095   return cdr (generic_components (g));
00096 }

T mmx::generic_as_any ( const generic g  )  [inline]

Definition at line 187 of file mmc_glue.hpp.

References verbose_as_helper< T, F >::cv().

00187                                   {
00188   return verbose_as_helper<T,generic>::cv (g);
00189 }

literal mmx::generic_as_literal ( const generic g  )  [inline]

Definition at line 126 of file mmc_glue.hpp.

References ASSERT.

00126                                       {
00127   ASSERT (is<literal> (g), "literal expected");
00128   return as<literal> (g);
00129 }

string mmx::generic_as_string ( const generic g  )  [inline]

Definition at line 119 of file mmc_glue.hpp.

References as_string(), and ASSERT.

00119                                      {
00120   ASSERT (is<string> (g) || is<literal> (g), "string or literal expected");
00121   if (is<string> (g)) return as<string> (g);
00122   else return as_string (as<literal> (g));
00123 }

vector<generic> mmx::generic_as_vector ( const generic g  )  [inline]

Definition at line 132 of file mmc_glue.hpp.

References ASSERT, and is().

00132                                      {
00133   ASSERT (is<vector<generic> > (g), "vector expected");
00134   return as<vector<generic> > (g);
00135 }

generic mmx::generic_assemble ( const generic &  x  )  [inline]

Definition at line 311 of file port.hpp.

Referenced by GLUE_26().

00311                                                    {
00312   return binary_assemble<generic> (x); }

static int mmx::generic_compare ( const generic x,
const generic y 
) [static]

Definition at line 117 of file glue_list_map.cpp.

References current_comparison.

Referenced by list_sort().

00117                                                      {
00118   bool b= as<bool> (current_comparison->apply (x, y));
00119   return b? -1: 1;
00120 }

vector<generic> mmx::generic_components ( const generic g  )  [inline]

Definition at line 89 of file mmc_glue.hpp.

References compound_to_vector().

Referenced by generic_arguments().

00089                                       {
00090   return compound_to_vector (g);
00091 }

generic mmx::generic_disassemble ( const generic &  x  )  [inline]

Definition at line 309 of file port.hpp.

Referenced by GLUE_27().

00309                                                       {
00310   return binary_disassemble<generic> (x); }

bool mmx::generic_is_boolean ( const generic &  g  )  [inline]

Definition at line 226 of file generic.hpp.

00226                                                   {
00227   return is<bool> (g); }

bool mmx::generic_is_compound ( const generic g  )  [inline]

Definition at line 104 of file mmc_glue.hpp.

00104                                        {
00105   return is<compound> (g);
00106 }

bool mmx::generic_is_double ( const generic &  g  )  [inline]

Definition at line 230 of file generic.hpp.

Referenced by GLUE_3().

00230                                                  {
00231   return is<double> (g); }

bool mmx::generic_is_int ( const generic &  g  )  [inline]

Definition at line 228 of file generic.hpp.

Referenced by GLUE_2().

00228                                               {
00229   return is<int> (g); }

bool mmx::generic_is_literal ( const generic g  )  [inline]

Definition at line 99 of file mmc_glue.hpp.

00099                                       {
00100   return is<literal> (g);
00101 }

bool mmx::generic_is_string ( const generic &  g  )  [inline]

Definition at line 232 of file generic.hpp.

00232                                                  {
00233   return is<string> (g); }

bool mmx::generic_is_table_generic ( const generic g  )  [inline]

Definition at line 114 of file mmc_glue.hpp.

00114                                             {
00115   return is<table<generic,generic> > (g);
00116 }

bool mmx::generic_is_vector_generic ( const generic g  )  [inline]

Definition at line 109 of file mmc_glue.hpp.

00109                                              {
00110   return is<vector<generic> > (g);
00111 }

int mmx::generic_size ( const generic g  )  [inline]

Definition at line 138 of file mmc_glue.hpp.

References N().

00138                                 {
00139   return (int) N(g);
00140 }

generic mmx::generic_type ( const generic g  ) 
generic get_alias ( const generic a  ) 

Definition at line 75 of file alias.cpp.

References alias_getter(), and type().

00075                              {
00076   routine r;
00077   alias_getter (type (a), r);
00078   return r->apply (a);
00079 }

C mmx::get_alias ( const alias< C > &  a  )  [inline]
static bool mmx::get_attributes ( const string name,
struct stat *  buf 
) [static]

Definition at line 487 of file system.cpp.

References as_charp(), decode_name(), and free_charp().

Referenced by file_last_modified(), and file_test().

00487                                                       {
00488   string name_s= decode_name (name);
00489   bool flag;
00490   char* temp= as_charp (name_s);
00491   flag= stat (temp, buf);
00492   free_charp (temp);
00493   return flag;
00494 }

storage mmx::get_branch ( const storage st,
const string br 
) [inline]

Unlock variable var on storage st.

Definition at line 79 of file storage.hpp.

Referenced by GLUE_8().

00079                                                                 {
00080   return st->get_branch (br); }

C mmx::get_co ( const sparse_vector< C, symbol< M >, hard_eq_sparse_vector > &  v,
nat  i 
) [inline]

Definition at line 358 of file sparse_vector.hpp.

00358                                                                           {
00359   return v[i].x2;
00360 }

string get_directory ( const string name  ) 

Definition at line 434 of file system.cpp.

References N().

Referenced by ancestor_search_name(), canonical_name(), command_dir(), prefix_dir(), recursive_search_name(), and resolve_name().

00434                                    {
00435   for (int i= N(name)-1; i>=1; i--)
00436     if (name[i]=='/')
00437       return name (0, i);
00438   if (N(name) > 0 && name[0] == '/') return "/";
00439   return ".";
00440 }

string get_env ( const string var  ) 

Definition at line 71 of file system.cpp.

References as_charp(), free_charp(), and var_pwd().

Referenced by decode_name(), global_path(), load_path(), path_name(), prefix_dir(), supports_color(), sysconf_dir(), user_dir(), var_load(), and var_pwd().

00071                             {
00072 #if defined(__MINGW__) || defined(__MINGW32__)
00073   if (var == "PWD") return var_pwd ();
00074 #endif
00075   char* _var= as_charp (var);
00076   char* _ret= getenv (_var);
00077   free_charp (_var);
00078   if (_ret == NULL) return "";
00079   string ret (_ret);
00080   return ret;
00081   // do not delete _ret !
00082 }

string get_extension ( const string name  ) 

Definition at line 462 of file system.cpp.

References N().

00462                                    {
00463   for (int i= N(name)-1; i>=0; i--)
00464     if (name[i]=='.')
00465       return name (i+1, N(name));
00466     else if (name[i]=='/')
00467       return "";
00468   return "";
00469 }

string mmx::get_file ( const storage st,
const string orig 
) [inline]

Check whether the storage st admits a branch br.

Definition at line 85 of file storage.hpp.

Referenced by GLUE_10().

00085                                                                {
00086   return st->get_file (orig); }

static string mmx::get_file_source ( const string file_name,
nat(obj->lex_line)   
) [static]

Definition at line 76 of file source_track.cpp.

References ASSERT, file_sources, N(), and read().

00076                                                     {
00077   if (!file_sources->contains (file_name)) return "";
00078   ASSERT (line < N (read (file_sources, file_name)), "source out of range");
00079   return read (file_sources, file_name) [line];
00080 }

string get_file_source ( const string file_name  ) 

Definition at line 71 of file source_track.cpp.

References file_sources, and recompose().

Referenced by get_source().

00071                                           {
00072   return recompose (file_sources [file_name], "\n");
00073 }

format<C> mmx::get_format ( const C &  x  )  [inline]

Definition at line 241 of file type_props.hpp.

00241                         {
00242   return typename format<C>::FT (x);
00243 }

format< iterator<C> > mmx::get_format ( const iterator< C > &  it  )  [inline]
format<typename coefficient1_type_helper< C >::val > mmx::get_format1 ( const format< C > &  fm  )  [inline]

Definition at line 251 of file type_props.hpp.

References empty_format::format1().

00251                                   {
00252   return format<Coefficient1_type(C) > (fm.format1 ());
00253 }

format<typename coefficient2_type_helper< C >::val > mmx::get_format2 ( const format< C > &  fm  )  [inline]

Definition at line 256 of file type_props.hpp.

References empty_format::format2().

Referenced by make_cache_3(), make_mmx_new_table(), and make_mmx_table().

00256                                   {
00257   return format<Coefficient2_type(C) > (fm.format2 ());
00258 }

C mmx::get_genalias ( const generic_alias< C > &  a  )  [inline]

Definition at line 134 of file alias.hpp.

Referenced by WRAP_WRAPPED_IMPL().

00134                                                     {
00135   return as<C> ((*a)->get ()); }

nat get_indentation ( const string obj->lex_string  ) 

Definition at line 630 of file string.cpp.

References min(), N(), and tokenize().

Referenced by source_string_unindented().

00630                                   {
00631   if (N(s) == 0) return 0;
00632   vector<string> v= tokenize (s, "\n");
00633   nat r= ((nat) -1);
00634   for (nat y=0; y<N(v); y++)
00635     for (nat x=0; x<N(v[y]); x++)
00636       if (v[y][x] != ' ') {
00637         r= min (r, x);
00638         break;
00639       }
00640   return r;
00641 }

nat get_interactive_number ( void   ) 

Definition at line 40 of file source_track.cpp.

References interactive_sources, and N().

Referenced by shell_save_session(), shell_terminal_input(), and store_interactive_source().

00040                               {
00041   return N(interactive_sources) ;
00042 }

static string mmx::get_interactive_source ( nat  i,
nat  l 
) [static]

Definition at line 59 of file source_track.cpp.

References ASSERT, interactive_sources, and N().

00059                                       {
00060   ASSERT (i < N (interactive_sources), "source out of range");
00061   ASSERT (l < N (interactive_sources[i]), "source out of range");
00062   return interactive_sources[i][l];
00063 }

string get_interactive_source ( nat  i  ) 

Definition at line 53 of file source_track.cpp.

References ASSERT, interactive_sources, N(), and recompose().

Referenced by get_source(), and shell_save_session().

00053                                {
00054   ASSERT (i < N (interactive_sources), "source out of range");
00055   return recompose (interactive_sources[i], '\n');
00056 }

T mmx::get_key ( const pair< T, C > &  p  )  [inline]

Definition at line 819 of file table.hpp.

References pair< C1, C2 >::x1.

Referenced by GLUE_2().

00819 { return p.x1; }

static void mmx::get_lock ( FILE *  f,
int  kind 
) [static]

Definition at line 33 of file file_port.cpp.

Referenced by file_port_rep::file_port_rep().

00033                              {
00034 #if !(defined(__MINGW__) || defined(__MINGW32__))
00035   struct flock fl;
00036   int fd= fileno (f);
00037   fl.l_type   = kind == 2? F_RDLCK: F_WRLCK;
00038   fl.l_whence = SEEK_SET;
00039   fl.l_start  = 0;
00040   fl.l_len    = 0;
00041   fl.l_pid    = getpid ();
00042   fcntl (fd, F_SETLKW, &fl);
00043   //mmout << "Locked " << fd << lf;
00044 #endif
00045 }

M mmx::get_mo ( const sparse_vector< C, symbol< M >, hard_eq_sparse_vector > &  v,
nat  i 
) [inline]

Definition at line 363 of file sparse_vector.hpp.

00363                                                                           {
00364   return *v[i].x1;
00365 }

int get_number_cores (  ) 

Definition at line 234 of file threads.cpp.

00234                     {
00235 #ifdef __linux__ // also to be used for Solaris, AIX, ...
00236   int nr1= sysconf (_SC_NPROCESSORS_ONLN);
00237   if (nr1 >= 1) return nr1;
00238 #endif
00239 
00240 #ifdef __APPLE__ // also to be used for BSD system
00241   int mib[2] = { CTL_HW, HW_AVAILCPU };
00242   //int mib[2] = { CTL_HW, HW_NCPU };
00243   int nr2;
00244   size_t len;
00245   len = sizeof (nr2);
00246   sysctl (mib, 2, &nr2, &len, NULL, 0);
00247   if (nr2 >= 1) return nr2;
00248 #endif
00249 
00250 #ifdef __WINDOW__upcoming
00251   SYSTEM_INFO sysinfo;
00252   GetSystemInfo( &sysinfo );
00253   int nr3= sysinfo.dwNumberOfProcessors;
00254   if (nr3 >= 1) return nr3;
00255 #endif
00256 
00257 #ifdef __HPUX__upcoming
00258   int nr4= mpctl (MPC_GETNUMSPUS, NULL, NULL);
00259   if (nr4 >= 1) return nr4;
00260 #endif
00261 
00262 #ifdef __IRIX__upcoming
00263   int nr5= sysconf (_SC_NPROC_ONLN);
00264   if (nr5 >= 1) return nr5;
00265 #endif
00266 
00267   return 1;
00268 }

string get_pid (  ) 

Definition at line 105 of file system.cpp.

References as_string().

00105            {
00106   return as_string (getpid ());
00107 }

C mmx::get_sample ( const format< C > &  fm  )  [inline]

Definition at line 246 of file type_props.hpp.

References format< C >::sample().

00246                                  {
00247   return fm.sample ();
00248 }

iterator<C> mmx::get_sample ( const format< iterator< C > > &  fm  )  [inline]
string mmx::get_source ( const string file_name,
nat  i,
nat(obj->lex_line)   
)

Definition at line 89 of file source_track.cpp.

References get_file_source(), and get_interactive_source().

00089                                                       {
00090   if (file_name == "") return get_interactive_source (i, line);
00091   return get_file_source (file_name, line);
00092 }

string mmx::get_source ( const string file_name,
nat  i 
)

Definition at line 83 of file source_track.cpp.

References get_file_source(), and get_interactive_source().

00083                                             {
00084   if (file_name == "") return get_interactive_source (i);
00085   return get_file_source (file_name);
00086 }

string mmx::get_source ( const string &  file_name,
nat  input_number,
nat  line 
)
C get_top ( const heap< C > &  h  )  [inline]

Definition at line 187 of file heap.hpp.

Referenced by heap_iterator_rep< C >::current().

00187                                       {
00188   return h.rep->Get_top (); }

nat get_user_type ( const generic name  ) 

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().

Referenced by as_generic(), and as_object().

00182                                     {
00183   nat r= type_id (name);
00184   if (r == 1) {
00185     generic tp= name;
00186     if (is_func (tp, GEN_TUPLE_TYPE, 1)) tp= tp[1];
00187     if (is_func (tp, GEN_ALIAS_TYPE, 1)) tp= tp[1];
00188     if (is_func (tp, GEN_GENERIC_ALIAS_TYPE, 1)) tp= tp[1];
00189     define_user_type (tp);
00190     r= type_id (name);
00191   }
00192   return r;
00193 }

C mmx::get_value ( const pair< T, C > &  p  )  [inline]

Definition at line 822 of file table.hpp.

References pair< C1, C2 >::x2.

Referenced by GLUE_3().

00822 { return p.x2; }

alias<C> mmx::global_alias ( C &  c  )  [inline]

Definition at line 87 of file alias.hpp.

00087                     {
00088   return new global_alias_rep<C> (c);
00089 }

string global_path (  ) 

Definition at line 201 of file system.cpp.

References _from_dos_to_unix(), command_dir(), get_env(), and path_sep.

00201                {
00202   string p = _from_dos_to_unix (get_env ("PATH"));
00203   return command_dir () * string (path_sep) * p;
00204 }

nat mmx::global_type_id (  )  [inline]

Definition at line 177 of file generic.hpp.

References new_type_id(), and T.

00177 { return new_type_id (typeid (T ()).name()); }  

static storage mmx::GLUE_1 (  )  [static]

Definition at line 13 of file glue_storage.cpp.

References disk_storage().

00013             {
00014     return disk_storage ();
00015   }

static vector<routine> mmx::GLUE_1 ( const tuple< routine > &  arg_1  )  [static]

Definition at line 13 of file glue_routine.cpp.

References as_vector().

00013                                        {
00014     return vector<routine > (as_vector (arg_1));
00015   }

static port mmx::GLUE_1 ( const string arg_1  )  [static]

Definition at line 12 of file glue_port.cpp.

References input_string_port().

00012                                {
00013     return input_string_port (arg_1);
00014   }

static double mmx::GLUE_1 ( const literal arg_1  )  [static]

Definition at line 10 of file glue_int.cpp.

References int_literal.

00010                                 {
00011     return int_literal (arg_1);
00012   }

static bool mmx::GLUE_1 ( const generic arg_1  )  [static]

Definition at line 24 of file glue_syntactic.cpp.

References as_syntactic().

00024                                 {
00025     return as_syntactic (arg_1);
00026   }

static pair<generic, generic> mmx::GLUE_1 ( const generic arg_1,
const generic arg_2 
) [static]
static syntactic mmx::GLUE_10 ( const syntactic arg_1  )  [static]

Definition at line 69 of file glue_syntactic.cpp.

References square().

00069                                    {
00070     return square (arg_1);
00071   }

static bool mmx::GLUE_10 ( const string arg_1,
const string arg_2 
) [static]

Definition at line 57 of file glue_string.cpp.

00057                                                      {
00058     return arg_1 >= arg_2;
00059   }

static string mmx::GLUE_10 ( const storage arg_1,
const string arg_2 
) [static]

Definition at line 58 of file glue_storage.cpp.

References get_file().

00058                                                       {
00059     return get_file (arg_1, arg_2);
00060   }

static alias<vector<routine> > mmx::GLUE_10 ( const alias< vector< routine > > &  arg_1,
const vector< routine > &  arg_2 
) [static]

Definition at line 58 of file glue_routine.cpp.

References alias_write().

00058                                                                                {
00059     return alias_write (arg_1, arg_2);
00060   }

static bool mmx::GLUE_10 ( const port arg_1  )  [static]

Definition at line 57 of file glue_port.cpp.

References is_input_port().

00057                               {
00058     return is_input_port (arg_1);
00059   }

static list<generic> mmx::GLUE_10 ( const generic arg_1,
const list< generic > &  arg_2 
) [static]

Definition at line 57 of file glue_list_generic.cpp.

References cons().

00057                                                              {
00058     return cons (arg_1, arg_2);
00059   }

static int mmx::GLUE_10 ( const int &  arg_1,
const int &  arg_2 
) [static]

Definition at line 55 of file glue_int.cpp.

00055                                                {
00056     return arg_1 / arg_2;
00057   }

static double mmx::GLUE_10 ( const double &  arg_1,
const double &  arg_2 
) [static]

Definition at line 55 of file glue_double.cpp.

00055                                                      {
00056     return arg_1 - arg_2;
00057   }

static document mmx::GLUE_10 ( const document arg_1  )  [static]

Definition at line 70 of file glue_document.cpp.

References make_math().

00070                                   {
00071     return make_math (arg_1);
00072   }

static vector<generic> mmx::GLUE_10 ( const vector< generic > &  arg_1,
const vector< generic > &  arg_2 
) [static]

Definition at line 57 of file glue_basix_vector_generic.cpp.

References append().

00057                                                                        {
00058     return append (arg_1, arg_2);
00059   }

static bool mmx::GLUE_10 ( const table< generic, generic > &  arg_1,
const generic arg_2 
) [static]
static syntactic mmx::GLUE_11 ( const syntactic arg_1,
const syntactic arg_2 
) [static]

Definition at line 74 of file glue_syntactic.cpp.

00074                                                            {
00075     return arg_1 + arg_2;
00076   }

static bool mmx::GLUE_11 ( const string arg_1,
const string arg_2 
) [static]

Definition at line 62 of file glue_string.cpp.

References starts().

00062                                                      {
00063     return starts (arg_1, arg_2);
00064   }

static bool mmx::GLUE_11 ( const storage arg_1,
const string arg_2 
) [static]

Definition at line 63 of file glue_storage.cpp.

References has_file().

00063                                                       {
00064     return has_file (arg_1, arg_2);
00065   }

static vector<routine> mmx::GLUE_11 ( const routine arg_1,
const vector< routine > &  arg_2 
) [static]

Definition at line 63 of file glue_routine.cpp.

References cons().

00063                                                                {
00064     return cons (arg_1, arg_2);
00065   }

static bool mmx::GLUE_11 ( const port arg_1  )  [static]

Definition at line 62 of file glue_port.cpp.

References error_flag().

00062                               {
00063     return error_flag (arg_1);
00064   }

static generic mmx::GLUE_11 ( const list< generic > &  arg_1  )  [static]

Definition at line 62 of file glue_list_generic.cpp.

References car().

00062                                        {
00063     return car (arg_1);
00064   }

static int mmx::GLUE_11 ( const int &  arg_1,
const int &  arg_2 
) [static]

Definition at line 60 of file glue_int.cpp.

References quo().

00060                                                {
00061     return quo (arg_1, arg_2);
00062   }

static double mmx::GLUE_11 ( const double &  arg_1,
const double &  arg_2 
) [static]

Definition at line 60 of file glue_double.cpp.

00060                                                      {
00061     return arg_1 * arg_2;
00062   }

static document mmx::GLUE_11 ( const tuple< document > &  arg_1  )  [static]

Definition at line 75 of file glue_document.cpp.

References as_vector(), and make_inline().

00075                                          {
00076     return make_inline (as_vector (arg_1));
00077   }

static alias<vector<generic> > mmx::GLUE_11 ( const alias< vector< generic > > &  arg_1,
const vector< generic > &  arg_2 
) [static]

Definition at line 62 of file glue_basix_vector_generic.cpp.

References alias_write().

00062                                                                                {
00063     return alias_write (arg_1, arg_2);
00064   }

static generic mmx::GLUE_11 ( const table< generic, generic > &  arg_1,
const generic arg_2 
) [static]
static syntactic mmx::GLUE_12 ( const syntactic arg_1,
const syntactic arg_2 
) [static]

Definition at line 79 of file glue_syntactic.cpp.

00079                                                            {
00080     return arg_1 - arg_2;
00081   }

static bool mmx::GLUE_12 ( const string arg_1,
const string arg_2 
) [static]

Definition at line 67 of file glue_string.cpp.

References ends().

00067                                                      {
00068     return ends (arg_1, arg_2);
00069   }

static vector<generic> mmx::GLUE_12 ( const storage arg_1  )  [static]

Definition at line 68 of file glue_storage.cpp.

References retrieve_data_bis().

00068                                  {
00069     return retrieve_data_bis (arg_1);
00070   }

static routine mmx::GLUE_12 ( const vector< routine > &  arg_1  )  [static]

Definition at line 68 of file glue_routine.cpp.

References car().

00068                                          {
00069     return car (arg_1);
00070   }

static string mmx::GLUE_12 ( const port arg_1  )  [static]

Definition at line 67 of file glue_port.cpp.

References error_message().

00067                               {
00068     return error_message (arg_1);
00069   }

static list<generic> mmx::GLUE_12 ( const list< generic > &  arg_1  )  [static]

Definition at line 67 of file glue_list_generic.cpp.

References cdr().

00067                                        {
00068     return cdr (arg_1);
00069   }

static int mmx::GLUE_12 ( const int &  arg_1,
const int &  arg_2 
) [static]

Definition at line 65 of file glue_int.cpp.

References rem().

00065                                                {
00066     return rem (arg_1, arg_2);
00067   }

static double mmx::GLUE_12 ( const double &  arg_1,
const double &  arg_2 
) [static]

Definition at line 65 of file glue_double.cpp.

00065                                                      {
00066     return arg_1 / arg_2;
00067   }

static document mmx::GLUE_12 ( const tuple< document > &  arg_1  )  [static]

Definition at line 80 of file glue_document.cpp.

References as_vector(), and make_block().

00080                                          {
00081     return make_block (as_vector (arg_1));
00082   }

static vector<generic> mmx::GLUE_12 ( const generic arg_1,
const vector< generic > &  arg_2 
) [static]

Definition at line 67 of file glue_basix_vector_generic.cpp.

References cons().

00067                                                                {
00068     return cons (arg_1, arg_2);
00069   }

static alias<generic> mmx::GLUE_12 ( const alias< table< generic, generic > > &  arg_1,
const generic arg_2 
) [static]

Definition at line 67 of file glue_basix_table_generic.cpp.

Referenced by glue_basix_table_generic(), glue_basix_vector_generic(), glue_document(), glue_double(), glue_int(), glue_list_generic(), glue_port(), glue_routine(), glue_storage(), glue_string(), and glue_syntactic().

00067                                                                                    {
00068     return alias_access<generic > (arg_1, arg_2);
00069   }

static syntactic mmx::GLUE_13 ( const syntactic arg_1,
const syntactic arg_2 
) [static]

Definition at line 84 of file glue_syntactic.cpp.

00084                                                            {
00085     return arg_1 * arg_2;
00086   }

static string mmx::GLUE_13 ( const string arg_1,
const string arg_2,
const string arg_3 
) [static]

Definition at line 72 of file glue_string.cpp.

References replace().

00072                                                                           {
00073     return replace (arg_1, arg_2, arg_3);
00074   }

static vector<generic> mmx::GLUE_13 ( const storage arg_1  )  [static]

Definition at line 73 of file glue_storage.cpp.

References retrieve_branches_bis().

00073                                  {
00074     return retrieve_branches_bis (arg_1);
00075   }

static vector<routine> mmx::GLUE_13 ( const vector< routine > &  arg_1  )  [static]

Definition at line 73 of file glue_routine.cpp.

References cdr().

00073                                          {
00074     return cdr (arg_1);
00075   }

static bool mmx::GLUE_13 ( const port arg_1  )  [static]

Definition at line 72 of file glue_port.cpp.

References busy().

00072                               {
00073     return busy (arg_1);
00074   }

static bool mmx::GLUE_13 ( const list< generic > &  arg_1  )  [static]

Definition at line 72 of file glue_list_generic.cpp.

References is_nil().

00072                                        {
00073     return is_nil (arg_1);
00074   }

static bool mmx::GLUE_13 ( const int &  arg_1,
const int &  arg_2 
) [static]

Definition at line 70 of file glue_int.cpp.

00070                                                {
00071     return arg_1 == arg_2;
00072   }

static double mmx::GLUE_13 ( const double &  arg_1  )  [static]

Definition at line 70 of file glue_double.cpp.

References mmx_sqrt.

00070                                 {
00071     return mmx_sqrt (arg_1);
00072   }

static document mmx::GLUE_13 ( const tuple< document > &  arg_1  )  [static]

Definition at line 85 of file glue_document.cpp.

References as_vector(), and make_row().

00085                                          {
00086     return make_row (as_vector (arg_1));
00087   }

static generic mmx::GLUE_13 ( const vector< generic > &  arg_1  )  [static]

Definition at line 72 of file glue_basix_vector_generic.cpp.

References car().

00072                                          {
00073     return car (arg_1);
00074   }

static void mmx::GLUE_13 ( const alias< table< generic, generic > > &  arg_1,
const generic arg_2 
) [static]
static syntactic mmx::GLUE_14 ( const syntactic arg_1,
const syntactic arg_2 
) [static]

Definition at line 89 of file glue_syntactic.cpp.

00089                                                            {
00090     return arg_1 / arg_2;
00091   }

static int mmx::GLUE_14 ( const string arg_1,
const string arg_2,
const int &  arg_3 
) [static]

Definition at line 77 of file glue_string.cpp.

References search_forwards().

00077                                                                        {
00078     return search_forwards (arg_1, arg_2, arg_3);
00079   }

static vector<generic> mmx::GLUE_14 ( const storage arg_1  )  [static]

Definition at line 78 of file glue_storage.cpp.

References retrieve_files_bis().

00078                                  {
00079     return retrieve_files_bis (arg_1);
00080   }

static bool mmx::GLUE_14 ( const vector< routine > &  arg_1  )  [static]

Definition at line 78 of file glue_routine.cpp.

References is_nil().

00078                                          {
00079     return is_nil (arg_1);
00080   }

static int mmx::GLUE_14 ( const port arg_1  )  [static]

Definition at line 77 of file glue_port.cpp.

References can_write().

00077                               {
00078     return can_write (arg_1);
00079   }

static bool mmx::GLUE_14 ( const list< generic > &  arg_1  )  [static]

Definition at line 77 of file glue_list_generic.cpp.

References is_atom().

00077                                        {
00078     return is_atom (arg_1);
00079   }

static bool mmx::GLUE_14 ( const int &  arg_1,
const int &  arg_2 
) [static]

Definition at line 75 of file glue_int.cpp.

00075                                                {
00076     return arg_1 != arg_2;
00077   }

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.

00075                                                      {
00076     return mmx_pow (arg_1, arg_2);
00077   }

static vector<generic> mmx::GLUE_14 ( const vector< generic > &  arg_1  )  [static]

Definition at line 77 of file glue_basix_vector_generic.cpp.

References cdr().

00077                                          {
00078     return cdr (arg_1);
00079   }

static void mmx::GLUE_14 ( const table< generic, generic > &  arg_1,
const generic arg_2,
const generic arg_3 
) [static]
static syntactic mmx::GLUE_15 ( const syntactic arg_1,
const syntactic arg_2 
) [static]

Definition at line 94 of file glue_syntactic.cpp.

References pow().

00094                                                            {
00095     return pow (arg_1, arg_2);
00096   }

static int mmx::GLUE_15 ( const string arg_1,
const string arg_2,
const int &  arg_3 
) [static]

Definition at line 82 of file glue_string.cpp.

References search_backwards().

00082                                                                        {
00083     return search_backwards (arg_1, arg_2, arg_3);
00084   }

static bool mmx::GLUE_15 ( const vector< routine > &  arg_1  )  [static]

Definition at line 83 of file glue_routine.cpp.

References is_atom().

00083                                          {
00084     return is_atom (arg_1);
00085   }

static int mmx::GLUE_15 ( const port arg_1  )  [static]

Definition at line 82 of file glue_port.cpp.

References can_read().

00082                               {
00083     return can_read (arg_1);
00084   }

static list<generic> mmx::GLUE_15 ( const list< generic > &  arg_1,
const generic arg_2 
) [static]

Definition at line 82 of file glue_list_generic.cpp.

References insert().

00082                                                              {
00083     return insert (arg_1, arg_2);
00084   }

static bool mmx::GLUE_15 ( const int &  arg_1,
const int &  arg_2 
) [static]

Definition at line 80 of file glue_int.cpp.

00080                                                {
00081     return arg_1 < arg_2;
00082   }

static double mmx::GLUE_15 ( const double &  arg_1  )  [static]

Definition at line 80 of file glue_double.cpp.

References mmx_exp.

00080                                 {
00081     return mmx_exp (arg_1);
00082   }

static bool mmx::GLUE_15 ( const vector< generic > &  arg_1  )  [static]

Definition at line 82 of file glue_basix_vector_generic.cpp.

References is_nil().

00082                                          {
00083     return is_nil (arg_1);
00084   }

static table< generic , generic > mmx::GLUE_15 ( const table< generic, generic > &  arg_1  )  [static]
static bool mmx::GLUE_16 ( const bool &  arg_1  )  [static]

Definition at line 99 of file glue_syntactic.cpp.

References set_frac_flag().

00099                               {
00100     return set_frac_flag (arg_1);
00101   }

static string mmx::GLUE_16 ( const string arg_1  )  [static]

Definition at line 87 of file glue_string.cpp.

References upcase().

00087                                 {
00088     return upcase (arg_1);
00089   }

static vector<routine> mmx::GLUE_16 ( const vector< routine > &  arg_1,
const routine arg_2 
) [static]

Definition at line 88 of file glue_routine.cpp.

References insert().

00088                                                                {
00089     return insert (arg_1, arg_2);
00090   }

static void mmx::GLUE_16 ( const port arg_1,
const string arg_2 
) [static]

Definition at line 87 of file glue_port.cpp.

References write().

00087                                                    {
00088     write (arg_1, arg_2);
00089   }

static int mmx::GLUE_16 ( const list< generic > &  arg_1,
const generic arg_2 
) [static]

Definition at line 87 of file glue_list_generic.cpp.

References find().

00087                                                              {
00088     return find (arg_1, arg_2);
00089   }

static bool mmx::GLUE_16 ( const int &  arg_1,
const int &  arg_2 
) [static]

Definition at line 85 of file glue_int.cpp.

00085                                                {
00086     return arg_1 <= arg_2;
00087   }

static double mmx::GLUE_16 ( const double &  arg_1  )  [static]

Definition at line 85 of file glue_double.cpp.

References mmx_log.

00085                                 {
00086     return mmx_log (arg_1);
00087   }

static bool mmx::GLUE_16 ( const vector< generic > &  arg_1  )  [static]

Definition at line 87 of file glue_basix_vector_generic.cpp.

References is_atom().

00087                                          {
00088     return is_atom (arg_1);
00089   }

static table< generic , generic > mmx::GLUE_16 ( const table< generic, generic > &  arg_1,
const table< generic, generic > &  arg_2 
) [static]
static syntactic mmx::GLUE_17 ( const tuple< syntactic > &  arg_1  )  [static]

Definition at line 104 of file glue_syntactic.cpp.

References as_vector(), and ordered_sum().

00104                                           {
00105     return ordered_sum (as_vector (arg_1));
00106   }

static string mmx::GLUE_17 ( const string arg_1  )  [static]

Definition at line 92 of file glue_string.cpp.

References locase().

00092                                 {
00093     return locase (arg_1);
00094   }

static int mmx::GLUE_17 ( const vector< routine > &  arg_1,
const routine arg_2 
) [static]

Definition at line 93 of file glue_routine.cpp.

References find().

00093                                                                {
00094     return find (arg_1, arg_2);
00095   }

static string mmx::GLUE_17 ( const port arg_1,
const int &  arg_2 
) [static]

Definition at line 92 of file glue_port.cpp.

References read().

00092                                                 {
00093     return read (arg_1, arg_2);
00094   }

static bool mmx::GLUE_17 ( const list< generic > &  arg_1,
const generic arg_2 
) [static]

Definition at line 92 of file glue_list_generic.cpp.

References contains().

00092                                                              {
00093     return contains (arg_1, arg_2);
00094   }

static bool mmx::GLUE_17 ( const int &  arg_1,
const int &  arg_2 
) [static]

Definition at line 90 of file glue_int.cpp.

00090                                                {
00091     return arg_1 > arg_2;
00092   }

static double mmx::GLUE_17 ( const double &  arg_1  )  [static]

Definition at line 90 of file glue_double.cpp.

References mmx_cos.

00090                                 {
00091     return mmx_cos (arg_1);
00092   }

static vector<generic> mmx::GLUE_17 ( const vector< generic > &  arg_1,
const generic arg_2 
) [static]

Definition at line 92 of file glue_basix_vector_generic.cpp.

References insert().

00092                                                                {
00093     return insert (arg_1, arg_2);
00094   }

static alias<table< generic , generic > > mmx::GLUE_17 ( const alias< table< generic, generic > > &  arg_1,
const table< generic, generic > &  arg_2 
) [static]
static syntactic mmx::GLUE_18 ( const tuple< syntactic > &  arg_1  )  [static]

Definition at line 109 of file glue_syntactic.cpp.

References as_vector(), and ordered_product().

00109                                           {
00110     return ordered_product (as_vector (arg_1));
00111   }

static string mmx::GLUE_18 ( const string arg_1  )  [static]

Definition at line 97 of file glue_string.cpp.

References upcase_first().

00097                                 {
00098     return upcase_first (arg_1);
00099   }

static bool mmx::GLUE_18 ( const vector< routine > &  arg_1,
const routine arg_2 
) [static]

Definition at line 98 of file glue_routine.cpp.

References contains().

00098                                                                {
00099     return contains (arg_1, arg_2);
00100   }

static void mmx::GLUE_18 ( const port arg_1  )  [static]

Definition at line 97 of file glue_port.cpp.

References flush().

00097                               {
00098     flush (arg_1);
00099   }

static bool mmx::GLUE_18 ( const int &  arg_1,
const int &  arg_2 
) [static]

Definition at line 95 of file glue_int.cpp.

00095                                                {
00096     return arg_1 >= arg_2;
00097   }

static double mmx::GLUE_18 ( const double &  arg_1  )  [static]

Definition at line 95 of file glue_double.cpp.

References mmx_sin.

00095                                 {
00096     return mmx_sin (arg_1);
00097   }

static int mmx::GLUE_18 ( const vector< generic > &  arg_1,
const generic arg_2 
) [static]

Definition at line 97 of file glue_basix_vector_generic.cpp.

References find().

00097                                                                {
00098     return find (arg_1, arg_2);
00099   }

static bool mmx::GLUE_18 ( const table< generic, generic > &  arg_1,
const generic arg_2,
const generic arg_3,
const tuple< generic > &  arg_4 
) [static]

Definition at line 97 of file glue_basix_table_generic.cpp.

References as_vector(), and ttable_contains().

Referenced by glue_basix_table_generic(), glue_basix_vector_generic(), glue_double(), glue_int(), glue_port(), glue_routine(), glue_string(), and glue_syntactic().

00097                                                                                                                               {
00098     return ttable_contains (arg_1, arg_2, arg_3, as_vector (arg_4));
00099   }

static bool mmx::GLUE_19 ( const syntactic arg_1,
const syntactic arg_2 
) [static]

Definition at line 114 of file glue_syntactic.cpp.

00114                                                            {
00115     return arg_1 < arg_2;
00116   }

static string mmx::GLUE_19 ( const string arg_1  )  [static]

Definition at line 102 of file glue_string.cpp.

References locase_first().

00102                                 {
00103     return locase_first (arg_1);
00104   }

static vector<generic> mmx::GLUE_19 ( const vector< routine > &  arg_1  )  [static]

Definition at line 103 of file glue_routine.cpp.

00103                                          {
00104     return as<vector<generic> > (arg_1);
00105   }

static bool mmx::GLUE_19 ( const port arg_1,
const int &  arg_2 
) [static]

Definition at line 102 of file glue_port.cpp.

References mmx_wait.

00102                                                 {
00103     return mmx_wait (arg_1, arg_2);
00104   }

static int mmx::GLUE_19 ( const int &  arg_1  )  [static]

Definition at line 100 of file glue_int.cpp.

References sign().

00100                              {
00101     return sign (arg_1);
00102   }

static double mmx::GLUE_19 ( const double &  arg_1  )  [static]

Definition at line 100 of file glue_double.cpp.

References mmx_tan.

00100                                 {
00101     return mmx_tan (arg_1);
00102   }

static bool mmx::GLUE_19 ( const vector< generic > &  arg_1,
const generic arg_2 
) [static]

Definition at line 102 of file glue_basix_vector_generic.cpp.

References contains().

00102                                                                {
00103     return contains (arg_1, arg_2);
00104   }

static generic mmx::GLUE_19 ( const table< generic, generic > &  arg_1,
const generic arg_2,
const generic arg_3,
const tuple< generic > &  arg_4 
) [static]

Definition at line 102 of file glue_basix_table_generic.cpp.

References as_vector(), and ttable_access().

Referenced by glue_basix_table_generic(), glue_basix_vector_generic(), glue_double(), glue_int(), glue_port(), glue_routine(), glue_string(), and glue_syntactic().

00102                                                                                                                               {
00103     return ttable_access (arg_1, arg_2, arg_3, as_vector (arg_4));
00104   }

static vector<routine> mmx::GLUE_2 ( const tuple< routine > &  arg_1  )  [static]

Definition at line 18 of file glue_routine.cpp.

References as_vector().

00018                                        {
00019     return vector<routine > (as_vector (arg_1));
00020   }

static generic mmx::GLUE_2 ( const literal arg_1,
const tuple< generic > &  arg_2 
) [static]

Definition at line 21 of file glue_literal.cpp.

References as_vector(), and gen_literal_apply.

00021                                                              {
00022     return gen_literal_apply (arg_1, as_vector (arg_2));
00023   }

static int mmx::GLUE_2 ( const string arg_1  )  [static]

Definition at line 17 of file glue_string.cpp.

References N().

00017                                {
00018     return N (arg_1);
00019   }

static bool mmx::GLUE_2 ( const generic arg_1  )  [static]

Definition at line 27 of file glue_expression.cpp.

References generic_is_int().

00027                                 {
00028     return generic_is_int (arg_1);
00029   }

static generic mmx::GLUE_2 ( const dynamic arg_1  )  [static]

Definition at line 18 of file glue_dynamic.cpp.

References contents().

00018                                 {
00019     return contents (arg_1);
00020   }

static double mmx::GLUE_2 ( const int &  arg_1  )  [static]

Definition at line 29 of file glue_syntactic.cpp.

00029                             {
00030     return syntactic (arg_1);
00031   }

static document mmx::GLUE_2 ( const document arg_1  )  [static]

Definition at line 30 of file glue_document.cpp.

00030                                  {
00031     return document (arg_1);
00032   }

static generic mmx::GLUE_2 ( const compound arg_1,
const tuple< generic > &  arg_2 
) [static]

Definition at line 26 of file glue_compound.cpp.

References as_vector(), and gen_compound_apply.

00026                                                               {
00027     return gen_compound_apply (arg_1, as_vector (arg_2));
00028   }

static vector<generic> mmx::GLUE_2 ( const tuple< generic > &  arg_1  )  [static]

Definition at line 17 of file glue_list_generic.cpp.

References as_vector().

00017                                        {
00018     return list<generic > (as_vector (arg_1));
00019   }

static generic mmx::GLUE_2 ( const pair< generic, generic > &  arg_1  )  [static]
static bool mmx::GLUE_20 ( const syntactic arg_1,
const syntactic arg_2 
) [static]

Definition at line 119 of file glue_syntactic.cpp.

00119                                                            {
00120     return arg_1 <= arg_2;
00121   }

static string mmx::GLUE_20 ( const string arg_1  )  [static]

Definition at line 107 of file glue_string.cpp.

References quote().

00107                                 {
00108     return quote (arg_1);
00109   }

static port mmx::GLUE_20 ( const port arg_1  )  [static]

Definition at line 107 of file glue_port.cpp.

References accept().

00107                               {
00108     return accept (arg_1);
00109   }

static int mmx::GLUE_20 ( const int &  arg_1  )  [static]

Definition at line 105 of file glue_int.cpp.

References abs().

00105                              {
00106     return abs (arg_1);
00107   }

static double mmx::GLUE_20 ( const double &  arg_1  )  [static]

Definition at line 105 of file glue_double.cpp.

References mmx_acos.

00105                                 {
00106     return mmx_acos (arg_1);
00107   }

static alias<generic> mmx::GLUE_20 ( const alias< table< generic, generic > > &  arg_1,
const generic arg_2,
const generic arg_3,
const tuple< generic > &  arg_4 
) [static]

Definition at line 107 of file glue_basix_table_generic.cpp.

References as_vector().

Referenced by glue_basix_table_generic(), glue_double(), glue_int(), glue_port(), glue_string(), and glue_syntactic().

00107                                                                                                                                       {
00108     return alias_tuple_access<generic > (arg_1, arg_2, arg_3, as_vector (arg_4));
00109   }

static bool mmx::GLUE_21 ( const syntactic arg_1,
const syntactic arg_2 
) [static]

Definition at line 124 of file glue_syntactic.cpp.

00124                                                            {
00125     return arg_1 > arg_2;
00126   }

static string mmx::GLUE_21 ( const string arg_1  )  [static]

Definition at line 112 of file glue_string.cpp.

References unquote().

00112                                 {
00113     return unquote (arg_1);
00114   }

static port mmx::GLUE_21 ( const port arg_1,
const string arg_2 
) [static]

Definition at line 112 of file glue_port.cpp.

References component().

00112                                                    {
00113     return component (arg_1, arg_2);
00114   }

static int mmx::GLUE_21 ( const int &  arg_1,
const int &  arg_2 
) [static]

Definition at line 110 of file glue_int.cpp.

References min().

00110                                                {
00111     return min (arg_1, arg_2);
00112   }

static double mmx::GLUE_21 ( const double &  arg_1  )  [static]

Definition at line 110 of file glue_double.cpp.

References mmx_asin.

00110                                 {
00111     return mmx_asin (arg_1);
00112   }

static void mmx::GLUE_21 ( const alias< table< generic, generic > > &  arg_1,
const generic arg_2,
const generic arg_3,
const tuple< generic > &  arg_4 
) [static]

Definition at line 112 of file glue_basix_table_generic.cpp.

References alias_tuple_reset(), and as_vector().

Referenced by glue_basix_table_generic(), glue_double(), glue_int(), glue_port(), glue_string(), and glue_syntactic().

00112                                                                                                                                       {
00113     alias_tuple_reset (arg_1, arg_2, arg_3, as_vector (arg_4));
00114   }

static bool mmx::GLUE_22 ( const syntactic arg_1,
const syntactic arg_2 
) [static]

Definition at line 129 of file glue_syntactic.cpp.

00129                                                            {
00130     return arg_1 >= arg_2;
00131   }

static int mmx::GLUE_22 ( const int &  arg_1  )  [static]

Definition at line 117 of file glue_string.cpp.

References charcode_as_string().

00117                              {
00118     return charcode_as_string (arg_1);
00119   }

static int mmx::GLUE_22 ( const int &  arg_1,
const int &  arg_2 
) [static]

Definition at line 115 of file glue_int.cpp.

References max().

00115                                                {
00116     return max (arg_1, arg_2);
00117   }

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_int(), glue_port(), glue_string(), and glue_syntactic().

00115                                 {
00116     return mmx_atan (arg_1);
00117   }

static int mmx::GLUE_23 ( const string arg_1  )  [static]

Definition at line 122 of file glue_string.cpp.

References string_as_charcode().

00122                                 {
00123     return string_as_charcode (arg_1);
00124   }

static port mmx::GLUE_23 ( const port arg_1,
const generic arg_2 
) [static]

Definition at line 122 of file glue_port.cpp.

00122                                                     {
00123     return arg_1 << arg_2;
00124   }

static int mmx::GLUE_23 ( const int &  arg_1,
const int &  arg_2 
) [static]

Definition at line 120 of file glue_int.cpp.

References min().

00120                                                {
00121     return min (arg_1, arg_2);
00122   }

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_int(), glue_port(), and glue_string().

00120                                                      {
00121     return arg_1 == arg_2;
00122   }

static port mmx::GLUE_24 ( const port arg_1,
const string arg_2 
) [static]

Definition at line 127 of file glue_port.cpp.

00127                                                    {
00128     return arg_1 << arg_2;
00129   }

static int mmx::GLUE_24 ( const int &  arg_1,
const int &  arg_2 
) [static]

Definition at line 125 of file glue_int.cpp.

References max().

00125                                                {
00126     return max (arg_1, arg_2);
00127   }

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_int(), and glue_port().

00125                                                      {
00126     return arg_1 != arg_2;
00127   }

static port mmx::GLUE_25 ( const port arg_1,
const print_format arg_2 
) [static]

Definition at line 132 of file glue_port.cpp.

00132                                                          {
00133     return arg_1 << arg_2;
00134   }

static int mmx::GLUE_25 ( const int &  arg_1,
const int &  arg_2 
) [static]

Definition at line 130 of file glue_int.cpp.

00130                                                {
00131     return arg_1 & arg_2;
00132   }

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_int(), and glue_port().

00130                                                      {
00131     return arg_1 < arg_2;
00132   }

static generic mmx::GLUE_26 ( const generic arg_1  )  [static]

Definition at line 137 of file glue_port.cpp.

References generic_assemble().

00137                                  {
00138     return generic_assemble (arg_1);
00139   }

static int mmx::GLUE_26 ( const int &  arg_1,
const int &  arg_2 
) [static]

Definition at line 135 of file glue_int.cpp.

00135                                                {
00136     return arg_1 | arg_2;
00137   }

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_int(), and glue_port().

00135                                                      {
00136     return arg_1 <= arg_2;
00137   }

static generic mmx::GLUE_27 ( const generic arg_1  )  [static]

Definition at line 142 of file glue_port.cpp.

References generic_disassemble().

00142                                  {
00143     return generic_disassemble (arg_1);
00144   }

static int mmx::GLUE_27 ( const int &  arg_1,
const int &  arg_2 
) [static]

Definition at line 140 of file glue_int.cpp.

00140                                                {
00141     return arg_1 ^ arg_2;
00142   }

static bool mmx::GLUE_27 ( const double &  arg_1,
const double &  arg_2 
) [static]

Definition at line 140 of file glue_double.cpp.

Referenced by glue_double(), glue_int(), and glue_port().

00140                                                      {
00141     return arg_1 > arg_2;
00142   }

static void mmx::GLUE_28 ( const port arg_1,
const generic arg_2 
) [static]

Definition at line 147 of file glue_port.cpp.

References binary_write_generic().

00147                                                     {
00148     binary_write_generic (arg_1, arg_2);
00149   }

static int mmx::GLUE_28 ( const int &  arg_1  )  [static]

Definition at line 145 of file glue_int.cpp.

References floor_sqrt().

00145                              {
00146     return floor_sqrt (arg_1);
00147   }

static bool mmx::GLUE_28 ( const double &  arg_1,
const double &  arg_2 
) [static]

Definition at line 145 of file glue_double.cpp.

Referenced by glue_double(), glue_int(), and glue_port().

00145                                                      {
00146     return arg_1 >= arg_2;
00147   }

static generic mmx::GLUE_29 ( const port arg_1  )  [static]

Definition at line 152 of file glue_port.cpp.

References binary_read_generic().

00152                               {
00153     return binary_read_generic (arg_1);
00154   }

static bool mmx::GLUE_29 ( const int &  arg_1,
const int &  arg_2 
) [static]

Definition at line 150 of file glue_int.cpp.

References divides().

00150                                                {
00151     return divides (arg_1, arg_2);
00152   }

static int mmx::GLUE_29 ( const double &  arg_1  )  [static]

Definition at line 150 of file glue_double.cpp.

References sign().

Referenced by glue_double(), glue_int(), and glue_port().

00150                                 {
00151     return sign (arg_1);
00152   }

static generic mmx::GLUE_3 ( const syntactic arg_1  )  [static]

Definition at line 34 of file glue_syntactic.cpp.

References as_generic().

00034                                   {
00035     return as_generic (arg_1);
00036   }

static string mmx::GLUE_3 ( const string arg_1,
const int &  arg_2,
const int &  arg_3 
) [static]

Definition at line 22 of file glue_string.cpp.

00022                                                                    {
00023     return arg_1 (arg_2, arg_3);
00024   }

static storage mmx::GLUE_3 ( const storage arg_1  )  [static]

Definition at line 23 of file glue_storage.cpp.

References cached_storage().

00023                                 {
00024     return cached_storage (arg_1);
00025   }

static iterator<generic> mmx::GLUE_3 ( const vector< routine > &  arg_1  )  [static]

Definition at line 23 of file glue_routine.cpp.

References iterate().

00023                                         {
00024     return as<iterator<generic> > (iterate (arg_1));
00025   }

static port mmx::GLUE_3 ( const string arg_1  )  [static]

Definition at line 22 of file glue_port.cpp.

References output_file_port().

00022                                {
00023     return output_file_port (arg_1);
00024   }

static generic mmx::GLUE_3 ( const literal arg_1,
const tuple< generic > &  arg_2 
) [static]

Definition at line 26 of file glue_literal.cpp.

References as_vector(), and gen_literal_access.

00026                                                              {
00027     return gen_literal_access (arg_1, as_vector (arg_2));
00028   }

static iterator<generic> mmx::GLUE_3 ( const list< generic > &  arg_1  )  [static]

Definition at line 22 of file glue_list_generic.cpp.

References iterate().

00022                                       {
00023     return iterate (arg_1);
00024   }

static string mmx::GLUE_3 ( const int &  arg_1  )  [static]

Definition at line 20 of file glue_int.cpp.

References as_string().

00020                             {
00021     return as_string (arg_1);
00022   }

static bool mmx::GLUE_3 ( const generic arg_1  )  [static]

Definition at line 32 of file glue_expression.cpp.

References generic_is_double().

00032                                 {
00033     return generic_is_double (arg_1);
00034   }

static dynamic mmx::GLUE_3 ( const routine arg_1,
const tuple< dynamic > &  arg_2 
) [static]

Definition at line 23 of file glue_dynamic.cpp.

References as_vector().

00023                                                              {
00024     return dynamic (arg_1, as_vector (arg_2));
00025   }

static int mmx::GLUE_3 ( const double &  arg_1  )  [static]

Definition at line 20 of file glue_double.cpp.

References as_int().

00020                                {
00021     return as_int (arg_1);
00022   }

static generic mmx::GLUE_3 ( const document arg_1  )  [static]

Definition at line 35 of file glue_document.cpp.

References as_generic().

00035                                  {
00036     return as_generic (arg_1);
00037   }

static vector<generic> mmx::GLUE_3 ( const tuple< generic > &  arg_1  )  [static]

Definition at line 31 of file glue_compound.cpp.

References as_vector().

00031                                        {
00032     return compound (as_vector (arg_1));
00033   }

static generic mmx::GLUE_3 ( const pair< generic, generic > &  arg_1  )  [static]
static int mmx::GLUE_30 (  )  [static]

Definition at line 155 of file glue_int.cpp.

00155              {
00156     return rand ();
00157   }

static double mmx::GLUE_30 ( const double &  arg_1  )  [static]

Definition at line 155 of file glue_double.cpp.

References abs().

Referenced by glue_double(), and glue_int().

00155                                 {
00156     return abs (arg_1);
00157   }

static double mmx::GLUE_31 ( const double &  arg_1,
const double &  arg_2 
) [static]

Definition at line 160 of file glue_double.cpp.

References min().

Referenced by glue_double().

00160                                                      {
00161     return min (arg_1, arg_2);
00162   }

static double mmx::GLUE_32 ( const double &  arg_1,
const double &  arg_2 
) [static]

Definition at line 165 of file glue_double.cpp.

References max().

Referenced by glue_double().

00165                                                      {
00166     return max (arg_1, arg_2);
00167   }

static double mmx::GLUE_33 ( const double &  arg_1,
const double &  arg_2 
) [static]

Definition at line 170 of file glue_double.cpp.

References min().

Referenced by glue_double().

00170                                                      {
00171     return min (arg_1, arg_2);
00172   }

static double mmx::GLUE_34 ( const double &  arg_1,
const double &  arg_2 
) [static]

Definition at line 175 of file glue_double.cpp.

References max().

Referenced by glue_double().

00175                                                      {
00176     return max (arg_1, arg_2);
00177   }

static double mmx::GLUE_35 ( const double &  arg_1  )  [static]

Definition at line 180 of file glue_double.cpp.

References mmx_floor.

Referenced by glue_double().

00180                                 {
00181     return mmx_floor (arg_1);
00182   }

static double mmx::GLUE_36 ( const double &  arg_1  )  [static]

Definition at line 185 of file glue_double.cpp.

References mmx_ceil.

Referenced by glue_double().

00185                                 {
00186     return mmx_ceil (arg_1);
00187   }

static double mmx::GLUE_37 ( const double &  arg_1  )  [static]

Definition at line 190 of file glue_double.cpp.

References mmx_trunc.

Referenced by glue_double().

00190                                 {
00191     return mmx_trunc (arg_1);
00192   }

static double mmx::GLUE_38 ( const double &  arg_1  )  [static]

Definition at line 195 of file glue_double.cpp.

References mmx_round.

Referenced by glue_double().

00195                                 {
00196     return mmx_round (arg_1);
00197   }

static bool mmx::GLUE_39 ( const double &  arg_1  )  [static]

Definition at line 200 of file glue_double.cpp.

References is_finite().

Referenced by glue_double().

00200                                 {
00201     return is_finite (arg_1);
00202   }

static string mmx::GLUE_4 ( const syntactic arg_1  )  [static]

Definition at line 39 of file glue_syntactic.cpp.

References as_string().

00039                                   {
00040     return as_string (arg_1);
00041   }

static string mmx::GLUE_4 ( const string arg_1,
const string arg_2 
) [static]

Definition at line 27 of file glue_string.cpp.

00027                                                     {
00028     return arg_1 * arg_2;
00029   }

static void mmx::GLUE_4 ( const storage arg_1,
const string arg_2,
const string arg_3 
) [static]

Definition at line 28 of file glue_storage.cpp.

References write().

00028                                                                           {
00029     write (arg_1, arg_2, arg_3);
00030   }

static int mmx::GLUE_4 ( const vector< routine > &  arg_1  )  [static]

Definition at line 28 of file glue_routine.cpp.

References N().

00028                                         {
00029     return N (arg_1);
00030   }

static port mmx::GLUE_4 ( const string arg_1,
const int &  arg_2 
) [static]

Definition at line 27 of file glue_port.cpp.

References socket_server_port().

00027                                                  {
00028     return socket_server_port (arg_1, arg_2);
00029   }

static int mmx::GLUE_4 ( const list< generic > &  arg_1  )  [static]

Definition at line 27 of file glue_list_generic.cpp.

References N().

00027                                       {
00028     return N (arg_1);
00029   }

static string mmx::GLUE_4 ( const int &  arg_1  )  [static]

Definition at line 25 of file glue_int.cpp.

References as_string_hexa().

00025                             {
00026     return as_string_hexa (arg_1);
00027   }

static generic mmx::GLUE_4 ( const string arg_1,
const bool &  arg_2 
) [static]

Definition at line 37 of file glue_expression.cpp.

References parse_lisp().

00037                                                   {
00038     return parse_lisp (arg_1, arg_2);
00039   }

static void mmx::GLUE_4 ( const dynamic arg_1,
const generic arg_2 
) [static]

Definition at line 28 of file glue_dynamic.cpp.

References assign().

00028                                                       {
00029     assign (arg_1, arg_2);
00030   }

static document mmx::GLUE_4 ( const string arg_1  )  [static]

Definition at line 31 of file glue_literal.cpp.

00031                                {
00032     return literal (arg_1);
00033   }

static iterator<generic> mmx::GLUE_4 ( const vector< generic > &  arg_1  )  [static]

Definition at line 36 of file glue_compound.cpp.

00036                                         {
00037     return compound (arg_1);
00038   }

static bool mmx::GLUE_4 ( const generic arg_1  )  [static]
static bool mmx::GLUE_40 ( const double &  arg_1  )  [static]

Definition at line 205 of file glue_double.cpp.

References is_infinite().

Referenced by glue_double().

00205                                 {
00206     return is_infinite (arg_1);
00207   }

static bool mmx::GLUE_41 ( const double &  arg_1  )  [static]

Definition at line 210 of file glue_double.cpp.

References is_nan().

Referenced by glue_double().

00210                                 {
00211     return is_nan (arg_1);
00212   }

static double mmx::GLUE_42 ( const double &  arg_1  )  [static]

Definition at line 215 of file glue_double.cpp.

References times_infinity().

Referenced by glue_double().

00215                                 {
00216     return times_infinity (arg_1);
00217   }

static int mmx::GLUE_43 ( const double &  arg_1  )  [static]

Definition at line 220 of file glue_double.cpp.

References precision().

Referenced by glue_double().

00220                                 {
00221     return precision (arg_1);
00222   }

static double mmx::GLUE_44 ( const double &  arg_1,
const int &  arg_2 
) [static]

Definition at line 225 of file glue_double.cpp.

References change_precision().

Referenced by glue_double().

00225                                                   {
00226     return change_precision (arg_1, arg_2);
00227   }

static double mmx::GLUE_45 ( const double &  arg_1  )  [static]

Definition at line 230 of file glue_double.cpp.

References next_above().

Referenced by glue_double().

00230                                 {
00231     return next_above (arg_1);
00232   }

static double mmx::GLUE_46 ( const double &  arg_1  )  [static]

Definition at line 235 of file glue_double.cpp.

References next_below().

Referenced by glue_double().

00235                                 {
00236     return next_below (arg_1);
00237   }

static int mmx::GLUE_47 ( const double &  arg_1  )  [static]

Definition at line 240 of file glue_double.cpp.

References exponent().

Referenced by glue_double().

00240                                 {
00241     return exponent (arg_1);
00242   }

static double mmx::GLUE_48 ( const double &  arg_1  )  [static]

Definition at line 245 of file glue_double.cpp.

References magnitude().

Referenced by glue_double().

00245                                 {
00246     return magnitude (arg_1);
00247   }

static double mmx::GLUE_49 ( const double &  arg_1,
const int &  arg_2 
) [static]

Definition at line 250 of file glue_double.cpp.

References incexp2().

Referenced by glue_double().

00250                                                   {
00251     return incexp2 (arg_1, arg_2);
00252   }

static string mmx::GLUE_5 ( const string arg_1,
const string arg_2 
) [static]

Definition at line 32 of file glue_string.cpp.

00032                                                     {
00033     return arg_1 * arg_2;
00034   }

static string mmx::GLUE_5 ( const storage arg_1,
const string arg_2 
) [static]

Definition at line 33 of file glue_storage.cpp.

References read().

00033                                                      {
00034     return read (arg_1, arg_2);
00035   }

static routine mmx::GLUE_5 ( const vector< routine > &  arg_1,
const int &  arg_2 
) [static]

Definition at line 33 of file glue_routine.cpp.

00033                                                           {
00034     return arg_1[arg_2];
00035   }

static port mmx::GLUE_5 ( const string arg_1,
const int &  arg_2 
) [static]

Definition at line 32 of file glue_port.cpp.

References socket_client_port().

00032                                                  {
00033     return socket_client_port (arg_1, arg_2);
00034   }

static string mmx::GLUE_5 ( const literal arg_1  )  [static]

Definition at line 36 of file glue_literal.cpp.

00036                                 {
00037     return *arg_1;
00038   }

static generic mmx::GLUE_5 ( const list< generic > &  arg_1,
const int &  arg_2 
) [static]

Definition at line 32 of file glue_list_generic.cpp.

00032                                                         {
00033     return arg_1[arg_2];
00034   }

static int mmx::GLUE_5 ( const int &  arg_1  )  [static]

Definition at line 30 of file glue_int.cpp.

00030                             {
00031     return -arg_1;
00032   }

static string mmx::GLUE_5 ( const generic arg_1,
const bool &  arg_2 
) [static]

Definition at line 42 of file glue_expression.cpp.

References as_lisp().

00042                                                    {
00043     return as_lisp (arg_1, arg_2);
00044   }

static void mmx::GLUE_5 ( const string arg_1,
const generic arg_2 
) [static]

Definition at line 33 of file glue_dynamic.cpp.

References dynamic_event.

00033                                                      {
00034     dynamic_event (arg_1, arg_2);
00035   }

static string mmx::GLUE_5 ( const double &  arg_1  )  [static]

Definition at line 30 of file glue_double.cpp.

References as_string().

00030                                {
00031     return as_string (arg_1);
00032   }

static document mmx::GLUE_5 ( const string arg_1,
const tuple< document > &  arg_2 
) [static]

Definition at line 45 of file glue_document.cpp.

References as_vector(), and make_texmacs().

00045                                                              {
00046     return make_texmacs (arg_1, as_vector (arg_2));
00047   }

static vector<generic> mmx::GLUE_5 ( const compound arg_1  )  [static]

Definition at line 41 of file glue_compound.cpp.

References as_vector().

00041                                  {
00042     return as_vector (arg_1);
00043   }

static int mmx::GLUE_5 ( const vector< generic > &  arg_1  )  [static]

Definition at line 32 of file glue_basix_vector_generic.cpp.

References N().

00032                                         {
00033     return N (arg_1);
00034   }

static table< generic , generic > mmx::GLUE_5 ( const generic arg_1  )  [static]
static double mmx::GLUE_50 ( const double &  arg_1,
const int &  arg_2 
) [static]

Definition at line 255 of file glue_double.cpp.

References decexp2().

Referenced by glue_double().

00255                                                   {
00256     return decexp2 (arg_1, arg_2);
00257   }

static double mmx::GLUE_51 ( const double &  arg_1  )  [static]

Definition at line 260 of file glue_double.cpp.

References rounding_error().

Referenced by glue_double().

00260                                 {
00261     return rounding_error (arg_1);
00262   }

static double mmx::GLUE_52 ( const double &  arg_1  )  [static]

Definition at line 265 of file glue_double.cpp.

References additive_error().

Referenced by glue_double().

00265                                 {
00266     return additive_error (arg_1);
00267   }

static double mmx::GLUE_53 ( const double &  arg_1  )  [static]

Definition at line 270 of file glue_double.cpp.

References multiplicative_error().

Referenced by glue_double().

00270                                 {
00271     return multiplicative_error (arg_1);
00272   }

static double mmx::GLUE_54 ( const double &  arg_1  )  [static]

Definition at line 275 of file glue_double.cpp.

References elementary_error().

Referenced by glue_double().

00275                                 {
00276     return elementary_error (arg_1);
00277   }

static syntactic mmx::GLUE_6 ( const syntactic arg_1  )  [static]

Definition at line 49 of file glue_syntactic.cpp.

References syntactic_apply.

00049                                   {
00050     return syntactic_apply (arg_1);
00051   }

static alias<string> mmx::GLUE_6 ( const alias< string > &  arg_1,
const string arg_2 
) [static]

Definition at line 37 of file glue_string.cpp.

References alias_write().

00037                                                            {
00038     return alias_write (arg_1, arg_2);
00039   }

static void mmx::GLUE_6 ( const storage arg_1,
const string arg_2 
) [static]

Definition at line 38 of file glue_storage.cpp.

References lock().

00038                                                      {
00039     lock (arg_1, arg_2);
00040   }

static alias<routine> mmx::GLUE_6 ( const alias< vector< routine > > &  arg_1,
const int &  arg_2 
) [static]

Definition at line 38 of file glue_routine.cpp.

00038                                                                   {
00039     return alias_access<routine > (arg_1, arg_2);
00040   }

static port mmx::GLUE_6 ( const string arg_1  )  [static]

Definition at line 37 of file glue_port.cpp.

References pipe_port().

00037                                {
00038     return pipe_port (arg_1);
00039   }

static alias<generic> mmx::GLUE_6 ( const alias< list< generic > > &  arg_1,
const int &  arg_2 
) [static]

Definition at line 37 of file glue_list_generic.cpp.

00037                                                                 {
00038     return alias_access<generic > (arg_1, arg_2);
00039   }

static int mmx::GLUE_6 ( const int &  arg_1  )  [static]

Definition at line 35 of file glue_int.cpp.

References square().

00035                             {
00036     return square (arg_1);
00037   }

static string mmx::GLUE_6 ( const generic arg_1  )  [static]

Definition at line 47 of file glue_expression.cpp.

References flatten_as_mmx().

00047                                 {
00048     return flatten_as_mmx (arg_1);
00049   }

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().

00035                                                     {
00036     return uniform_deviate (arg_1, arg_2);
00037   }

static document mmx::GLUE_6 ( const literal arg_1,
const tuple< document > &  arg_2 
) [static]

Definition at line 50 of file glue_document.cpp.

References as_vector(), and make_texmacs().

00050                                                               {
00051     return make_texmacs (arg_1, as_vector (arg_2));
00052   }

static int mmx::GLUE_6 ( const compound arg_1  )  [static]

Definition at line 46 of file glue_compound.cpp.

References N().

00046                                  {
00047     return N (arg_1);
00048   }

static generic mmx::GLUE_6 ( const vector< generic > &  arg_1,
const int &  arg_2 
) [static]

Definition at line 37 of file glue_basix_vector_generic.cpp.

00037                                                           {
00038     return arg_1[arg_2];
00039   }

static table< generic , generic > mmx::GLUE_6 ( const tuple< pair< generic, generic > > &  arg_1  )  [static]
static syntactic mmx::GLUE_7 ( const syntactic arg_1,
const syntactic arg_2 
) [static]

Definition at line 54 of file glue_syntactic.cpp.

References syntactic_apply.

00054                                                           {
00055     return syntactic_apply (arg_1, arg_2);
00056   }

static bool mmx::GLUE_7 ( const string arg_1,
const string arg_2 
) [static]

Definition at line 42 of file glue_string.cpp.

00042                                                     {
00043     return arg_1 < arg_2;
00044   }

static void mmx::GLUE_7 ( const storage arg_1,
const string arg_2 
) [static]

Definition at line 43 of file glue_storage.cpp.

References unlock().

00043                                                      {
00044     unlock (arg_1, arg_2);
00045   }

static vector<routine> mmx::GLUE_7 ( const vector< routine > &  arg_1,
const int &  arg_2,
const int &  arg_3 
) [static]

Definition at line 43 of file glue_routine.cpp.

References range().

00043                                                                             {
00044     return range (arg_1, arg_2, arg_3);
00045   }

static port mmx::GLUE_7 ( const tuple< port > &  arg_1  )  [static]

Definition at line 42 of file glue_port.cpp.

References as_vector(), and composite_port().

00042                                     {
00043     return composite_port (as_vector (arg_1));
00044   }

static list<generic> mmx::GLUE_7 ( const list< generic > &  arg_1,
const int &  arg_2,
const int &  arg_3 
) [static]

Definition at line 42 of file glue_list_generic.cpp.

References range().

00042                                                                           {
00043     return range (arg_1, arg_2, arg_3);
00044   }

static int mmx::GLUE_7 ( const int &  arg_1,
const int &  arg_2 
) [static]

Definition at line 40 of file glue_int.cpp.

00040                                               {
00041     return arg_1 + arg_2;
00042   }

static double mmx::GLUE_7 ( const double &  arg_1  )  [static]

Definition at line 40 of file glue_double.cpp.

00040                                {
00041     return -arg_1;
00042   }

static document mmx::GLUE_7 ( const generic arg_1  )  [static]

Definition at line 52 of file glue_expression.cpp.

References flatten_as_cpp().

00052                                 {
00053     return flatten_as_cpp (arg_1);
00054   }

static generic mmx::GLUE_7 ( const compound arg_1,
const int &  arg_2 
) [static]

Definition at line 51 of file glue_compound.cpp.

00051                                                    {
00052     return arg_1[arg_2];
00053   }

static alias<generic> mmx::GLUE_7 ( const alias< vector< generic > > &  arg_1,
const int &  arg_2 
) [static]

Definition at line 42 of file glue_basix_vector_generic.cpp.

00042                                                                   {
00043     return alias_access<generic > (arg_1, arg_2);
00044   }

static iterator<generic> mmx::GLUE_7 ( const table< generic, generic > &  arg_1  )  [static]
static syntactic mmx::GLUE_8 ( const syntactic arg_1,
const syntactic arg_2,
const syntactic arg_3 
) [static]

Definition at line 59 of file glue_syntactic.cpp.

References syntactic_apply.

00059                                                                                   {
00060     return syntactic_apply (arg_1, arg_2, arg_3);
00061   }

static bool mmx::GLUE_8 ( const string arg_1,
const string arg_2 
) [static]

Definition at line 47 of file glue_string.cpp.

00047                                                     {
00048     return arg_1 <= arg_2;
00049   }

static storage mmx::GLUE_8 ( const storage arg_1,
const string arg_2 
) [static]

Definition at line 48 of file glue_storage.cpp.

References get_branch().

00048                                                      {
00049     return get_branch (arg_1, arg_2);
00050   }

static vector<routine> mmx::GLUE_8 ( const vector< routine > &  arg_1  )  [static]

Definition at line 48 of file glue_routine.cpp.

References reverse().

00048                                         {
00049     return reverse (arg_1);
00050   }

static port mmx::GLUE_8 ( const string arg_1  )  [static]

Definition at line 47 of file glue_port.cpp.

References error_port().

00047                                {
00048     return error_port (arg_1);
00049   }

static list<generic> mmx::GLUE_8 ( const list< generic > &  arg_1  )  [static]

Definition at line 47 of file glue_list_generic.cpp.

References reverse().

00047                                       {
00048     return reverse (arg_1);
00049   }

static int mmx::GLUE_8 ( const int &  arg_1,
const int &  arg_2 
) [static]

Definition at line 45 of file glue_int.cpp.

00045                                               {
00046     return arg_1 - arg_2;
00047   }

static double mmx::GLUE_8 ( const double &  arg_1  )  [static]

Definition at line 45 of file glue_double.cpp.

References square().

00045                                {
00046     return square (arg_1);
00047   }

static document mmx::GLUE_8 ( const document arg_1  )  [static]

Definition at line 60 of file glue_document.cpp.

References make_text().

00060                                  {
00061     return make_text (arg_1);
00062   }

static vector<generic> mmx::GLUE_8 ( const compound arg_1  )  [static]

Definition at line 56 of file glue_compound.cpp.

References as_vector().

00056                                  {
00057     return as_vector (arg_1);
00058   }

static vector<generic> mmx::GLUE_8 ( const vector< generic > &  arg_1,
const int &  arg_2,
const int &  arg_3 
) [static]

Definition at line 47 of file glue_basix_vector_generic.cpp.

References range().

00047                                                                             {
00048     return range (arg_1, arg_2, arg_3);
00049   }

static int mmx::GLUE_8 ( const table< generic, generic > &  arg_1  )  [static]
static syntactic mmx::GLUE_9 ( const syntactic arg_1  )  [static]

Definition at line 64 of file glue_syntactic.cpp.

00064                                   {
00065     return -arg_1;
00066   }

static bool mmx::GLUE_9 ( const string arg_1,
const string arg_2 
) [static]

Definition at line 52 of file glue_string.cpp.

00052                                                     {
00053     return arg_1 > arg_2;
00054   }

static bool mmx::GLUE_9 ( const storage arg_1,
const string arg_2 
) [static]

Definition at line 53 of file glue_storage.cpp.

References has_branch().

00053                                                      {
00054     return has_branch (arg_1, arg_2);
00055   }

static vector<routine> mmx::GLUE_9 ( const vector< routine > &  arg_1,
const vector< routine > &  arg_2 
) [static]

Definition at line 53 of file glue_routine.cpp.

References append().

00053                                                                       {
00054     return append (arg_1, arg_2);
00055   }

static bool mmx::GLUE_9 ( const port arg_1  )  [static]

Definition at line 52 of file glue_port.cpp.

References is_output_port().

00052                              {
00053     return is_output_port (arg_1);
00054   }

static list<generic> mmx::GLUE_9 ( const list< generic > &  arg_1,
const list< generic > &  arg_2 
) [static]

Definition at line 52 of file glue_list_generic.cpp.

References append().

00052                                                                   {
00053     return append (arg_1, arg_2);
00054   }

static int mmx::GLUE_9 ( const int &  arg_1,
const int &  arg_2 
) [static]

Definition at line 50 of file glue_int.cpp.

00050                                               {
00051     return arg_1 * arg_2;
00052   }

static double mmx::GLUE_9 ( const double &  arg_1,
const double &  arg_2 
) [static]

Definition at line 50 of file glue_double.cpp.

00050                                                     {
00051     return arg_1 + arg_2;
00052   }

static document mmx::GLUE_9 ( const generic arg_1  )  [static]

Definition at line 65 of file glue_document.cpp.

References make_math().

00065                                 {
00066     return make_math (arg_1);
00067   }

static vector<generic> mmx::GLUE_9 ( const compound arg_1  )  [static]

Definition at line 61 of file glue_compound.cpp.

References compound_arguments.

00061                                  {
00062     return compound_arguments (arg_1);
00063   }

static vector<generic> mmx::GLUE_9 ( const vector< generic > &  arg_1  )  [static]

Definition at line 52 of file glue_basix_vector_generic.cpp.

References reverse().

00052                                         {
00053     return reverse (arg_1);
00054   }

static int mmx::GLUE_9 ( const table< generic, generic > &  arg_1  )  [static]
void mmx::glue_basix (  ) 

Definition at line 26 of file glue_basix.cpp.

References done(), glue_basix_table_generic(), glue_basix_vector_generic(), glue_compound(), glue_document(), glue_double(), glue_dynamic(), glue_expression(), glue_generic(), glue_int(), glue_list_generic(), glue_list_map(), glue_literal(), glue_port(), glue_routine(), glue_storage(), glue_string(), glue_syntactic(), glue_vector_map(), and register_glue().

00026                 {
00027     static bool done = false;
00028     if (done) return;
00029     done = true;
00030     register_glue (string ("glue_basix_table_generic"), (& (glue_basix_table_generic)));
00031     register_glue (string ("glue_basix_vector_generic"), (& (glue_basix_vector_generic)));
00032     register_glue (string ("glue_compound"), (& (glue_compound)));
00033     register_glue (string ("glue_document"), (& (glue_document)));
00034     register_glue (string ("glue_double"), (& (glue_double)));
00035     register_glue (string ("glue_dynamic"), (& (glue_dynamic)));
00036     register_glue (string ("glue_expression"), (& (glue_expression)));
00037     register_glue (string ("glue_generic"), (& (glue_generic)));
00038     register_glue (string ("glue_int"), (& (glue_int)));
00039     register_glue (string ("glue_list_generic"), (& (glue_list_generic)));
00040     register_glue (string ("glue_list_map"), (& (glue_list_map)));
00041     register_glue (string ("glue_literal"), (& (glue_literal)));
00042     register_glue (string ("glue_port"), (& (glue_port)));
00043     register_glue (string ("glue_routine"), (& (glue_routine)));
00044     register_glue (string ("glue_storage"), (& (glue_storage)));
00045     register_glue (string ("glue_string"), (& (glue_string)));
00046     register_glue (string ("glue_syntactic"), (& (glue_syntactic)));
00047     register_glue (string ("glue_vector_map"), (& (glue_vector_map)));
00048     register_glue (string ("glue_basix"), (& (glue_basix)));
00049     glue_basix_table_generic ();
00050     glue_basix_vector_generic ();
00051     glue_compound ();
00052     glue_document ();
00053     glue_double ();
00054     glue_dynamic ();
00055     glue_expression ();
00056     glue_generic ();
00057     glue_int ();
00058     glue_list_generic ();
00059     glue_list_map ();
00060     glue_literal ();
00061     glue_port ();
00062     glue_routine ();
00063     glue_storage ();
00064     glue_string ();
00065     glue_syntactic ();
00066     glue_vector_map ();
00067   }

void glue_basix_table_generic (  ) 

Definition at line 117 of file glue_basix_table_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_3(), GLUE_4(), GLUE_5(), GLUE_6(), GLUE_7(), GLUE_8(), GLUE_9(), lit(), and PENALTY_PROMOTE_GENERIC.

Referenced by glue_basix().

00117                               {
00118     static bool done = false;
00119     if (done) return;
00120     done = true;
00121     call_glue (string ("glue_generic"));
00122     call_glue (string ("glue_int"));
00123     define_type<pair<generic, generic> > (gen (lit ("Binding"), lit ("Generic"), lit ("Generic")));
00124     define ("~>", GLUE_1);
00125     define (".key", GLUE_2);
00126     define (".image", GLUE_3);
00127     define_type<mmx_table(generic, generic) > (gen (lit ("Table"), lit ("Generic"), lit ("Generic")));
00128     define ("table?", GLUE_4);
00129     define ("table", GLUE_5);
00130     define ("table", GLUE_6);
00131     define_converter (":>", GLUE_7, PENALTY_PROMOTE_GENERIC);
00132     define ("#", GLUE_8);
00133     define ("complexity", GLUE_9);
00134     define ("contains?", GLUE_10);
00135     define (".[]", GLUE_11);
00136     define (".[]", GLUE_12);
00137     define ("reset", GLUE_13);
00138     define ("set", GLUE_14);
00139     define ("reverse", GLUE_15);
00140     define ("><", GLUE_16);
00141     define ("<<", GLUE_17);
00142     define ("contains?", GLUE_18);
00143     define (".[]", GLUE_19);
00144     define (".[]", GLUE_20);
00145     define ("reset", GLUE_21);
00146   }

void glue_basix_vector_generic (  ) 

Definition at line 107 of file glue_basix_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_3(), GLUE_4(), GLUE_5(), GLUE_6(), GLUE_7(), GLUE_8(), GLUE_9(), lit(), and PENALTY_PROMOTE_GENERIC.

Referenced by glue_basix().

00107                                {
00108     static bool done = false;
00109     if (done) return;
00110     done = true;
00111     call_glue (string ("glue_generic"));
00112     call_glue (string ("glue_int"));
00113     define_type<vector<generic> > (gen (lit ("Vector"), lit ("Generic")));
00114     define ("vector?", GLUE_1);
00115     define ("vector", GLUE_2);
00116     define ("[]", GLUE_3);
00117     define_converter (":>", GLUE_4, PENALTY_PROMOTE_GENERIC);
00118     define ("#", GLUE_5);
00119     define (".[]", GLUE_6);
00120     define (".[]", GLUE_7);
00121     define (".[]", GLUE_8);
00122     define ("reverse", GLUE_9);
00123     define ("><", GLUE_10);
00124     define ("<<", GLUE_11);
00125     define ("cons", GLUE_12);
00126     define ("car", GLUE_13);
00127     define ("cdr", GLUE_14);
00128     define ("nil?", GLUE_15);
00129     define ("atom?", GLUE_16);
00130     define ("insert", GLUE_17);
00131     define ("find", GLUE_18);
00132     define ("contains?", GLUE_19);
00133   }

void glue_compound (  ) 

Definition at line 66 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().

00066                    {
00067     static bool done = false;
00068     if (done) return;
00069     done = true;
00070     call_glue (string ("glue_literal"));
00071     call_glue (string ("glue_basix_vector_generic"));
00072     define ("compound?", GLUE_1);
00073     define (".()", GLUE_2);
00074     define ("compound", GLUE_3);
00075     define ("as_compound", GLUE_4);
00076     define ("as_vector", GLUE_5);
00077     define ("#", GLUE_6);
00078     define (".[]", GLUE_7);
00079     define ("components", GLUE_8);
00080     define ("arguments", GLUE_9);
00081   }

void glue_document (  ) 

Definition at line 90 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().

00090                    {
00091     static bool done = false;
00092     if (done) return;
00093     done = true;
00094     call_glue (string ("glue_expression"));
00095     define_type<document > (lit ("Document"));
00096     define ("document", GLUE_1);
00097     define ("document", GLUE_2);
00098     define ("as_generic", GLUE_3);
00099     define_converter ("upgrade", GLUE_4, PENALTY_INCLUSION);
00100     define ("$tm", GLUE_5);
00101     define ("$tm", GLUE_6);
00102     define ("$text", GLUE_7);
00103     define ("$text", GLUE_8);
00104     define ("$math", GLUE_9);
00105     define ("$math", GLUE_10);
00106     define ("$inline", GLUE_11);
00107     define ("$block", GLUE_12);
00108     define ("(.)", GLUE_13);
00109   }

void glue_double (  ) 

Definition at line 280 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_49(), GLUE_5(), GLUE_50(), GLUE_51(), GLUE_52(), GLUE_53(), GLUE_54(), GLUE_6(), GLUE_7(), GLUE_8(), GLUE_9(), lit(), and PENALTY_INCLUSION.

Referenced by glue_basix().

00280                  {
00281     static bool done = false;
00282     if (done) return;
00283     done = true;
00284     define_type<double > (lit ("Double"));
00285     define ("literal_floating", GLUE_1);
00286     define_converter ("upgrade", GLUE_2, PENALTY_INCLUSION);
00287     define ("as_int", GLUE_3);
00288     define ("as_double", GLUE_4);
00289     define ("as_string", GLUE_5);
00290     define ("uniform_deviate", GLUE_6);
00291     define ("-", GLUE_7);
00292     define ("square", GLUE_8);
00293     define ("+", GLUE_9);
00294     define ("-", GLUE_10);
00295     define ("*", GLUE_11);
00296     define ("/", GLUE_12);
00297     define ("sqrt", GLUE_13);
00298     define ("^", GLUE_14);
00299     define ("exp", GLUE_15);
00300     define ("log", GLUE_16);
00301     define ("cos", GLUE_17);
00302     define ("sin", GLUE_18);
00303     define ("tan", GLUE_19);
00304     define ("arccos", GLUE_20);
00305     define ("arcsin", GLUE_21);
00306     define ("arctan", GLUE_22);
00307     define ("=", GLUE_23);
00308     define ("!=", GLUE_24);
00309     define ("<", GLUE_25);
00310     define ("<=", GLUE_26);
00311     define (">", GLUE_27);
00312     define (">=", GLUE_28);
00313     define ("sign", GLUE_29);
00314     define ("abs", GLUE_30);
00315     define ("min", GLUE_31);
00316     define ("max", GLUE_32);
00317     define ("inf", GLUE_33);
00318     define ("sup", GLUE_34);
00319     define ("floor", GLUE_35);
00320     define ("ceil", GLUE_36);
00321     define ("trunc", GLUE_37);
00322     define ("round", GLUE_38);
00323     define ("finite?", GLUE_39);
00324     define ("infinite?", GLUE_40);
00325     define ("nan?", GLUE_41);
00326     define ("times_infinity", GLUE_42);
00327     define ("precision", GLUE_43);
00328     define ("change_precision", GLUE_44);
00329     define ("next_above", GLUE_45);
00330     define ("next_below", GLUE_46);
00331     define ("exponent", GLUE_47);
00332     define ("magnitude", GLUE_48);
00333     define ("increase_exponent", GLUE_49);
00334     define ("decrease_exponent", GLUE_50);
00335     define ("rounding_error", GLUE_51);
00336     define ("additive_error", GLUE_52);
00337     define ("multiplicative_error", GLUE_53);
00338     define ("elementary_error", GLUE_54);
00339   }

void glue_dynamic (  ) 

Definition at line 38 of file glue_dynamic.cpp.

References call_glue(), define(), done(), GLUE_1(), GLUE_2(), GLUE_3(), GLUE_4(), GLUE_5(), and lit().

Referenced by glue_basix().

00038                   {
00039     static bool done = false;
00040     if (done) return;
00041     done = true;
00042     call_glue (string ("glue_generic"));
00043     call_glue (string ("glue_routine"));
00044     define_type<dynamic > (lit ("Dynamic"));
00045     define ("dynamic", GLUE_1);
00046     define ("contents", GLUE_2);
00047     define ("apply", GLUE_3);
00048     define ("assign", GLUE_4);
00049     define ("dynamic_notify", GLUE_5);
00050   }

void glue_expression (  ) 

Definition at line 57 of file glue_expression.cpp.

References call_glue(), define(), done(), GLUE_1(), GLUE_2(), GLUE_3(), GLUE_4(), GLUE_5(), GLUE_6(), and GLUE_7().

Referenced by glue_basix().

00057                      {
00058     static bool done = false;
00059     if (done) return;
00060     done = true;
00061     call_glue (string ("glue_generic"));
00062     call_glue (string ("glue_literal"));
00063     call_glue (string ("glue_compound"));
00064     define ("boolean?", GLUE_1);
00065     define ("int?", GLUE_2);
00066     define ("double?", GLUE_3);
00067     define ("parse_lisp", GLUE_4);
00068     define ("as_lisp", GLUE_5);
00069     define ("flatten_as_mmx", GLUE_6);
00070     define ("flatten_as_cpp", GLUE_7);
00071   }

void glue_generic (  ) 

Definition at line 6 of file glue_generic.cpp.

References done().

Referenced by glue_basix().

00006                   {
00007     static bool done = false;
00008     if (done) return;
00009     done = true;
00010   }

void glue_int (  ) 

Definition at line 160 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_22(), GLUE_23(), GLUE_24(), GLUE_25(), GLUE_26(), GLUE_27(), GLUE_28(), GLUE_29(), GLUE_3(), GLUE_30(), GLUE_4(), GLUE_5(), GLUE_6(), GLUE_7(), GLUE_8(), GLUE_9(), int_minus_infinity, int_plus_infinity, and lit().

Referenced by glue_basix().

00160               {
00161     static bool done = false;
00162     if (done) return;
00163     done = true;
00164     define_type<int > (lit ("Int"));
00165     define ("literal_integer", GLUE_1);
00166     define ("as_int", GLUE_2);
00167     define ("as_string", GLUE_3);
00168     define ("as_string_hexa", GLUE_4);
00169     define ("-", GLUE_5);
00170     define ("square", GLUE_6);
00171     define ("+", GLUE_7);
00172     define ("-", GLUE_8);
00173     define ("*", GLUE_9);
00174     define ("div", GLUE_10);
00175     define ("quo", GLUE_11);
00176     define ("rem", GLUE_12);
00177     define ("=", GLUE_13);
00178     define ("!=", GLUE_14);
00179     define ("<", GLUE_15);
00180     define ("<=", GLUE_16);
00181     define (">", GLUE_17);
00182     define (">=", GLUE_18);
00183     define ("sign", GLUE_19);
00184     define ("abs", GLUE_20);
00185     define ("min", GLUE_21);
00186     define ("max", GLUE_22);
00187     define ("inf", GLUE_23);
00188     define ("sup", GLUE_24);
00189     define ("/\\", GLUE_25);
00190     define ("\\/", GLUE_26);
00191     define ("xor", GLUE_27);
00192     define ("floor_sqrt", GLUE_28);
00193     define ("divides?", GLUE_29);
00194     define ("random", GLUE_30);
00195     define_constant<int > ("int_minus_infinity", int_minus_infinity);
00196     define_constant<int > ("int_plus_infinity", int_plus_infinity);
00197   }

void glue_list_generic (  ) 

Definition at line 97 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().

00097                        {
00098     static bool done = false;
00099     if (done) return;
00100     done = true;
00101     call_glue (string ("glue_generic"));
00102     call_glue (string ("glue_int"));
00103     define_type<list<generic> > (gen (lit ("List"), lit ("Generic")));
00104     define ("list?", GLUE_1);
00105     define ("list", GLUE_2);
00106     define_converter (":>", GLUE_3, PENALTY_PROMOTE_GENERIC);
00107     define ("#", GLUE_4);
00108     define (".[]", GLUE_5);
00109     define (".[]", GLUE_6);
00110     define (".[]", GLUE_7);
00111     define ("reverse", GLUE_8);
00112     define ("><", GLUE_9);
00113     define ("cons", GLUE_10);
00114     define ("car", GLUE_11);
00115     define ("cdr", GLUE_12);
00116     define ("nil?", GLUE_13);
00117     define ("atom?", GLUE_14);
00118     define ("insert", GLUE_15);
00119     define ("find", GLUE_16);
00120     define ("contains?", GLUE_17);
00121   }

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().

00160                  {
00161   static bool done = false;
00162   if (done) return;
00163   done = true;
00164   register_glue ("glue_list_map", &glue_list_map);
00165   call_glue ("glue_list_generic");
00166   define ("map", list_map);
00167   define ("foreach", list_foreach);
00168   define ("append", list_append_several);
00169   define ("apply", list_apply);
00170   define ("sort", list_sort);
00171   //define ("filter", list_filter);
00172   //define ("find_index", list_find_index);
00173 }

void glue_literal (  ) 

Definition at line 41 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().

00041                   {
00042     static bool done = false;
00043     if (done) return;
00044     done = true;
00045     call_glue (string ("glue_string"));
00046     define ("literal?", GLUE_1);
00047     define (".()", GLUE_2);
00048     define (".[]", GLUE_3);
00049     define ("as_literal", GLUE_4);
00050     define ("as_string", GLUE_5);
00051   }

void glue_port (  ) 

Definition at line 157 of file glue_port.cpp.

References black_background, black_foreground, blank, blink, blue_background, blue_foreground, bold, call_glue(), cr, cyan_background, cyan_foreground, define(), done(), flush_now, 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_4(), GLUE_5(), GLUE_6(), GLUE_7(), GLUE_8(), GLUE_9(), green_background, green_foreground, hrule, indent, lf, lit(), magenta_background, magenta_foreground, mmerr, mmin, mmout, red_background, red_foreground, reset_attributes, reset_indent, stroke, underline, unindent, white_background, white_foreground, yellow_background, and yellow_foreground.

Referenced by glue_basix().

00157                {
00158     static bool done = false;
00159     if (done) return;
00160     done = true;
00161     call_glue (string ("glue_int"));
00162     call_glue (string ("glue_string"));
00163     define_type<print_format > (lit ("Print_format"));
00164     define_constant<print_format > ("blank", blank);
00165     define_constant<print_format > ("stroke", stroke);
00166     define_constant<print_format > ("indent", indent);
00167     define_constant<print_format > ("unindent", unindent);
00168     define_constant<print_format > ("reset_indent", reset_indent);
00169     define_constant<print_format > ("cr", cr);
00170     define_constant<print_format > ("lf", lf);
00171     define_constant<print_format > ("hrule", hrule);
00172     define_constant<print_format > ("flush_now", flush_now);
00173     define_constant<print_format > ("black_foreground", black_foreground);
00174     define_constant<print_format > ("red_foreground", red_foreground);
00175     define_constant<print_format > ("green_foreground", green_foreground);
00176     define_constant<print_format > ("yellow_foreground", yellow_foreground);
00177     define_constant<print_format > ("blue_foreground", blue_foreground);
00178     define_constant<print_format > ("magenta_foreground", magenta_foreground);
00179     define_constant<print_format > ("cyan_foreground", cyan_foreground);
00180     define_constant<print_format > ("white_foreground", white_foreground);
00181     define_constant<print_format > ("black_background", black_background);
00182     define_constant<print_format > ("red_background", red_background);
00183     define_constant<print_format > ("green_background", green_background);
00184     define_constant<print_format > ("yellow_background", yellow_background);
00185     define_constant<print_format > ("blue_background", blue_background);
00186     define_constant<print_format > ("magenta_background", magenta_background);
00187     define_constant<print_format > ("cyan_background", cyan_background);
00188     define_constant<print_format > ("white_background", white_background);
00189     define_constant<print_format > ("bold", bold);
00190     define_constant<print_format > ("underline", underline);
00191     define_constant<print_format > ("blink", blink);
00192     define_constant<print_format > ("reset_attributes", reset_attributes);
00193     define_type<port > (lit ("Port"));
00194     define_constant<port > ("mmin", mmin);
00195     define_constant<port > ("mmout", mmout);
00196     define_constant<port > ("mmerr", mmerr);
00197     define ("input_string_port", GLUE_1);
00198     define ("input_file_port", GLUE_2);
00199     define ("output_file_port", GLUE_3);
00200     define ("socket_server_port", GLUE_4);
00201     define ("socket_client_port", GLUE_5);
00202     define ("pipe_port", GLUE_6);
00203     define ("composite_port", GLUE_7);
00204     define ("error_port", GLUE_8);
00205     define (".output_port?", GLUE_9);
00206     define (".input_port?", GLUE_10);
00207     define (".error?", GLUE_11);
00208     define (".error", GLUE_12);
00209     define (".busy?", GLUE_13);
00210     define (".can_write", GLUE_14);
00211     define (".can_read", GLUE_15);
00212     define ("write", GLUE_16);
00213     define ("read", GLUE_17);
00214     define ("flush", GLUE_18);
00215     define ("wait", GLUE_19);
00216     define ("accept", GLUE_20);
00217     define (".[]", GLUE_21);
00218     define ("wait", GLUE_22);
00219     define ("<<", GLUE_23);
00220     define ("<<", GLUE_24);
00221     define ("<<", GLUE_25);
00222     define ("binary_assemble", GLUE_26);
00223     define ("binary_disassemble", GLUE_27);
00224     define ("binary_write", GLUE_28);
00225     define ("binary_read", GLUE_29);
00226   }

void glue_routine (  ) 

Definition at line 108 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().

00108                   {
00109     static bool done = false;
00110     if (done) return;
00111     done = true;
00112     call_glue (string ("glue_basix_vector_generic"));
00113     define_type<vector<routine> > (gen (lit ("Vector"), lit ("Routine")));
00114     define ("vector", GLUE_1);
00115     define ("[]", GLUE_2);
00116     define_converter (":>", GLUE_3, PENALTY_CAST);
00117     define ("#", GLUE_4);
00118     define (".[]", GLUE_5);
00119     define (".[]", GLUE_6);
00120     define (".[]", GLUE_7);
00121     define ("reverse", GLUE_8);
00122     define ("><", GLUE_9);
00123     define ("<<", GLUE_10);
00124     define ("cons", GLUE_11);
00125     define ("car", GLUE_12);
00126     define ("cdr", GLUE_13);
00127     define ("nil?", GLUE_14);
00128     define ("atom?", GLUE_15);
00129     define ("insert", GLUE_16);
00130     define ("find", GLUE_17);
00131     define ("contains?", GLUE_18);
00132     define_converter (":>", GLUE_19, PENALTY_PROMOTE_GENERIC);
00133   }

void glue_storage (  ) 

Definition at line 83 of file glue_storage.cpp.

References call_glue(), define(), done(), 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(), and lit().

Referenced by glue_basix().

00083                   {
00084     static bool done = false;
00085     if (done) return;
00086     done = true;
00087     call_glue (string ("glue_string"));
00088     call_glue (string ("glue_basix_vector_generic"));
00089     call_glue (string ("glue_basix_table_generic"));
00090     define_type<storage > (lit ("Storage"));
00091     define ("disk_storage", GLUE_1);
00092     define ("disk_storage", GLUE_2);
00093     define ("cached_storage", GLUE_3);
00094     define ("write", GLUE_4);
00095     define ("read", GLUE_5);
00096     define ("lock", GLUE_6);
00097     define ("unlock", GLUE_7);
00098     define ("get_branch", GLUE_8);
00099     define ("has_branch?", GLUE_9);
00100     define ("get_file", GLUE_10);
00101     define ("has_file?", GLUE_11);
00102     define (".data", GLUE_12);
00103     define (".branches", GLUE_13);
00104     define (".files", GLUE_14);
00105   }

void glue_string (  ) 

Definition at line 127 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_21(), GLUE_22(), GLUE_23(), GLUE_3(), GLUE_4(), GLUE_5(), GLUE_6(), GLUE_7(), GLUE_8(), and GLUE_9().

Referenced by glue_basix().

00127                  {
00128     static bool done = false;
00129     if (done) return;
00130     done = true;
00131     call_glue (string ("glue_basix_vector_generic"));
00132     define ("string?", GLUE_1);
00133     define ("#", GLUE_2);
00134     define (".[]", GLUE_3);
00135     define ("*", GLUE_4);
00136     define ("><", GLUE_5);
00137     define ("<<", GLUE_6);
00138     define ("<", GLUE_7);
00139     define ("<=", GLUE_8);
00140     define (">", GLUE_9);
00141     define (">=", GLUE_10);
00142     define ("starts?", GLUE_11);
00143     define ("ends?", GLUE_12);
00144     define ("replace", GLUE_13);
00145     define ("search_forwards", GLUE_14);
00146     define ("search_backwards", GLUE_15);
00147     define ("upcase", GLUE_16);
00148     define ("locase", GLUE_17);
00149     define ("upcase_first", GLUE_18);
00150     define ("locase_first", GLUE_19);
00151     define ("quote", GLUE_20);
00152     define ("unquote", GLUE_21);
00153     define ("ascii", GLUE_22);
00154     define ("ascii_code", GLUE_23);
00155   }

void glue_syntactic (  ) 

Definition at line 134 of file glue_syntactic.cpp.

References call_glue(), 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_3(), GLUE_4(), GLUE_5(), GLUE_6(), GLUE_7(), GLUE_8(), GLUE_9(), lit(), and PENALTY_INCLUSION.

Referenced by glue_basix().

00134                     {
00135     static bool done = false;
00136     if (done) return;
00137     done = true;
00138     call_glue (string ("glue_expression"));
00139     define_type<syntactic > (lit ("Syntactic"));
00140     define ("syntactic", GLUE_1);
00141     define_converter (":>", GLUE_2, PENALTY_INCLUSION);
00142     define ("as_generic", GLUE_3);
00143     define ("as_string", GLUE_4);
00144     define ("flatten", GLUE_5);
00145     define ("apply", GLUE_6);
00146     define ("apply", GLUE_7);
00147     define ("apply", GLUE_8);
00148     define ("-", GLUE_9);
00149     define ("square", GLUE_10);
00150     define ("+", GLUE_11);
00151     define ("-", GLUE_12);
00152     define ("*", GLUE_13);
00153     define ("/", GLUE_14);
00154     define ("^", GLUE_15);
00155     define ("set_frac_flag", GLUE_16);
00156     define ("ordered_sum", GLUE_17);
00157     define ("ordered_product", GLUE_18);
00158     define ("<", GLUE_19);
00159     define ("<=", GLUE_20);
00160     define (">", GLUE_21);
00161     define (">=", GLUE_22);
00162   }

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().

00163                    {
00164   static bool done = false;
00165   if (done) return;
00166   done = true;
00167   register_glue ("glue_vector_map", &glue_vector_map);
00168   call_glue ("glue_basix_vector_generic");
00169   define ("map", vector_map);
00170   define ("foreach", vector_foreach);
00171   define ("append", vector_append_several);
00172   define ("apply", vector_apply);
00173   define ("sort", vector_sort);
00174   define ("sort", vector_sort_leq);
00175 }

bool mmx::gtr_operator ( const T &  x,
const T &  y 
) [inline]

Definition at line 40 of file operators.hpp.

00040 { return x>y; }

bool mmx::gtreq_operator ( const T &  x,
const T &  y 
) [inline]

Definition at line 41 of file operators.hpp.

00041 { return x>=y; }

static void mmx::handle_completion_request ( const string request  )  [static]

Definition at line 128 of file texmacs_interface.cpp.

References complete(), mmerr, N(), output_completion(), parse_completion_request(), and pos.

Referenced by shell_texmacs_input().

00128                                                   {
00129   string text;
00130   nat pos, i, p;
00131   p = 0;
00132   pos = 0;
00133   if (!parse_completion_request (request, pos, text, p)
00134       || p < 1 || p >= N(request)) {
00135     output_completion ("", list<string>());
00136     mmerr << "mmx warning: ignoring texmacs request" << "\n";
00137     return;
00138   }
00139   i=p-1;
00140   while (i+1 > 0 && ((text[i] >= 'a' && text[i] <= 'z')
00141                      || (text[i] >= 'A' && text[i] <= 'Z')
00142                      || text[i] == '_'))
00143     i--;
00144   complete (text (i+1, p));
00145 }

bool mmx::hard_eq ( const updater x,
const updater y 
) [inline]

Definition at line 133 of file dynamic.cpp.

00139 : public observer_rep {

bool mmx::hard_eq ( const vector< C, V > &  x,
const vector< C, V > &  y 
) [inline]

Definition at line 207 of file vector.hpp.

00210 { return v->n; }

bool mmx::hard_eq ( const format< C > &  x,
const format< C > &  y 
) [inline]

Definition at line 221 of file type_props.hpp.

00221 { return true; }

bool mmx::hard_eq ( const triple< C1, C2, C3 > &  x,
const triple< C1, C2, C3 > &  y 
) [inline]

Definition at line 60 of file triple.hpp.

00063 {

bool mmx::hard_eq ( const task &  x,
const task &  y 
) [inline]

Definition at line 41 of file threads.hpp.

bool mmx::hard_eq ( const table< C, T, V > &  x,
const table< C, T, V > &  y 
) [inline]

Definition at line 157 of file table.hpp.

00162 { return t->tfm1 (); }

bool mmx::hard_eq ( const syntactic &  c1,
const syntactic &  c2 
) [inline]

Definition at line 58 of file syntactic.hpp.

References hard_eq().

00058                                                                {
00059   return hard_eq (*c1, *c2); }

bool mmx::hard_eq ( const symbol< C, V > &  x,
const symbol< C, V > &  y 
) [inline]

Definition at line 92 of file symbol.hpp.

00094 {

bool mmx::hard_eq ( const string &  x,
const string &  y 
) [inline]

Definition at line 105 of file string.hpp.

00108 { return copy (s); }

bool mmx::hard_eq ( const storage x,
const storage y 
) [inline]

Definition at line 53 of file storage.hpp.

00057 { return "storage"; }

bool mmx::hard_eq ( const sparse_vector< C, T, V > &  x,
const sparse_vector< C, T, V > &  y 
) [inline]

Definition at line 96 of file sparse_vector.hpp.

00098 { return v.rep->n; }

bool mmx::hard_eq ( const routine x,
const routine y 
) [inline]

Definition at line 96 of file routine.hpp.

00098 {

bool mmx::hard_eq ( const primitive &  x,
const primitive &  y 
) [inline]

Definition at line 43 of file primitive.hpp.

00045 {

bool mmx::hard_eq ( const port &  x,
const port &  y 
) [inline]

Definition at line 61 of file port.hpp.

00066 { return p->expression (); }

bool mmx::hard_eq ( const pair< C1, C2 > &  x,
const pair< C1, C2 > &  y 
) [inline]

Definition at line 55 of file pair.hpp.

00058 {

bool mmx::hard_eq ( const new_table< C, T, V > &  x,
const new_table< C, T, V > &  y 
) [inline]

Definition at line 179 of file new_table.hpp.

00184 { return t->tfm1 (); }

bool mmx::hard_eq ( const Indirect< R > &  x,
const Indirect< R > &  y 
) [inline]

Definition at line 762 of file mmc_glue.hpp.

References Indirect< R >::rep.

00762                                                                       {
00763   return x.rep == y.rep; }

bool mmx::hard_eq ( const literal c1,
const literal c2 
) [inline]

Definition at line 52 of file literal.hpp.

References as_string(), and hard_eq().

00052                                                            {
00053   return hard_eq (as_string (c1), as_string (c2)); }

bool mmx::hard_eq ( const list< C > &  x,
const list< C > &  y 
) [inline]

Definition at line 127 of file list.hpp.

00127                                                         {
00128   return (x.operator -> ()) == (y.operator -> ()); }

bool mmx::hard_eq ( const iterator< C > &  x,
const iterator< C > &  y 
) [inline]

Definition at line 95 of file iterator.hpp.

00097 { return it.rep->is_busy (); }

bool mmx::hard_eq ( const heap< C > &  x,
const heap< C > &  y 
) [inline]

Definition at line 96 of file heap.hpp.

bool mmx::hard_eq ( const generic_function x,
const generic_function y 
) [inline]

Definition at line 47 of file generic_function.hpp.

00049 {

bool mmx::hard_eq ( const generic &  x,
const generic &  y 
) [inline]

Definition at line 146 of file generic.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 609 of file function.hpp.

00609                                                                 {
00610   return (f.rep) == (g.rep); }

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 549 of file function.hpp.

00549                                                                 {
00550   return (f.rep) == (g.rep); }

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 489 of file function.hpp.

00489                                                                 {
00490   return (f.rep) == (g.rep); }

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 430 of file function.hpp.

00430                                                                 {
00431   return (f.rep) == (g.rep); }

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 371 of file function.hpp.

00371                                                                 {
00372   return (f.rep) == (g.rep); }

bool mmx::hard_eq ( const function_3< D, S1, S2, S3 > &  f,
const function_3< D, S1, S2, S3 > &  g 
) [inline]

Definition at line 312 of file function.hpp.

00312                                                                 {
00313   return (f.rep) == (g.rep); }

bool mmx::hard_eq ( const function_2< D, S1, S2 > &  f,
const function_2< D, S1, S2 > &  g 
) [inline]

Definition at line 253 of file function.hpp.

00253                                                                 {
00254   return (f.rep) == (g.rep); }

bool mmx::hard_eq ( const function_1< D, S1 > &  f,
const function_1< D, S1 > &  g 
) [inline]

Definition at line 153 of file function.hpp.

00153                                                                 {
00154   return (f.rep) == (g.rep); }

bool mmx::hard_eq ( const function_0< D > &  f,
const function_0< D > &  g 
) [inline]

Definition at line 97 of file function.hpp.

00097                                                                 {
00098   return (f.rep) == (g.rep); }

bool mmx::hard_eq ( const exception &  e1,
const exception &  e2 
) [inline]

Definition at line 47 of file exception.hpp.

References hard_eq().

00047                                                                {
00048   return hard_eq (*e1, *e2); }

bool mmx::hard_eq ( const evaluator &  x,
const evaluator &  y 
) [inline]

Definition at line 65 of file evaluator.hpp.

bool mmx::hard_eq ( const dynamic x,
const dynamic y 
) [inline]

Definition at line 85 of file dynamic.hpp.

00090 { return inside (d) -> val; }

bool mmx::hard_eq ( const observer x,
const observer y 
) [inline]

Definition at line 56 of file dynamic.hpp.

00065 : public rep_struct {

bool mmx::hard_eq ( const document c1,
const document c2 
) [inline]

Definition at line 59 of file document.hpp.

References hard_eq().

00059                                                              {
00060   return hard_eq (*c1, *c2); }

bool mmx::hard_eq ( const compound c1,
const compound c2 
) [inline]

Definition at line 57 of file compound.hpp.

References as_vector(), and hard_eq().

00057                                                              {
00058   return hard_eq (as_vector (c1), as_vector (c2)); }

bool mmx::hard_eq ( const chain< C > &  x,
const chain< C > &  y 
) [inline]

Definition at line 118 of file chain.hpp.

00118                                                           {
00119   return (x.operator -> ()) == (y.operator -> ()); }

bool mmx::hard_eq ( const cache< C, T > &  c1,
const cache< C, T > &  c2 
) [inline]

Definition at line 50 of file cache.hpp.

References hard_eq().

00050                                                             {
00051   return hard_eq (*c1, *c2); }

bool mmx::hard_eq ( const C &  x,
const C &  y 
) [inline]
bool mmx::hard_gtr ( const C &  x,
const C &  y 
) [inline]

Definition at line 275 of file basix.hpp.

References inside().

Referenced by hard_gtr_op::op().

00275                                                                    {
00276   return ((void*) inside (x)) > ((void*) inside (y)); }

nat mmx::hard_hash ( const updater x  )  [inline]

Definition at line 133 of file dynamic.cpp.

00139 : public observer_rep {

nat mmx::hard_hash ( const vector< C, V > &  x  )  [inline]

Definition at line 207 of file vector.hpp.

00210 { return v->n; }

nat mmx::hard_hash ( const format< C > &  x  )  [inline]

Definition at line 233 of file type_props.hpp.

00233 { return 0; }

nat mmx::hard_hash ( const triple< C1, C2, C3 > &  x  )  [inline]

Definition at line 60 of file triple.hpp.

00063 {

nat mmx::hard_hash ( const task &  x  )  [inline]

Definition at line 41 of file threads.hpp.

nat mmx::hard_hash ( const table< C, T, V > &  x  )  [inline]

Definition at line 157 of file table.hpp.

00162 { return t->tfm1 (); }

nat mmx::hard_hash ( const syntactic &  c  )  [inline]

Definition at line 49 of file syntactic.hpp.

References hard_hash().

00049 { return hard_hash (*c); }

nat mmx::hard_hash ( const symbol< C, V > &  x  )  [inline]

Definition at line 92 of file symbol.hpp.

00094 {

nat mmx::hard_hash ( const string &  x  )  [inline]

Definition at line 105 of file string.hpp.

00108 { return copy (s); }

nat mmx::hard_hash ( const storage x  )  [inline]

Definition at line 53 of file storage.hpp.

00057 { return "storage"; }

nat mmx::hard_hash ( const sparse_vector< C, T, V > &  x  )  [inline]

Definition at line 96 of file sparse_vector.hpp.

00098 { return v.rep->n; }

nat mmx::hard_hash ( const routine x  )  [inline]

Definition at line 96 of file routine.hpp.

00098 {

nat mmx::hard_hash ( const primitive &  x  )  [inline]

Definition at line 43 of file primitive.hpp.

00045 {

nat mmx::hard_hash ( const port &  x  )  [inline]

Definition at line 61 of file port.hpp.

00066 { return p->expression (); }

nat mmx::hard_hash ( const pair< C1, C2 > &  x  )  [inline]

Definition at line 55 of file pair.hpp.

00058 {

nat mmx::hard_hash ( const new_table< C, T, V > &  x  )  [inline]

Definition at line 179 of file new_table.hpp.

00184 { return t->tfm1 (); }

nat mmx::hard_hash ( const Indirect< R > &  x  )  [inline]

Definition at line 770 of file mmc_glue.hpp.

References as_hash(), and Indirect< R >::rep.

00770                                                  {
00771   return as_hash (x.rep); }

nat mmx::hard_hash ( const literal c  )  [inline]

Definition at line 43 of file literal.hpp.

References as_string(), and hard_hash().

00043 { return hard_hash (as_string (c)); }

nat mmx::hard_hash ( const list< C > &  x  )  [inline]

Definition at line 125 of file list.hpp.

References as_hash().

00125                                           {
00126   return as_hash (x.operator -> ()); }

nat mmx::hard_hash ( const iterator< C > &  x  )  [inline]

Definition at line 95 of file iterator.hpp.

00097 { return it.rep->is_busy (); }

nat mmx::hard_hash ( const heap< C > &  x  )  [inline]

Definition at line 96 of file heap.hpp.

nat mmx::hard_hash ( const generic_function x  )  [inline]

Definition at line 47 of file generic_function.hpp.

00049 {

nat mmx::hard_hash ( const generic &  x  )  [inline]

Definition at line 146 of file generic.hpp.

nat mmx::hard_hash ( const function_8< D, S1, S2, S3, S4, S5, S6, S7, S8 > &  f  )  [inline]

Definition at line 607 of file function.hpp.

References as_hash().

00607                                               {
00608   return as_hash (f.rep); }

nat mmx::hard_hash ( const function_7< D, S1, S2, S3, S4, S5, S6, S7 > &  f  )  [inline]

Definition at line 547 of file function.hpp.

References as_hash().

00547                                               {
00548   return as_hash (f.rep); }

nat mmx::hard_hash ( const function_6< D, S1, S2, S3, S4, S5, S6 > &  f  )  [inline]

Definition at line 487 of file function.hpp.

References as_hash().

00487                                               {
00488   return as_hash (f.rep); }

nat mmx::hard_hash ( const function_5< D, S1, S2, S3, S4, S5 > &  f  )  [inline]

Definition at line 428 of file function.hpp.

References as_hash().

00428                                               {
00429   return as_hash (f.rep); }

nat mmx::hard_hash ( const function_4< D, S1, S2, S3, S4 > &  f  )  [inline]

Definition at line 369 of file function.hpp.

References as_hash().

00369                                               {
00370   return as_hash (f.rep); }

nat mmx::hard_hash ( const function_3< D, S1, S2, S3 > &  f  )  [inline]

Definition at line 310 of file function.hpp.

References as_hash().

00310                                               {
00311   return as_hash (f.rep); }

nat mmx::hard_hash ( const function_2< D, S1, S2 > &  f  )  [inline]

Definition at line 251 of file function.hpp.

References as_hash().

00251                                               {
00252   return as_hash (f.rep); }

nat mmx::hard_hash ( const function_1< D, S1 > &  f  )  [inline]

Definition at line 151 of file function.hpp.

References as_hash().

00151                                               {
00152   return as_hash (f.rep); }

nat mmx::hard_hash ( const function_0< D > &  f  )  [inline]

Definition at line 95 of file function.hpp.

References as_hash().

00095                                               {
00096   return as_hash (f.rep); }

nat mmx::hard_hash ( const exception &  e  )  [inline]

Definition at line 38 of file exception.hpp.

References hard_hash().

00038 { return hard_hash (*e); }

nat mmx::hard_hash ( const evaluator &  x  )  [inline]

Definition at line 65 of file evaluator.hpp.

nat mmx::hard_hash ( const dynamic x  )  [inline]

Definition at line 85 of file dynamic.hpp.

00090 { return inside (d) -> val; }

nat mmx::hard_hash ( const observer x  )  [inline]

Definition at line 56 of file dynamic.hpp.

00065 : public rep_struct {

nat mmx::hard_hash ( const document c  )  [inline]

Definition at line 50 of file document.hpp.

References hard_hash().

00050 { return hard_hash (*c); }

nat mmx::hard_hash ( const compound c  )  [inline]

Definition at line 47 of file compound.hpp.

References as_vector(), and hard_hash().

00047                                          {
00048   return hard_hash (as_vector (c)); }

nat mmx::hard_hash ( const chain< C > &  x  )  [inline]

Definition at line 116 of file chain.hpp.

References as_hash().

00116                                            {
00117   return as_hash (x.operator -> ()); }

nat mmx::hard_hash ( const cache< C, T > &  c  )  [inline]

Definition at line 41 of file cache.hpp.

References hard_hash().

00041 { return hard_hash (*c); }

nat mmx::hard_hash ( const C &  x  )  [inline]
bool mmx::hard_less ( const C &  x,
const C &  y 
) [inline]

Definition at line 273 of file basix.hpp.

References inside().

Referenced by hard_less_op::op().

00273                                                                     {
00274   return ((void*) inside (x)) < ((void*) inside (y)); }

bool mmx::hard_neq ( const updater x,
const updater y 
) [inline]

Definition at line 133 of file dynamic.cpp.

00139 : public observer_rep {

bool mmx::hard_neq ( const vector< C, V > &  x,
const vector< C, V > &  y 
) [inline]

Definition at line 207 of file vector.hpp.

00210 { return v->n; }

bool mmx::hard_neq ( const format< C > &  x,
const format< C > &  y 
) [inline]

Definition at line 224 of file type_props.hpp.

00224 { return false; }

bool mmx::hard_neq ( const triple< C1, C2, C3 > &  x,
const triple< C1, C2, C3 > &  y 
) [inline]

Definition at line 60 of file triple.hpp.

00063 {

bool mmx::hard_neq ( const task &  x,
const task &  y 
) [inline]

Definition at line 41 of file threads.hpp.

bool mmx::hard_neq ( const table< C, T, V > &  x,
const table< C, T, V > &  y 
) [inline]

Definition at line 157 of file table.hpp.

00162 { return t->tfm1 (); }

bool mmx::hard_neq ( const syntactic &  c1,
const syntactic &  c2 
) [inline]

Definition at line 60 of file syntactic.hpp.

References hard_neq().

00060                                                                 {
00061   return hard_neq (*c1, *c2); }

bool mmx::hard_neq ( const symbol< C, V > &  x,
const symbol< C, V > &  y 
) [inline]

Definition at line 92 of file symbol.hpp.

00094 {

bool mmx::hard_neq ( const string &  x,
const string &  y 
) [inline]

Definition at line 105 of file string.hpp.

00108 { return copy (s); }

bool mmx::hard_neq ( const storage x,
const storage y 
) [inline]

Definition at line 53 of file storage.hpp.

00057 { return "storage"; }

bool mmx::hard_neq ( const sparse_vector< C, T, V > &  x,
const sparse_vector< C, T, V > &  y 
) [inline]

Definition at line 96 of file sparse_vector.hpp.

00098 { return v.rep->n; }

bool mmx::hard_neq ( const routine x,
const routine y 
) [inline]

Definition at line 96 of file routine.hpp.

00098 {

bool mmx::hard_neq ( const primitive &  x,
const primitive &  y 
) [inline]

Definition at line 43 of file primitive.hpp.

00045 {

bool mmx::hard_neq ( const port &  x,
const port &  y 
) [inline]

Definition at line 61 of file port.hpp.

00066 { return p->expression (); }

bool mmx::hard_neq ( const pair< C1, C2 > &  x,
const pair< C1, C2 > &  y 
) [inline]

Definition at line 55 of file pair.hpp.

00058 {

bool mmx::hard_neq ( const new_table< C, T, V > &  x,
const new_table< C, T, V > &  y 
) [inline]

Definition at line 179 of file new_table.hpp.

00184 { return t->tfm1 (); }

bool mmx::hard_neq ( const Indirect< R > &  x,
const Indirect< R > &  y 
) [inline]

Definition at line 764 of file mmc_glue.hpp.

References Indirect< R >::rep.

00764                                                                        {
00765   return x.rep != y.rep; }

bool mmx::hard_neq ( const literal c1,
const literal c2 
) [inline]

Definition at line 54 of file literal.hpp.

References as_string(), and hard_neq().

00054                                                             {
00055   return hard_neq (as_string (c1), as_string (c2)); }

bool mmx::hard_neq ( const list< C > &  x,
const list< C > &  y 
) [inline]

Definition at line 129 of file list.hpp.

00129                                                          {
00130   return (x.operator -> ()) != (y.operator -> ()); }

bool mmx::hard_neq ( const iterator< C > &  x,
const iterator< C > &  y 
) [inline]

Definition at line 95 of file iterator.hpp.

00097 { return it.rep->is_busy (); }

bool mmx::hard_neq ( const heap< C > &  x,
const heap< C > &  y 
) [inline]

Definition at line 96 of file heap.hpp.

bool mmx::hard_neq ( const generic_function x,
const generic_function y 
) [inline]

Definition at line 47 of file generic_function.hpp.

00049 {

bool mmx::hard_neq ( const generic &  x,
const generic &  y 
) [inline]

Definition at line 146 of file generic.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 611 of file function.hpp.

00611                                                                  {
00612   return (f.rep) != (g.rep); }

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 551 of file function.hpp.

00551                                                                  {
00552   return (f.rep) != (g.rep); }

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 491 of file function.hpp.

00491                                                                  {
00492   return (f.rep) != (g.rep); }

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 432 of file function.hpp.

00432                                                                  {
00433   return (f.rep) != (g.rep); }

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 373 of file function.hpp.

00373                                                                  {
00374   return (f.rep) != (g.rep); }

bool mmx::hard_neq ( const function_3< D, S1, S2, S3 > &  f,
const function_3< D, S1, S2, S3 > &  g 
) [inline]

Definition at line 314 of file function.hpp.

00314                                                                  {
00315   return (f.rep) != (g.rep); }

bool mmx::hard_neq ( const function_2< D, S1, S2 > &  f,
const function_2< D, S1, S2 > &  g 
) [inline]

Definition at line 255 of file function.hpp.

00255                                                                  {
00256   return (f.rep) != (g.rep); }

bool mmx::hard_neq ( const function_1< D, S1 > &  f,
const function_1< D, S1 > &  g 
) [inline]

Definition at line 155 of file function.hpp.

00155                                                                  {
00156   return (f.rep) != (g.rep); }

bool mmx::hard_neq ( const function_0< D > &  f,
const function_0< D > &  g 
) [inline]

Definition at line 99 of file function.hpp.

00099                                                                  {
00100   return (f.rep) != (g.rep); }

bool mmx::hard_neq ( const exception &  e1,
const exception &  e2 
) [inline]

Definition at line 49 of file exception.hpp.

References hard_neq().

00049                                                                 {
00050   return hard_neq (*e1, *e2); }

bool mmx::hard_neq ( const evaluator &  x,
const evaluator &  y 
) [inline]

Definition at line 65 of file evaluator.hpp.

bool mmx::hard_neq ( const dynamic x,
const dynamic y 
) [inline]

Definition at line 85 of file dynamic.hpp.

00090 { return inside (d) -> val; }

bool mmx::hard_neq ( const observer x,
const observer y 
) [inline]

Definition at line 56 of file dynamic.hpp.

00065 : public rep_struct {

bool mmx::hard_neq ( const document c1,
const document c2 
) [inline]

Definition at line 61 of file document.hpp.

References hard_neq().

00061                                                               {
00062   return hard_neq (*c1, *c2); }

bool mmx::hard_neq ( const compound c1,
const compound c2 
) [inline]

Definition at line 59 of file compound.hpp.

References as_vector(), and hard_neq().

00059                                                               {
00060   return hard_neq (as_vector (c1), as_vector (c2)); }

bool mmx::hard_neq ( const chain< C > &  x,
const chain< C > &  y 
) [inline]

Definition at line 120 of file chain.hpp.

00120                                                            {
00121   return (x.operator -> ()) != (y.operator -> ()); }

bool mmx::hard_neq ( const cache< C, T > &  c1,
const cache< C, T > &  c2 
) [inline]

Definition at line 52 of file cache.hpp.

References hard_neq().

00052                                                              {
00053   return hard_neq (*c1, *c2); }

bool mmx::hard_neq ( const C &  x,
const C &  y 
) [inline]

Definition at line 271 of file basix.hpp.

References exact_neq().

Referenced by exact_neq(), hard_neq(), hard_eq_op::not_op(), hard_neq_op::op(), and operator!=().

00271                                                                    {
00272   return exact_neq (x, y); }

bool mmx::has_branch ( const storage st,
const string br 
) [inline]

Get branch br from storage st and create one if the branch does not exist.

Definition at line 82 of file storage.hpp.

Referenced by GLUE_9().

00082                                                              {
00083   return st->has_branch (br); }

bool mmx::has_file ( const storage st,
const string orig 
) [inline]

Get a shadow name for a file orig on the storage, with the same extension.

Definition at line 88 of file storage.hpp.

Referenced by GLUE_11().

00088                                                              {
00089   return st->has_file (orig); }

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().

00084                                {
00085   if (!is<exception> (exc)) return false;
00086   generic msg= *as<exception> (exc);
00087   return
00088     is_func (msg, GEN_EXCEPTION, 2) &&
00089     is_func (msg[2], GEN_BACKTRACE, 2);
00090 }

nat mmx::hash ( const string obj->lex_string  ) 

Definition at line 61 of file string.cpp.

References N().

00061                        {
00062   register const char* a= S(s);
00063   register nat i, h=0, n= N(s);
00064   for (i=0; i<n; i++)
00065     h= (h<<1) ^ (h<<9) ^ (h>>23) ^ ((nat) a[i]);
00066   return h;
00067 }

nat mmx::hash ( const cpp_printer p  )  [inline]

Definition at line 293 of file cpp_printer.cpp.

00293                             {
00294   return 0;
00295 }

nat mmx::hash ( const vector< C, V > &  x  )  [inline]

Definition at line 1151 of file vector.hpp.

01159 {

nat mmx::hash ( const format< C > &  x  )  [inline]

Definition at line 227 of file type_props.hpp.

00227 { return 0; }

nat mmx::hash ( const triple< C1, C2, C3 > &  x  )  [inline]

Definition at line 58 of file triple.hpp.

00063 {

nat mmx::hash ( const table< C, T, V > &  x  )  [inline]

Definition at line 693 of file table.hpp.

00698 { return unary_map<sqrt_op> (t); }

nat mmx::hash ( const syntactic &  c  )  [inline]

Definition at line 47 of file syntactic.hpp.

References hash().

00047 { return hash (*c); }

nat mmx::hash ( const symbol< C, equal_table > &  s  )  [inline]

Definition at line 117 of file symbol.hpp.

References exact_hash().

00117                                                                       {
00118   return exact_hash (s); }

nat hash ( const symbol< C, V > &  s  )  [inline]

Definition at line 103 of file symbol.hpp.

References hash().

00103                                        {
00104   return hash (*s); }

nat mmx::hash ( const storage x  )  [inline]

Definition at line 56 of file storage.hpp.

00057 { return "storage"; }

nat mmx::hash ( const sparse_vector< C, T, V > &  x  )  [inline]

Definition at line 168 of file sparse_vector.hpp.

00176 {

nat mmx::hash ( const port &  x  )  [inline]

Definition at line 64 of file port.hpp.

00066 { return p->expression (); }

nat mmx::hash ( const pair< C1, C2 > &  x  )  [inline]

Definition at line 53 of file pair.hpp.

00058 {

nat mmx::hash ( const new_table< C, T, V > &  x  )  [inline]

Definition at line 764 of file new_table.hpp.

00769 { return unary_map<sqrt_op> (t); }

nat mmx::hash ( const Indirect< R > &  x  )  [inline]

Definition at line 766 of file mmc_glue.hpp.

References as_hash(), and Indirect< R >::rep.

00766                                             {
00767   return as_hash (x.rep); }

nat mmx::hash ( const literal c  )  [inline]

Definition at line 41 of file literal.hpp.

References hash().

00041 { return hash (as_symbol (c)); }

nat mmx::hash ( const list< C > &  x  )  [inline]

Definition at line 228 of file list.hpp.

00236 {

nat hash ( const iterator< C > &  it  )  [inline]

Definition at line 185 of file iterator.hpp.

00195 : public Iterator_rep {

nat mmx::hash ( const heap< C > &  x  )  [inline]

Definition at line 243 of file heap.hpp.

00247 {

nat mmx::hash ( const generic &  g  )  [inline]

Definition at line 162 of file generic.hpp.

00162                                    {
00163   return g->get_hash_value (); }

nat mmx::hash ( const function_8< D, S1, S2, S3, S4, S5, S6, S7, S8 > &  x  )  [inline]

Definition at line 614 of file function.hpp.

00615 {

nat mmx::hash ( const function_7< D, S1, S2, S3, S4, S5, S6, S7 > &  x  )  [inline]

Definition at line 554 of file function.hpp.

00555 {

nat mmx::hash ( const function_6< D, S1, S2, S3, S4, S5, S6 > &  x  )  [inline]

Definition at line 494 of file function.hpp.

00495 {

nat mmx::hash ( const function_5< D, S1, S2, S3, S4, S5 > &  x  )  [inline]

Definition at line 435 of file function.hpp.

00436 {

nat mmx::hash ( const function_4< D, S1, S2, S3, S4 > &  x  )  [inline]

Definition at line 376 of file function.hpp.

00377 {

nat mmx::hash ( const function_3< D, S1, S2, S3 > &  x  )  [inline]

Definition at line 317 of file function.hpp.

00318 {

nat mmx::hash ( const function_2< D, S1, S2 > &  x  )  [inline]

Definition at line 258 of file function.hpp.

00259 {

nat mmx::hash ( const function_1< D, S1 > &  x  )  [inline]

Definition at line 158 of file function.hpp.

00159 {

nat mmx::hash ( const function_0< D > &  x  )  [inline]

Definition at line 102 of file function.hpp.

00103 {

nat mmx::hash ( const exception &  e  )  [inline]

Definition at line 36 of file exception.hpp.

References hash().

00036 { return hash (*e); }

nat mmx::hash ( const dynamic x  )  [inline]

Definition at line 96 of file dynamic.hpp.

nat mmx::hash ( const observer x  )  [inline]

Definition at line 59 of file dynamic.hpp.

00065 : public rep_struct {

nat mmx::hash ( const document c  )  [inline]

Definition at line 48 of file document.hpp.

References hash().

00048 { return hash (*c); }

nat mmx::hash ( const compound c  )  [inline]

Definition at line 43 of file compound.hpp.

References hash().

00043                                     {
00044   return hash (as_symbol (c)); }

nat mmx::hash ( const cache< C, T > &  c  )  [inline]

Definition at line 39 of file cache.hpp.

References hard_hash().

00039 { return hard_hash (*c); }

nat mmx::hash ( C *  p  )  [inline]

Definition at line 204 of file basix.hpp.

References as_hash().

00204 { return as_hash (p); }

nat mmx::hash ( const double &  x  )  [inline]

Definition at line 201 of file basix.hpp.

References n.

00201                                   {
00202   union { nat n; double d; } u;
00203   u.d= x; return u.n; }

nat mmx::hash ( const float &  x  )  [inline]

Definition at line 199 of file basix.hpp.

00199                                  {
00200   return (*((nat*) ((void*) &x))) & 0xffffffff; }

nat mmx::hash ( long long unsigned int  c  )  [inline]

Definition at line 196 of file basix.hpp.

00196                                            {
00197   nat h = (nat) ((c >> (4 * sizeof (long int))) >> (4 * sizeof (long int)));
00198   return (h<<1) ^ (h<<5) ^ (h>>27) ^ ((nat) c); }

nat mmx::hash ( long long int  c  )  [inline]

Definition at line 193 of file basix.hpp.

00193                                   {
00194   nat h = (nat) ((c >> (4 * sizeof (long int))) >> (4 * sizeof (long int)));
00195   return (h<<1) ^ (h<<5) ^ (h>>27) ^ ((nat) c); }

nat mmx::hash ( long unsigned int  c  )  [inline]

Definition at line 192 of file basix.hpp.

00192 { return (nat) c; }

nat mmx::hash ( long int  c  )  [inline]

Definition at line 191 of file basix.hpp.

00191 { return (nat) c; }

nat mmx::hash ( unsigned int  c  )  [inline]

Definition at line 190 of file basix.hpp.

00190 { return (nat) c; }

nat mmx::hash ( int  c  )  [inline]

Definition at line 189 of file basix.hpp.

00189 { return (nat) c; }

nat mmx::hash ( short unsigned int  c  )  [inline]

Definition at line 188 of file basix.hpp.

00188 { return (nat) c; }

nat mmx::hash ( short int  c  )  [inline]

Definition at line 187 of file basix.hpp.

00187 { return (nat) c; }

nat mmx::hash ( unsigned char  c  )  [inline]

Definition at line 186 of file basix.hpp.

00186 { return (nat) c; }

nat mmx::hash ( signed char  c  )  [inline]

Definition at line 185 of file basix.hpp.

00185 { return (nat) c; }

nat mmx::hash ( char  c  )  [inline]
nat mmx::hash_combine ( nat  i,
nat  j 
) [inline]

Definition at line 49 of file mmc_glue.hpp.

00049 { return (i << 7) ^ (i >> 25) ^ j; }

generic mmx::hlist ( const vector< generic > &  v  )  [inline]

Definition at line 145 of file mmx_printer.cpp.

References gen().

00145                                                 {
00146   return gen ("$hlist", v); }

syntactic hypot ( const syntactic g1,
const syntactic g2 
)

Definition at line 445 of file syntactic.cpp.

References GEN_HYPOT, and syn().

00445                                                            {
00446   return syn (GEN_HYPOT, g1, g2); }

generic hypot ( const generic x1,
const generic x2 
)

Definition at line 517 of file generic.cpp.

References ACC_BINARY, ACC_HYPOT, sqrt(), and square().

00517                                            {
00518   ACC_BINARY (ACC_HYPOT, x, y);
00519   return sqrt (square (x) + square (y));
00520 }

double hypot ( const double &  x,
const double &  y 
) [inline]

Definition at line 58 of file double.hpp.

References hypot().

00058                                                        {
00059   return ::hypot (x, y); }

C mmx::hypot ( const C &  x,
const C &  y 
) [inline]

Definition at line 573 of file defaults.hpp.

References sqrt(), and square().

Referenced by hypot(), hypot_op::op(), and hypot_op::set_op().

00573                                {
00574   return sqrt (square (x) + square (y));
00575 }

const C & I ( const table< C, T, V > &  t  )  [inline]

Definition at line 215 of file table.hpp.

00215                    {
00216   t->lazy_initialize ();
00217   return *t->init;
00218 }

C & I ( table< C, T, V > &  t  )  [inline]

Definition at line 209 of file table.hpp.

00209              {
00210   t->lazy_initialize ();
00211   return *t->init;
00212 }

const C & I ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 232 of file new_table.hpp.

00232                    {
00233   t->lazy_initialize ();
00234   return *t->init;
00235 }

C & I ( new_table< C, T, V > &  t  )  [inline]
routine identity_routine ( const vector< nat > &  sig  ) 

Definition at line 112 of file routine.cpp.

References ASSERT, and N().

00112                                           {
00113   // WARNING: we do allow for "fake identity functions" with sig[0] != sig[1]
00114   // This is useful for fast conversions to generic
00115   ASSERT (N(sig) == 2, "identity routine should take one argument");
00116   return new identity_routine_rep (sig);
00117 }

vector<typename unary_return_type_helper<Re_op, C >::RET,V> mmx::Im ( const vector< C, V > &  v  )  [inline]

Definition at line 1342 of file vector.hpp.

01342 { return unary_map<Im_op> (v); }

syntactic Im ( const syntactic g1  ) 

Definition at line 451 of file syntactic.cpp.

References GEN_IM, and syn().

00451 { return syn (GEN_IM, g1); }

generic Im ( const generic x1  ) 

Definition at line 736 of file generic.cpp.

References current_ev, and GEN_IM.

00736                                {
00737   return current_ev->apply (GEN_IM, x1); }

C mmx::Im ( const C &  x  )  [inline]

Definition at line 717 of file defaults.hpp.

Referenced by Im_op::op(), Im_op::Real_type(), and Im_op::set_op().

00717 { return 0; }

C mmx::imaginary_cst ( const format< C > &  fm  )  [inline]

Definition at line 936 of file type_props.hpp.

References C, promote(), and set_imaginary().

00936                                     {
00937   C r= promote (0, fm); set_imaginary (r); return r; }

C mmx::imaginary_cst (  )  [inline]

Definition at line 902 of file type_props.hpp.

References C, and set_imaginary().

00902 { C r; set_imaginary (r); return r; }

alias<C> mmx::incarnate_genalias ( const generic_alias< C > &  a  )  [inline]

Definition at line 166 of file alias.hpp.

00166                                                                     {
00167   return new incarnate_alias_rep<C> (a); }

generic incexp2 ( const generic x1,
const xint &  x2 
)

Definition at line 789 of file generic.cpp.

References current_ev.

00789                                                     {
00790   return current_ev->apply ("increase_exponent", x1, as<generic> ((int) x2)); }

void incexp2 ( double &  x,
const double &  y,
const S &  z 
) [inline]

Definition at line 108 of file double.hpp.

00108 { x= ldexp (y, z); }

double incexp2 ( const double &  x  )  [inline]

Definition at line 104 of file double.hpp.

00104 { return ldexp (x, 1); }

double incexp2 ( const double &  x,
const S &  y 
) [inline]

Definition at line 102 of file double.hpp.

00102 { return ldexp (x, y); }

void mmx::incexp2 ( C &  x,
const C &  y,
const S &  z 
) [inline]

Definition at line 330 of file defaults.hpp.

00330 { x= y << z; }

C mmx::incexp2 ( const C &  x  )  [inline]

Definition at line 326 of file defaults.hpp.

00326 { return incexp2<C,xint> (x, 1); }

C mmx::incexp2 ( const C &  x,
const S &  y 
) [inline]

Definition at line 324 of file defaults.hpp.

Referenced by GLUE_49(), incexp2_op::op(), and incexp2_op::set_op().

00324 { return x << y; }

void incexp2_assign ( double &  x,
const S &  y 
) [inline]

Definition at line 106 of file double.hpp.

00106 { x= ldexp (x, y); }

void mmx::incexp2_assign ( C &  x,
const S &  y 
) [inline]

Definition at line 328 of file defaults.hpp.

Referenced by incexp2_op::set_op().

00328 { x <<= y; }

void include ( const string name  ) 

Definition at line 128 of file dlink.cpp.

References eval(), and gen().

00128                              {
00129   generic r= eval (gen ("include", as<generic> (name)));
00130   if (is<exception> (r)) throw as<exception> (r);
00131 }

bool mmx::included ( const vector< C, V > &  v,
const vector< C, V > &  w 
) [inline]

Definition at line 1360 of file vector.hpp.

Referenced by included_op::not_op(), and included_op::op().

01360                                                              {
01361   return binary_test<included_op> (v, w); }

generic mmx::indented ( const vector< generic > &  v  )  [inline]

Definition at line 149 of file mmx_printer.cpp.

References gen().

00149                                                    {
00150   return gen ("$indent", v); }

mmx::INDIRECT_IMPL_1 ( alias  ,
alias_rep  ,
typename C  ,
 
) const

Definition at line 52 of file alias.hpp.

References flatten().

00054                                                { return flatten (a->get ()); }

vector<C,V> mmx::inf ( const vector< C, V > &  v,
const vector< C, V > &  w 
) [inline]

Definition at line 1124 of file vector.hpp.

01124                                                    {
01125   return binary_map<inf_op> (v, w); }

table<C,T,V> mmx::inf ( const table< C, T, V > &  t,
const table< C, T, V > &  u 
) [inline]

Definition at line 639 of file table.hpp.

00639                                                        {
00640   return binary_map<inf_op,C,T,V> (t, u); }

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 274 of file sparse_vector.hpp.

00274                                                      {
00275   return binary_map<inf_op,C,T,V> (t, u); }

new_table<C,T,V> mmx::inf ( const new_table< C, T, V > &  t,
const new_table< C, T, V > &  u 
) [inline]

Definition at line 710 of file new_table.hpp.

00710                                                        {
00711   return binary_map<inf_op,C,T,V> (t, u); }

C mmx::inf ( const C &  x,
const C &  y 
) [inline]

Definition at line 479 of file defaults.hpp.

References min().

Referenced by inf_op::op(), and inf_op::set_op().

00479 { return min (x, y); }

C mmx::infinity_cst ( const format< C > &  fm  )  [inline]

Definition at line 954 of file type_props.hpp.

References C, promote(), and set_infinity().

00954                                    {
00955   C r= promote (0, fm); set_infinity (r); return r; }

C mmx::infinity_cst (  )  [inline]

Definition at line 914 of file type_props.hpp.

References C, and set_infinity().

00914 { C r; set_infinity (r); return r; }

generic mmx::infix ( const generic g,
const generic op,
const generic h 
) [inline]

Definition at line 129 of file mmx_printer.cpp.

References gen().

Referenced by mmx_printer::pp_E0().

00129                                                                              {
00130   return gen ("$infix", g, op, h); }

static void mmx::init ( table< generic, generic > &  t,
const generic key,
const generic val 
) [inline, static]

Definition at line 95 of file mmx_texmacs.cpp.

00095                                                                          {
00096   t[key]= val;
00097 }

bool init ( const iterator< C > &  it  )  [inline]
void init_system (  ) 

Definition at line 170 of file system.cpp.

References ASSERT, file_exists(), user_dir(), and var_mkdir().

Referenced by eval_system(), path_name(), system_instance::system_instance(), and var_load().

00170                {
00171   string path = user_dir ();
00172   if (!file_exists (path)) {
00173     printf ("This is your first use of Mathemagix.\n");
00174     printf ("I am creating a .mathemagix directory in your home directory\n");
00175     ASSERT (var_mkdir (path), "Cannot create .mathemagix user directory");
00176   }
00177   var_mkdir (path * "/etc");
00178   var_mkdir (path * "/lib");
00179   var_mkdir (path * "/var");
00180   var_mkdir (path * "/mmx");
00181   var_mkdir (path * "/tmp");
00182 }

void mmx::init_threads (  ) 

Definition at line 222 of file threads.cpp.

00222 {}

syntactic inject ( const syntactic x,
const syntactic y,
const syntactic z 
)

Definition at line 511 of file syntactic.cpp.

References syn().

Referenced by mv_inject_op::op(), and mv_inject_op::set_op().

00511                                                                               {
00512   return syn ("inject", x, y, z); }

static port mmx::input_file_port ( FILE *  f,
bool  close_flag,
bool  lock,
const string name 
) [static]

Definition at line 121 of file file_port.cpp.

00121                                                                           {
00122   return (port_rep*) new file_port_rep (2, f, close_flag, lock, name);
00123 }

port input_file_port ( const string name  ) 

Definition at line 156 of file file_port.cpp.

References as_charp(), decode_name(), error_port(), and free_charp().

Referenced by var_load().

00156                                      {
00157   string name_s= decode_name (name);
00158   char* temp= as_charp (name_s);
00159 #if defined(__MINGW__) || defined(__MINGW32__)
00160   FILE* f= _fsopen (temp, "r", _SH_DENYWR);
00161 #else
00162   FILE* f= fopen (temp, "r");
00163 #endif
00164   free_charp (temp);
00165   if (f == NULL) return error_port ("file '" * name * "' not found");
00166   return input_file_port (f, true, true, name);
00167 }

static port mmx::input_output_file_port ( FILE *  f,
bool  cf,
bool  lock,
const string name 
) [static]

Definition at line 126 of file file_port.cpp.

00126                                                                          {
00127   return (port_rep*) new file_port_rep (3, f, cf, lock, name);
00128 }

port input_output_file_port ( const string name  ) 

Definition at line 170 of file file_port.cpp.

References as_charp(), decode_name(), error_port(), and free_charp().

00170                                             {
00171   string name_s= decode_name (name);
00172   char* temp= as_charp (name_s);
00173 #if defined(__MINGW__) || defined(__MINGW32__)
00174   FILE* f= _fsopen (temp, "w+", _SH_DENYRW);
00175 #else
00176   FILE* f= fopen (temp, "w+");
00177 #endif
00178   free_charp (temp);
00179   if (f == NULL) return error_port ("file '" * name * "' did not open");
00180   return input_output_file_port (f, true, true, name);
00181 }

port mmx::input_output_string_port ( string &  obj->lex_string  ) 

Definition at line 105 of file string_port.cpp.

00105                                      {
00106   return (port_rep*) new input_output_string_port_rep (s);
00107 }

port mmx::input_output_string_port ( string &  s  ) 
port mmx::input_string_port ( const string &  obj->lex_string  ) 

Definition at line 68 of file string_port.cpp.

00068                                     {
00069   return (port_rep*) new input_string_port_rep (s);
00070 }

port mmx::input_string_port ( const string &  s  ) 

Referenced by GLUE_1().

vector<C,V> mmx::insert ( const vector< C, V > &  v,
const vector< C, V > &  x,
const vector< nat, W > &  pos 
) [inline]

Definition at line 737 of file vector.hpp.

References ASSERT, C, CF(), n, N(), seg(), and Vector.

00737                                                                     {
00738   // insert x[0] at pos[0] in v, then x[1] at pos[1], etc
00739   ASSERT (N(x) == N(pos), "wrong sizes");
00740   nat n= N(v) + N(x), i= 0; nat l= aligned_size<C,V> (n);  
00741   C* a= mmx_formatted_new<C> (l, CF(v));
00742   const C* p= seg (v);
00743   for (nat k= 0; k < N(pos); k++) {
00744     ASSERT (pos[k] < n, "position out of range");
00745     for (; i < pos[k]; i++, p++) a[i]= *p;
00746     a[pos[k]]= x[k]; i++;
00747   }
00748   for (;i < n; i++, p++) a[i]= *p;
00749   return Vector (a, n, l, CF(v));
00750 }

vector<C,V> mmx::insert ( const vector< C, V > &  v,
const C &  x,
nat  pos 
) [inline]

Definition at line 724 of file vector.hpp.

References ASSERT, C, CF(), n, N(), seg(), and Vector.

00724                                               {
00725   // insert x at 'pos' in v
00726   ASSERT (pos <= N(v), "position out of range");
00727   nat n= N(v) + 1, i; nat l= aligned_size<C,V> (n);
00728   C* a= mmx_formatted_new<C> (l, CF(v));
00729   const C* p= seg (v);
00730   for (i= 0; i < pos; i++, p++) a[i]= *p;
00731   a[pos]= x; i++;
00732   for (;i < n; i++, p++) a[i]= *p;
00733   return Vector (a, n, l, CF(v));
00734 }

vector<C,V> mmx::insert ( const vector< C, V > &  v,
const C &  x 
) [inline]

Definition at line 718 of file vector.hpp.

References append(), and contains().

00718                                      {
00719   if (contains (v, x)) return v;
00720   else return append (v, x);
00721 }

list<C> mmx::insert ( const list< C > &  l,
const C &  x 
) [inline]

Definition at line 314 of file list.hpp.

References car(), cdr(), cons(), is_nil(), and List.

Referenced by GLUE_15(), GLUE_16(), and GLUE_17().

00314                                    {
00315   if (is_nil (l)) return List (x);
00316   else if (car (l) == x) return l;
00317   else return cons (car (l), insert<C> (cdr (l), x));
00318 }

updater_rep* mmx::inside ( const updater x  )  [inline]

Definition at line 133 of file dynamic.cpp.

00139 : public observer_rep {

vector_rep< C , V >* mmx::inside ( const vector< C, V > &  x  )  [inline]

Definition at line 207 of file vector.hpp.

00210 { return v->n; }

task_rep* mmx::inside ( const task &  x  )  [inline]

Definition at line 41 of file threads.hpp.

table_rep< C , T , V >* mmx::inside ( const table< C, T, V > &  x  )  [inline]

Definition at line 157 of file table.hpp.

00162 { return t->tfm1 (); }

symbol_rep< C , V >* mmx::inside ( const symbol< C, V > &  x  )  [inline]

Definition at line 92 of file symbol.hpp.

00094 {

char* mmx::inside ( const string &  s,
nat  pos 
) [inline]

Definition at line 110 of file string.hpp.

References string::rep.

00110                                                {
00111   return s.rep->a + pos; }

string_rep* mmx::inside ( const string &  x  )  [inline]

Definition at line 105 of file string.hpp.

00108 { return copy (s); }

storage_rep* mmx::inside ( const storage x  )  [inline]

Definition at line 53 of file storage.hpp.

00057 { return "storage"; }

sparse_vector_rep< C , T , V >* mmx::inside ( const sparse_vector< C, T, V > &  x  )  [inline]

Definition at line 96 of file sparse_vector.hpp.

00098 { return v.rep->n; }

routine_rep* mmx::inside ( const routine x  )  [inline]

Definition at line 96 of file routine.hpp.

00098 {

primitive_rep* mmx::inside ( const primitive &  x  )  [inline]

Definition at line 43 of file primitive.hpp.

00045 {

port_rep* mmx::inside ( const port &  x  )  [inline]

Definition at line 61 of file port.hpp.

00066 { return p->expression (); }

new_table_rep< C , T , V >* mmx::inside ( const new_table< C, T, V > &  x  )  [inline]

Definition at line 179 of file new_table.hpp.

00184 { return t->tfm1 (); }

list_rep<C>* mmx::inside ( const list< C > &  x  )  [inline]

Definition at line 123 of file list.hpp.

References List_rep.

00123                                       {
00124   return const_cast<List_rep*> (x.operator -> ()); }

iterator_rep< C >* mmx::inside ( const iterator< C > &  x  )  [inline]

Definition at line 95 of file iterator.hpp.

00097 { return it.rep->is_busy (); }

heap_rep< C >* mmx::inside ( const heap< C > &  x  )  [inline]

Definition at line 96 of file heap.hpp.

generic_function_rep* mmx::inside ( const generic_function x  )  [inline]

Definition at line 47 of file generic_function.hpp.

00049 {

generic_rep* mmx::inside ( const generic &  x  )  [inline]

Definition at line 146 of file generic.hpp.

function_8_rep<D,S1,S2,S3,S4,S5,S6,S7,S8>* mmx::inside ( const function_8< D, S1, S2, S3, S4, S5, S6, S7, S8 > &  f  )  [inline]

Definition at line 604 of file function.hpp.

00604 { return f.rep; }

function_7_rep<D,S1,S2,S3,S4,S5,S6,S7>* mmx::inside ( const function_7< D, S1, S2, S3, S4, S5, S6, S7 > &  f  )  [inline]

Definition at line 544 of file function.hpp.

00544 { return f.rep; }

function_6_rep<D,S1,S2,S3,S4,S5,S6>* mmx::inside ( const function_6< D, S1, S2, S3, S4, S5, S6 > &  f  )  [inline]

Definition at line 484 of file function.hpp.

00484 { return f.rep; }

function_5_rep<D,S1,S2,S3,S4,S5>* mmx::inside ( const function_5< D, S1, S2, S3, S4, S5 > &  f  )  [inline]

Definition at line 425 of file function.hpp.

00425 { return f.rep; }

function_4_rep<D,S1,S2,S3,S4>* mmx::inside ( const function_4< D, S1, S2, S3, S4 > &  f  )  [inline]

Definition at line 366 of file function.hpp.

00366 { return f.rep; }

function_3_rep<D,S1,S2,S3>* mmx::inside ( const function_3< D, S1, S2, S3 > &  f  )  [inline]

Definition at line 307 of file function.hpp.

00307 { return f.rep; }

function_2_rep<D,S1,S2>* mmx::inside ( const function_2< D, S1, S2 > &  f  )  [inline]

Definition at line 247 of file function.hpp.

00247 { return f.rep; }

function_1_rep<D,S1>* mmx::inside ( const function_1< D, S1 > &  f  )  [inline]

Definition at line 148 of file function.hpp.

00148 { return f.rep; }

function_0_rep<D>* mmx::inside ( const function_0< D > &  f  )  [inline]

Definition at line 92 of file function.hpp.

00092 { return f.rep; }

evaluator_rep* mmx::inside ( const evaluator &  x  )  [inline]

Definition at line 65 of file evaluator.hpp.

dynamic_rep* mmx::inside ( const dynamic x  )  [inline]

Definition at line 85 of file dynamic.hpp.

00090 { return inside (d) -> val; }

observer_rep* mmx::inside ( const observer x  )  [inline]

Definition at line 56 of file dynamic.hpp.

00065 : public rep_struct {

chain_rep<C>* mmx::inside ( const chain< C > &  x  )  [inline]
void mmx::inside_append ( const vector< C, V > &  v,
const vector< C, V > &  w 
) [inline]

Definition at line 684 of file vector.hpp.

References ASSERT, copy(), inside(), is_non_scalar(), N(), n, and seg().

00684                                                  {
00685   typedef implementation<vector_linear,V> Vec;
00686   ASSERT (is_non_scalar (v) && is_non_scalar (w),
00687           "non-scalar vectors expected");
00688   nat n= N(v), p= N(w);
00689   inside (v)->resize (n + p);
00690   Vec::copy (const_cast<C*> (seg (v)) + n, seg (w), p);
00691 }

void mmx::inside_set ( const table< C, T, V > &  t,
const T &  x,
const C &  v 
) [inline]

Definition at line 182 of file table.hpp.

References inside().

00182                                                                      {
00183   inside (t) -> set (x) = v; }

void mmx::inside_set ( const table< C, T, V > &  t,
const K &  x,
const C &  v 
) [inline]

Definition at line 171 of file table.hpp.

References inside().

00171                                                                       {
00172   inside (t) -> set (as<T> (x)) = v; }

void mmx::inside_set ( const new_table< C, T, V > &  t,
const T &  x,
const C &  v 
) [inline]

Definition at line 204 of file new_table.hpp.

References inside().

00204                                                                      {
00205   inside (t) -> set (x) = v; }

void mmx::inside_set ( const new_table< C, T, V > &  t,
const K &  x,
const C &  v 
) [inline]

Definition at line 193 of file new_table.hpp.

References inside().

00193                                                                       {
00194   inside (t) -> set (as<T> (x)) = v; }

void mmx::inside_set ( const cache< C, T > &  c,
const T &  x,
const C &  v 
) [inline]

Definition at line 68 of file cache.hpp.

Referenced by GLUE_14(), new_type_id(), and register_glue().

00068                                                                      {
00069   inside_set (*c, x, v); }

double mmx::int_as_double ( const int &  x  )  [inline]

Definition at line 124 of file double.hpp.

00124 { return (double) x; }

vector<C,V> mmx::integrate ( const vector< C, V > &  v,
const X &  x 
) [inline]

Definition at line 1209 of file vector.hpp.

01209                                         {
01210   return binary_map_scalar<integrate_op> (v, x); }

vector<C,V> mmx::integrate ( const vector< C, V > &  v  )  [inline]

Definition at line 1200 of file vector.hpp.

01200                                         {
01201   return unary_map<integrate_op> (v); }

syntactic integrate ( const syntactic g,
const syntactic v 
)

Definition at line 486 of file syntactic.cpp.

References GEN_INTEGRATE, and syn().

00486                                                              {
00487   return syn (GEN_INTEGRATE, g, v); }

syntactic integrate ( const syntactic g  ) 

Definition at line 484 of file syntactic.cpp.

References GEN_INTEGRATE, and syn().

00484                                          {
00485   return syn (GEN_INTEGRATE, g); }

routine integrate ( const routine fun  ) 

Definition at line 248 of file routine.cpp.

00248                              {
00249   return new integrate_routine_rep (r);
00250 }

generic integrate ( const generic x1,
const generic x2 
)

Definition at line 689 of file generic.cpp.

References ACC_BINARY_SCALAR, ACC_DERIVE_WRT, current_ev, and GEN_INTEGRATE.

00689                                                 {
00690   ACC_BINARY_SCALAR (ACC_DERIVE_WRT, x1, v);
00691   return current_ev->apply (GEN_INTEGRATE, x1, v);
00692 }

generic integrate ( const generic x1  ) 
vector<C,V> mmx::integrate_init ( const vector< C, V > &  v,
const vector< K, W > &  w 
) [inline]

Definition at line 1203 of file vector.hpp.

01203                                                        {
01204   return binary_map<integrate_init_op> (v, as<vector<K,V> > (w)); }

syntactic integrate_init ( const syntactic g,
const syntactic v,
const syntactic c 
)

Definition at line 501 of file syntactic.cpp.

References syn().

00502                                               {
00503   return syn ("integrate_init", g, v, c); }

syntactic integrate_init ( const syntactic x,
const syntactic c 
)

Definition at line 499 of file syntactic.cpp.

References syn().

00499                                                                   {
00500   return syn ("integrate_init", g, c); }

generic integrate_init ( const generic x,
const generic c 
)

Definition at line 812 of file generic.cpp.

References current_ev.

Referenced by integrate_init_op::op(), integrate_op::op_init(), and integrate_init_op::set_op().

00812                                                               {
00813   return current_ev->apply ("integrate_init", x1, x2); }

function_0<void> mmx::invalidator_1 ( const function_0< void > &  p2,
R **  t2,
int *  ol,
int *  nl 
) [inline]

Definition at line 41 of file dispatcher.hpp.

00041                                                                      {
00042   return function_0<void> (new invalidator_1_rep<R> (p2, t2, ol, nl));
00043 }

function_0<void> mmx::invalidator_2 ( const function_0< void > &  p2,
R **  t2,
int *  ol1,
int *  ol2,
int *  nl1,
int *  nl2 
) [inline]

Definition at line 114 of file dispatcher.hpp.

00115                                                        {
00116   return
00117     function_0<void> (new invalidator_2_rep<R> (p2, t2, ol1, ol2, nl1, nl2));
00118 }

syntactic invert ( const syntactic g  ) 

Definition at line 285 of file syntactic.cpp.

00285                             {
00286   return syntactic (1) / g;
00287 }

generic invert ( const generic x1  ) 

Definition at line 376 of file generic.cpp.

References ACC_INVERT, ACC_UNARY, current_ev, and GEN_OVER.

00376                            {
00377   ACC_UNARY (ACC_INVERT, x1);
00378   return current_ev->apply (GEN_OVER, 1, x1);
00379 }

double invert ( const double &  x  )  [inline]

Definition at line 127 of file double.hpp.

00127 { return 1.0 / x; }

C mmx::invert ( const C &  x  )  [inline]

Definition at line 530 of file defaults.hpp.

References promote().

Referenced by invert_op::op(), invert_op::set_op(), and sympow().

00530                     {
00531   return promote (1, x) / x;
00532 }

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(), generic_as_vector(), and vector_size().

00182                                        {
00183   return type (x) == type_information<C>::id; }

bool mmx::is_a_scalar ( const vector< C, vector_fixed< V, S > > &  v  )  [inline]

Definition at line 370 of file vector.hpp.

00370 { (void) v; return false; }

bool is_a_scalar ( const vector< C, V > &  v  )  [inline]
static bool is_absolute_name ( const string name  )  [inline, static]

Definition at line 308 of file system.cpp.

References N().

Referenced by path_name(), prefix_dir(), relative_name(), and var_load().

00308                                       {
00309 #if defined(__MINGW__) || defined(__MINGW32__)
00310   return N(name) >=2 &&
00311     ((name[0] >= 'A' && name[0] <= 'Z') ||
00312      (name[0] >= 'a' && name[0] <= 'z'))
00313     && name[1] == ':';
00314 #else
00315   return name != "" && name[0] == '/';
00316 #endif
00317 }

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().

00182                        {
00183   int mode= 0;
00184   alias_type_info (id, mode);
00185   return mode == 1;
00186 }

static bool is_applicable ( const generic g  )  [static]

Definition at line 357 of file mmx_printer.cpp.

References GEN_COERCE, GEN_COERCE_TYPE, GEN_LAMBDA, GEN_MACRO, GEN_SEQAND, GEN_SEQOR, GEN_XOR, literal_to_string(), N(), and s.

00357                                  {
00358   if (is<literal> (g)) {
00359     const string s= literal_to_string (g);
00360     if (N(s)==0) return false;
00361     for (nat i=0; i<N(s); i++)
00362       if (s[i] == '.') {
00363         if (i != 0 || N(s) == 1) return false; }
00364       else if (((s[i]<'0') || (s[i]>'9')) &&
00365                ((s[i]<'a') || (s[i]>'z')) &&
00366                ((s[i]<'A') || (s[i]>'Z')) &&
00367                ((s[i]!='_') && (s[i]!='?') && (s[i]!='$')))
00368         return false;
00369       else if (s[i] == '$') return true;
00370   }
00371   return
00372     g != GEN_SEQAND && g != GEN_SEQOR && g != GEN_XOR &&
00373     g != GEN_LAMBDA && g != GEN_MACRO &&
00374     g != GEN_COERCE && g != GEN_COERCE_TYPE;
00375 }

bool mmx::is_atom ( const vector< C, V > &  v  )  [inline]

Definition at line 227 of file vector.hpp.

References is_non_scalar(), and N().

00227                                            {
00228   return is_non_scalar (v) && N(v) == 1; }

bool is_atom ( const syntactic g  ) 

Definition at line 25 of file syntactic.cpp.

00025 { return is<literal> (*g); }

bool mmx::is_atom ( const list< C > &  l  )  [inline]

Return true iff l has length 1.

Definition at line 152 of file list.hpp.

References cdr(), and is_nil().

Referenced by GLUE_14(), GLUE_15(), GLUE_16(), and signed_decompose().

00152                                          {
00153   return !is_nil (l) && is_nil (cdr (l)); }

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_AUTOFOLD, 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_INLINE, GEN_INTERN, GEN_LAMBDA, GEN_LESSLESSEQ, GEN_LOOP, GEN_MACRO, GEN_METHOD, GEN_MINUS_ASSIGN, GEN_MODULE, GEN_MUTABLE, GEN_OUTLINE, GEN_OVER_ASSIGN, GEN_PENALTY, GEN_PLUS_ASSIGN, GEN_PRIVATE, GEN_PUBLIC, GEN_RETURN, GEN_TIMES_ASSIGN, GEN_TRY, is_func(), and N().

00308                          {
00309   if (is_func (g, GEN_BEGIN) ||
00310       is_func (g, GEN_IF) ||
00311       is_func (g, GEN_LOOP) ||
00312       is_func (g, GEN_BREAK) ||
00313       is_func (g, GEN_CONTINUE) ||
00314       is_func (g, GEN_TRY) ||
00315       is_func (g, GEN_LAMBDA) ||
00316       is_func (g, GEN_MACRO) ||
00317       is_func (g, GEN_RETURN) ||
00318       is_func (g, GEN_CLASS) ||
00319       is_func (g, GEN_MODULE) ||
00320       is_func (g, GEN_CATEGORY))
00321     return true;
00322   if (N(g) == 2 && is_C0 (g[1]))
00323     return
00324       is_func (g, GEN_AUTOFOLD) ||
00325       is_func (g, GEN_INLINE) ||
00326       is_func (g, GEN_INTERN) ||
00327       is_func (g, GEN_METHOD) ||
00328       is_func (g, GEN_EXTERN) ||
00329       is_func (g, GEN_MUTABLE) ||
00330       is_func (g, GEN_CONSTANT) ||
00331       is_func (g, GEN_OUTLINE) ||
00332       is_func (g, GEN_PUBLIC) ||
00333       is_func (g, GEN_PRIVATE);
00334   if (N(g) == 3 && is_C0 (g[2]))
00335     return
00336       is_func (g, GEN_FORALL) ||
00337       is_func (g, GEN_EXISTS) ||
00338       is_func (g, GEN_ASSUME) ||
00339       is_func (g, GEN_PENALTY) ||
00340       is_func (g, GEN_DEFINE) ||
00341       is_func (g, GEN_ASSIGN) ||
00342       is_func (g, GEN_DEFINE_MACRO) ||
00343       is_func (g, GEN_ASSIGN_MACRO) ||
00344       is_func (g, GEN_PLUS_ASSIGN) ||
00345       is_func (g, GEN_MINUS_ASSIGN) ||
00346       is_func (g, GEN_TIMES_ASSIGN) ||
00347       is_func (g, GEN_OVER_ASSIGN) ||
00348       is_func (g, GEN_LESSLESSEQ) ||
00349       is_func (g, GEN_GTRGTREQ);
00350   if (N(g) == 4 && is_C0 (g[3]))
00351     return
00352       is_func (g, GEN_FOREIGN);
00353   return false;
00354 }

bool mmx::is_evaluable ( const vector< C, V > &  v,
const K &  a,
vector< typename binary_return_type_helper< evaluate_op, C, K >::RET, W > &  w 
) [inline]

Definition at line 1289 of file vector.hpp.

References CF(), fill(), and N().

01290                                                {
01291   w= fill (N(v), CF(w));
01292   for (nat i= 0; i < N(v); i++)
01293     if (!is_evaluable (v[i], a, w[i])) return false;
01294   return true; }

bool mmx::is_exact_zero ( const generic &  g1  )  [inline]

Definition at line 358 of file generic.hpp.

References exact_eq().

00358 { return exact_eq (g1, 0); }

bool mmx::is_exact_zero ( const C &  x  )  [inline]

Definition at line 143 of file defaults.hpp.

References exact_eq(), and promote().

00143                                                             {
00144   return exact_eq (x, promote (0, x)); }

bool mmx::is_finite ( const vector< C, V > &  v  )  [inline]

Definition at line 1310 of file vector.hpp.

References is_a_scalar(), and is_finite().

01310                                              {
01311   if (is_a_scalar (v)) return is_finite (v.scalar());
01312   return big<and_is_finite_op> (v); }

bool mmx::is_finite ( const table< C, T, V > &  t  )  [inline]

Definition at line 728 of file table.hpp.

00728                                             {
00729   return big<and_is_finite_op> (t); }

bool mmx::is_finite ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 799 of file new_table.hpp.

00799                                             {
00800   return big<and_is_finite_op> (t); }

bool mmx::is_finite ( const double &  x  )  [inline]

Definition at line 77 of file double.hpp.

00077 { return std::isfinite (x); }

bool mmx::is_finite ( const C &  x  )  [inline]

Definition at line 693 of file defaults.hpp.

Referenced by GLUE_39(), is_finite(), is_finite_op::not_op(), and_is_finite_op::op(), is_finite_op::op(), and and_is_finite_op::set_op().

00693                                                         {
00694   (void) x; return true; }

bool mmx::is_floating_string ( const string obj->lex_string  ) 

Definition at line 203 of file string.cpp.

References N().

00203                                      {
00204   nat i= 0, n= N(s);
00205   if (i < n && s[i] == '-') i++;
00206   if (i >= n || s[i] < '0' || s[i] > '9') return false;
00207   while (i < n && s[i] >= '0' && s[i] <= '9') i++;
00208   if (i >= n || s[i] != '.') return false;
00209   i++;
00210   while (i < n && s[i] >= '0' && s[i] <= '9') i++;
00211   if (i < n && (s[i] == 'e' || s[i] == 'E')) {
00212     i++;
00213     if (i < n && s[i] == '-') i++;
00214     while (i < n && s[i] >= '0' && s[i] <= '9') i++;
00215   }
00216   return i == n;
00217 }

bool mmx::is_floating_string ( const string &  s  ) 

Referenced by string_to_numeric().

bool mmx::is_func ( const syntactic g,
const generic f,
nat(obj->lex_length)   
)

Definition at line 82 of file syntactic.cpp.

References is_func().

00082                                                            {
00083   return is_func (*g, f, n); }

bool mmx::is_func ( const syntactic g,
const syntactic f,
nat(obj->lex_length)   
)

Definition at line 78 of file syntactic.cpp.

References is_func().

00078                                                              {
00079   return is_func (*g, *f, n); }

bool mmx::is_func ( const syntactic g,
const char *  f,
nat(obj->lex_length)   
)

Definition at line 74 of file syntactic.cpp.

References is_func().

00074                                                         {
00075   return is_func (*g, f, n); }

bool mmx::is_func ( const syntactic &  g,
const generic &  f,
nat  n 
)
bool is_func ( const syntactic g,
const generic f 
)

Definition at line 80 of file syntactic.cpp.

References is_func().

00080                                                     {
00081   return is_func (*g, f); }

bool mmx::is_func ( const syntactic &  g,
const syntactic &  f,
nat  n 
)
bool is_func ( const syntactic g,
const syntactic f 
)

Definition at line 76 of file syntactic.cpp.

References is_func().

00076                                                       {
00077   return is_func (*g, *f); }

bool mmx::is_func ( const syntactic &  g,
const char *  f,
nat  n 
)
bool is_func ( const syntactic g,
const char *  f 
)

Definition at line 72 of file syntactic.cpp.

References is_func().

00072                                                  {
00073   return is_func (*g, f); }

bool is_func ( const generic g,
const generic f,
nat  n 
)

Definition at line 75 of file generic_utils.cpp.

References exact_eq(), and N().

00075                                                     {
00076   return is<compound> (g) && N (g) == (n+1) && exact_eq (g[0], f);
00077 }

bool is_func ( const generic g,
const generic f 
)

Definition at line 70 of file generic_utils.cpp.

References exact_eq().

00070                                              {
00071   return is<compound> (g) && exact_eq (g[0], f);
00072 }

bool is_func ( const generic g,
const char *  f,
nat  n 
)

Definition at line 65 of file generic_utils.cpp.

References exact_eq(), and N().

00065                                                  {
00066   return is<compound> (g) && N (g) == (n+1) && exact_eq (g[0], generic (f));
00067 }

bool is_func ( const generic g,
const char *  f 
)
static bool mmx::is_function_type ( const generic g  )  [static]

Definition at line 575 of file cpp_printer.cpp.

References CPP_FUNCTION_TYPE, CPP_INLINE, CPP_STATIC, and is_func().

00575                                     {
00576   return
00577     is_func (g, CPP_FUNCTION_TYPE) ||
00578     (is_func (g, CPP_INLINE, 1) && is_function_type (g[1])) ||
00579     (is_func (g, CPP_STATIC, 1) && is_function_type (g[1]));
00580 }

bool mmx::is_fuzz ( const vector< C, V > &  v  )  [inline]

Definition at line 1319 of file vector.hpp.

References is_a_scalar(), is_fuzz(), and is_nan().

01319                                            {
01320   if (is_a_scalar (v)) return is_fuzz (v.scalar());
01321   return !is_nan (v) && big<or_is_fuzz_op> (v); }

bool mmx::is_fuzz ( const table< C, T, V > &  t  )  [inline]

Definition at line 734 of file table.hpp.

References is_nan().

00734                                           {
00735   return !is_nan (t) && big<or_is_fuzz_op> (t); }

bool mmx::is_fuzz ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 805 of file new_table.hpp.

References is_nan().

00805                                           {
00806   return !is_nan (t) && big<or_is_fuzz_op> (t); }

bool mmx::is_fuzz ( const double &  x  )  [inline]

Definition at line 79 of file double.hpp.

00079 { (void) x; return false; }

bool mmx::is_fuzz ( const C &  x  )  [inline]

Definition at line 697 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().

00697                                                       {
00698   (void) x; return false; }

bool mmx::is_infinite ( const vector< C, V > &  v  )  [inline]

Definition at line 1316 of file vector.hpp.

References is_a_scalar(), is_infinite(), and is_nan().

01316                                                {
01317   if (is_a_scalar (v)) return is_infinite (v.scalar());
01318   return !is_nan (v) && big<or_is_infinite_op> (v); }

bool mmx::is_infinite ( const table< C, T, V > &  t  )  [inline]

Definition at line 732 of file table.hpp.

References is_nan().

00732                                               {
00733   return !is_nan (t) && big<or_is_infinite_op> (t); }

bool mmx::is_infinite ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 803 of file new_table.hpp.

References is_nan().

00803                                               {
00804   return !is_nan (t) && big<or_is_infinite_op> (t); }

bool mmx::is_infinite ( const double &  x  )  [inline]

Definition at line 78 of file double.hpp.

00078 { return std::isinf (x); }

bool mmx::is_infinite ( const C &  x  )  [inline]

Definition at line 695 of file defaults.hpp.

Referenced by GLUE_40(), is_infinite(), is_infinite_op::not_op(), or_is_infinite_op::op(), is_infinite_op::op(), and or_is_infinite_op::set_op().

00695                                                           {
00696   (void) x; return false; }

bool mmx::is_infix ( const generic g,
const generic op 
)

Definition at line 200 of file mmx_texmacs.cpp.

References is_func().

00200                                                {
00201   return is_func (g, "$infix", 3) && g[2] == op;
00202 }

bool mmx::is_input_port ( const port &  p  )  [inline]

Definition at line 94 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().

00094                                           {
00095   return inside (p)->is_input_port (); }

bool mmx::is_int ( const double_int &  x  )  [inline]

Definition at line 34 of file int.hpp.

00034                                          {
00035   return x == ((double_int) (int) x); }

bool mmx::is_integer_string ( const string obj->lex_string  ) 

Definition at line 194 of file string.cpp.

References N().

00194                                     {
00195   nat i= 0, n= N(s);
00196   if (i < n && s[i] == '-') i++;
00197   if (i == n) return false;
00198   while (i < n && s[i] >= '0' && s[i] <= '9') i++;
00199   return i == n;
00200 }

bool mmx::is_integer_string ( const string &  s  ) 
bool mmx::is_invertible ( const C &  x  )  [inline]

Definition at line 535 of file defaults.hpp.

00535                            {
00536   return false;
00537 }

bool mmx::is_list ( const generic &  x  )  [inline]

Definition at line 221 of file generic.hpp.

References SPECIES_LIST, and species_type().

00221                                        {
00222   return species_type (x) == SPECIES_LIST; }

bool is_literal_double ( const literal l  ) 

Definition at line 57 of file literal.cpp.

00057                                      {
00058   return is_numeric_string<double> (*l);
00059 }

bool is_literal_int ( const literal l  ) 

Definition at line 52 of file literal.cpp.

00052                                   {
00053   return is_numeric_string<int> (*l);
00054 }

bool is_literal_string ( const literal l  ) 

Definition at line 47 of file literal.cpp.

References is_quoted().

00047                                      {
00048   return is_quoted (*l);
00049 }

static bool mmx::is_locase ( register char  c  )  [static]

Definition at line 424 of file string.cpp.

Referenced by upcase(), and upcase_first().

00424                             {
00425   int code= (int) ((unsigned char) c);
00426   return
00427     ((c>='a') && (c<='z')) ||
00428     ((code >= 160) && (code < 189)) ||
00429     (code >= 224);
00430 }

bool mmx::is_nan ( const vector< C, V > &  v  )  [inline]

Definition at line 1313 of file vector.hpp.

References is_a_scalar(), and is_nan().

01313                                           {
01314   if (is_a_scalar (v)) return is_nan (v.scalar());
01315   return big<or_is_nan_op> (v); }

bool mmx::is_nan ( const table< C, T, V > &  t  )  [inline]

Definition at line 730 of file table.hpp.

00730                                          {
00731   return big<or_is_nan_op> (t); }

bool mmx::is_nan ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 801 of file new_table.hpp.

00801                                          {
00802   return big<or_is_nan_op> (t); }

bool mmx::is_nan ( const double &  x  )  [inline]

Definition at line 80 of file double.hpp.

00080 { return std::isnan (x); }

bool mmx::is_nan ( const C &  x  )  [inline]

Definition at line 699 of file defaults.hpp.

Referenced by GLUE_41(), 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().

00699                                                      {
00700   (void) x; return false; }

bool mmx::is_nil ( const vector< C, V > &  v  )  [inline]

Definition at line 225 of file vector.hpp.

References N().

00225                                           {
00226   return N(v) == 0; }

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.

00092                                   {
00093   return (l.end.line == 0 && l.end.position == 0);
00094 };

bool mmx::is_nil ( const routine fun  )  [inline]

Definition at line 98 of file routine.hpp.

00098                                         {
00099   return fun.rep == NULL; }

bool mmx::is_nil ( const primitive &  fun  )  [inline]

Definition at line 45 of file primitive.hpp.

00045                                           {
00046   return fun.rep == NULL; }

bool is_nil ( const list< C > &  l  )  [inline]

Return true iff is empty.

Definition at line 150 of file list.hpp.

00150 { return l.rep == NULL; }

bool mmx::is_nil ( const generic_function f  )  [inline]

Definition at line 73 of file generic_function.hpp.

References N().

00073                                                {
00074   return N (f -> Signature ()) == 0; }

bool mmx::is_nil ( const function_8< D, S1, S2, S3, S4, S5, S6, S7, S8 > &  f  )  [inline]

Definition at line 615 of file function.hpp.

References inside().

00615                                             {
00616   return (void*) inside (f) == NULL; }

bool mmx::is_nil ( const function_7< D, S1, S2, S3, S4, S5, S6, S7 > &  f  )  [inline]

Definition at line 555 of file function.hpp.

References inside().

00555                                             {
00556   return (void*) inside (f) == NULL; }

bool mmx::is_nil ( const function_6< D, S1, S2, S3, S4, S5, S6 > &  f  )  [inline]

Definition at line 495 of file function.hpp.

References inside().

00495                                             {
00496   return (void*) inside (f) == NULL; }

bool mmx::is_nil ( const function_5< D, S1, S2, S3, S4, S5 > &  f  )  [inline]

Definition at line 436 of file function.hpp.

References inside().

00436                                             {
00437   return (void*) inside (f) == NULL; }

bool mmx::is_nil ( const function_4< D, S1, S2, S3, S4 > &  f  )  [inline]

Definition at line 377 of file function.hpp.

References inside().

00377                                             {
00378   return (void*) inside (f) == NULL; }

bool mmx::is_nil ( const function_3< D, S1, S2, S3 > &  f  )  [inline]

Definition at line 318 of file function.hpp.

References inside().

00318                                             {
00319   return (void*) inside (f) == NULL; }

bool mmx::is_nil ( const function_2< D, S1, S2 > &  f  )  [inline]

Definition at line 259 of file function.hpp.

References inside().

00259                                             {
00260   return (void*) inside (f) == NULL; }

bool mmx::is_nil ( const function_1< D, S1 > &  f  )  [inline]

Definition at line 159 of file function.hpp.

References inside().

00159                                             {
00160   return (void*) inside (f) == NULL; }

bool mmx::is_nil ( const function_0< D > &  f  )  [inline]

Definition at line 103 of file function.hpp.

References inside().

00103                                             {
00104   return (void*) inside (f) == NULL; }

bool is_nil ( const chain< C > &  c  )  [inline]
bool mmx::is_non_scalar ( const vector< C, vector_fixed< V, S > > &  v  )  [inline]

Definition at line 372 of file vector.hpp.

00372 { (void) v; return true; }

bool is_non_scalar ( const vector< C, V > &  v  )  [inline]
bool mmx::is_numeric ( const string obj->lex_string  ) 
bool mmx::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().

00105                              {
00106   return
00107     (N(s) > 0 && s[0] >= '0' && s[0] <= '9') ||
00108     (N(s) > 1 && s[0] == '-' && s[1] >= '0' && s[1] <= '9');
00109 }

bool mmx::is_numeric_string ( const string &  s  )  [inline]

Definition at line 201 of file string.hpp.

References C.

00201                                     {
00202   C val;
00203   return string_to_numeric<C> (s, val);
00204 }

bool mmx::is_output_port ( const port &  p  )  [inline]

Definition at line 96 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().

00096                                            {
00097   return inside (p)->is_output_port (); }

bool mmx::is_power_of_two ( nat  p  )  [inline]

Definition at line 89 of file int.hpp.

00089                         {
00090   if (p == 0) return false;
00091   while ((p & 1) == 0) p >>= 1;
00092   return p == 1;
00093 }

bool mmx::is_quoted ( const string obj->lex_string  ) 

Definition at line 512 of file string.cpp.

References N().

00512                             {
00513   nat i, n= N(s);
00514   if (n < 2) return false;
00515   if (s[0] == '\"' && s[n-1] == '\"') {
00516     for (i=1; i<n-1; i++)
00517       if (s[i] == '\\') i++;
00518       else if (s[i] == '\"') return false;
00519     return i == n-1;
00520   }
00521   if (s[0] == '/' && s[1] == '\"' && s[n-2] == '\"' && s[n-1] == '/') {
00522     for (i=2; i<n-2; i++)
00523       if (s[i] == '\"' && s[i+1] == '/') return false;
00524     return i == n-2;
00525   }
00526   return false;
00527 }

bool mmx::is_quoted ( const string &  s  ) 

Add around s.

Referenced by is_literal_string().

bool mmx::is_reconstructible ( const vector< C, V > &  v,
vector< typename unary_return_type_helper< reconstruct_op, C >::RET, W > &  w 
) [inline]

Definition at line 1275 of file vector.hpp.

References CF(), fill(), and N().

01275                                                                        {
01276   w= fill (N(v), CF(w));
01277   for (nat i= 0; i < N(v); i++)
01278     if (!is_reconstructible (v[i], w[i])) return false;
01279   return true; }

bool mmx::is_reliable ( const vector< C, V > &  v  )  [inline]

Definition at line 1322 of file vector.hpp.

References C, is_a_scalar(), and is_reliable().

01322                                                {
01323   if (is_a_scalar (v)) return is_reliable (v.scalar());
01324   return is_reliable (C (0)); }

bool mmx::is_reliable ( const table< C, T, V > &  t  )  [inline]

Definition at line 736 of file table.hpp.

References C, and is_reliable().

00736                                               {
00737   return is_reliable (C (0)); }

bool mmx::is_reliable ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 807 of file new_table.hpp.

References C, and is_reliable().

00807                                               {
00808   return is_reliable (C (0)); }

bool mmx::is_reliable ( const double &  x  )  [inline]

Definition at line 81 of file double.hpp.

00081 { (void) x; return false; }

bool mmx::is_reliable ( const C &  x  )  [inline]

Definition at line 701 of file defaults.hpp.

Referenced by is_reliable(), is_reliable_op::not_op(), and is_reliable_op::op().

00701                                                           {
00702   (void) x; return true; }

bool mmx::is_table ( const generic &  x  )  [inline]

Definition at line 223 of file generic.hpp.

References SPECIES_TABLE, and species_type().

Referenced by GLUE_4().

00223                                         {
00224   return species_type (x) == SPECIES_TABLE; }

bool mmx::is_tuple_type ( nat  id  )  [inline]

Definition at line 100 of file tuple.hpp.

References tuple_type_info().

Referenced by define_type_sub().

00100                        {
00101   bool mode= false;
00102   tuple_type_info (id, mode);
00103   return mode;
00104 }

static bool mmx::is_upcase ( register char  c  )  [static]

Definition at line 433 of file string.cpp.

Referenced by locase(), and locase_first().

00433                             {
00434   int code= (int) ((unsigned char) c);
00435   return
00436     ((c>='A') && (c<='Z')) ||
00437     ((code >= 128) && (code < 159)) ||
00438     ((code >= 192) && (code < 224));
00439 }

bool mmx::is_vector ( const generic &  x  )  [inline]

Definition at line 219 of file generic.hpp.

References species_type(), and SPECIES_VECTOR.

00219                                          {
00220   return species_type (x) == SPECIES_VECTOR; }

bool mmx::is_zero ( const C &  x  )  [inline]

Definition at line 141 of file defaults.hpp.

References promote().

Referenced by div_op::def().

00141                                                       {
00142   return x == promote (0, x); }

iterator<C> mmx::iterate ( const vector< C, V > &  v  )  [inline]

Definition at line 515 of file vector.hpp.

00515                           {
00516   return iterator<C> (new vector_iterator_rep<C,V> (v));
00517 }

iterator<C> mmx::iterate ( const tuple< C > &  t  )  [inline]

Definition at line 83 of file tuple.hpp.

References as_vector(), and iterate().

00083                          {
00084   return iterate (as_vector (t));
00085 }

iterator<pair<T,C> > mmx::iterate ( const table< C, T, V > &  t  )  [inline]

Definition at line 414 of file table.hpp.

00414                          {
00415   return iterator<pair<T,C> > (new table_iterator_rep<C,T,V> (t));
00416 }

iterator<pair<T,C> > mmx::iterate ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 485 of file new_table.hpp.

00485                          {
00486   return iterator<pair<T,C> > (new table_iterator_rep<C,T,V> (t));
00487 }

iterator<C> mmx::iterate ( const list< C > &  l  )  [inline]

Definition at line 202 of file list.hpp.

00202                         {
00203   return iterator<C> (new list_iterator_rep<C> (l));
00204 }

iterator<C> mmx::iterate ( const heap< C > &  h  )  [inline]

Definition at line 217 of file heap.hpp.

00217                         {
00218   return iterator<C> (new heap_iterator_rep<C> (h));
00219 }

iterator<C> mmx::iterate ( const chain< C > &  c  )  [inline]

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(), binary_helper< new_table< C, T, V > >::disassemble(), flatten(), GLUE_3(), lazy_iterator_rep< C, T >::initialize(), iterate(), make_cache_3(), make_cache_4(), make_mmx_new_table(), make_mmx_table(), unary_hash(), and vector_lift_iterator().

00142                          {
00143   if (is_nil (c)) return iterator<C> ();
00144   return
00145     lazy_iterator<C,Chain > (left (c), get_format (middle (c))) *
00146     iterator<C> (middle (c)) *
00147     lazy_iterator<C,Chain > (right (c), get_format (middle (c)));
00148 }

iterator<T> mmx::iterator_append ( const iterator< T > &  head,
const iterator< T > &  tail 
) [inline]

Definition at line 454 of file mmc_glue.hpp.

00454                                                                    {
00455   return head * tail;
00456 }

bool mmx::iterator_busy ( const iterator< T > &  it  )  [inline]

Definition at line 401 of file mmc_glue.hpp.

References busy().

00401                                       {
00402   return busy (it);
00403 }

iterator<U> mmx::iterator_cond_where ( const function_1< U, typename argument_helper< T >::arg_type > &  fun,
const iterator< T > &  it,
const function_1< bool, typename argument_helper< T >::arg_type > &  cond,
const format< T > &  fmT,
const format< U > &  fmU 
) [inline]

Definition at line 651 of file mmc_glue.hpp.

References iterator_filter(), and iterator_where().

00656 {
00657   return iterator_where (fun, iterator_filter (cond, it, fmT), fmU);
00658 }

iterator<U> mmx::iterator_cond_where ( const function_1< U, typename argument_helper< T >::arg_type > &  fun,
const iterator< T > &  it,
const function_1< bool, typename argument_helper< T >::arg_type > &  cond 
) [inline]

Definition at line 643 of file mmc_glue.hpp.

References iterator_filter(), and iterator_where().

00646 {
00647   return iterator_where (fun, iterator_filter (cond, it));
00648 }

iterator<T> mmx::iterator_cons ( const T &  c,
const iterator< T > &  tail 
) [inline]

Definition at line 449 of file mmc_glue.hpp.

00449                                                     {
00450   return iterator<T> (c) * tail;
00451 }

T mmx::iterator_current ( const iterator< T > &  it  )  [inline]

Definition at line 406 of file mmc_glue.hpp.

00406                                          {
00407   return *it;
00408 }

iterator<S> mmx::iterator_downwards_range ( const S &  start,
const T &  end 
) [inline]

Definition at line 433 of file mmc_glue.hpp.

References range_iterator().

00433                                                         {
00434   return range_iterator (start, outplace_set_as<S> (end),
00435                          outplace_set_as<S> (-1), false);
00436 }

vector<T> mmx::iterator_explode ( const iterator< T > &  it  )  [inline]

Definition at line 416 of file mmc_glue.hpp.

00416                                          {
00417   return vector<T> (it);
00418 }

iterator<T> mmx::iterator_filter ( const function_1< bool, typename argument_helper< T >::arg_type > &  cond,
const iterator< T > &  it,
const format< T > &  fm 
) [inline]

Definition at line 636 of file mmc_glue.hpp.

00638 {
00639   return iterator<T> (new filter_iterator_rep<T> (cond, it, fm));
00640 }

iterator<T> mmx::iterator_filter ( const function_1< bool, typename argument_helper< T >::arg_type > &  cond,
const iterator< T > &  it 
) [inline]

Definition at line 629 of file mmc_glue.hpp.

Referenced by iterator_cond_where().

00631 {
00632   return iterator<T> (new filter_iterator_rep<T> (cond, it));
00633 }

void mmx::iterator_increase ( const iterator< T > &  it  )  [inline]

Definition at line 411 of file mmc_glue.hpp.

00411                                           {
00412   ++it;
00413 }

iterator<U> mmx::iterator_lift ( const function_1< U, typename argument_helper< T >::arg_type > &  fun,
const iterator< T > &  it,
const format< U > &  fm 
) [inline]

Definition at line 524 of file mmc_glue.hpp.

00526 {
00527   return iterator<U> (new lift_arg_iterator_rep<T,U> (fun, it, fm));
00528 }

iterator<U> mmx::iterator_lift ( const function_1< U, typename argument_helper< T >::arg_type > &  fun,
const iterator< T > &  it 
) [inline]

Definition at line 517 of file mmc_glue.hpp.

00519 {
00520   return iterator<U> (new lift_arg_iterator_rep<T,U> (fun, it, format<U> ()));
00521 }

iterator<U> mmx::iterator_lift ( const iterator< T > &  it  )  [inline]

Definition at line 481 of file mmc_glue.hpp.

00481                                       {
00482   return iterator<U> (new lift_iterator_rep<T,U> (it, format<U> ()));
00483 }

iterator<T> mmx::iterator_lift_from_generic ( const iterator< generic > &  it,
const format< T > &  fm 
) [inline]

Definition at line 491 of file mmc_glue.hpp.

00492                                                  {
00493   return iterator<T> (new lift_iterator_rep<generic,T> (it, fm));
00494 }

iterator<T> mmx::iterator_lift_from_generic ( const iterator< generic > &  it  )  [inline]

Definition at line 486 of file mmc_glue.hpp.

00486                                                          {
00487   return iterator<T> (new lift_iterator_rep<generic,T> (it, format<T> ()));
00488 }

vector<U> mmx::iterator_lift_vector ( const function_1< U, typename argument_helper< T >::arg_type > &  fun,
const iterator< T > &  it,
const format< U > &  fm 
) [inline]

Definition at line 538 of file mmc_glue.hpp.

References vector_lift().

00540 {
00541   return vector_lift (fun, vector<T> (it), fm);
00542 }

vector<U> mmx::iterator_lift_vector ( const function_1< U, typename argument_helper< T >::arg_type > &  fun,
const iterator< T > &  it 
) [inline]

Definition at line 531 of file mmc_glue.hpp.

References vector_lift().

00533 {
00534   return vector_lift (fun, vector<T> (it));
00535 }

iterator<S> mmx::iterator_natural_range ( const S &  start,
const T &  end 
) [inline]

Definition at line 427 of file mmc_glue.hpp.

References range_iterator().

00427                                                       {
00428   return range_iterator (start, outplace_set_as<S> (end),
00429                          outplace_set_as<S> (1), false);
00430 }

iterator<T> mmx::iterator_nil ( const format< T > &  fm  )  [inline]

Definition at line 444 of file mmc_glue.hpp.

00444                                    {
00445   return iterator<T> (fm);
00446 }

iterator<T> mmx::iterator_nil (  )  [inline]

Definition at line 439 of file mmc_glue.hpp.

00439                 {
00440   return iterator<T> ();
00441 }

iterator<S> mmx::iterator_strict_range ( const S &  start,
const T &  end 
) [inline]

Definition at line 421 of file mmc_glue.hpp.

References range_iterator().

00421                                                      {
00422   return range_iterator (start, outplace_set_as<S> (end),
00423                          outplace_set_as<S> (1), true);
00424 }

iterator<T> mmx::iterator_unnest ( const iterator< iterator< T > > &  it  )  [inline]

Definition at line 695 of file mmc_glue.hpp.

00695                                                    {
00696   return iterator<T> (new unnest_iterator_rep<T> (it));
00697 }

iterator<U> mmx::iterator_where ( const function_1< U, typename argument_helper< T >::arg_type > &  fun,
const iterator< T > &  it,
const format< U > &  fm 
) [inline]

Definition at line 595 of file mmc_glue.hpp.

00596                                      {
00597   return iterator<U> (new where_iterator_rep<T,U> (fun, it, fm));
00598 }

iterator<U> mmx::iterator_where ( const function_1< U, typename argument_helper< T >::arg_type > &  fun,
const iterator< T > &  it 
) [inline]

Definition at line 590 of file mmc_glue.hpp.

Referenced by iterator_cond_where().

00590                                                                               {
00591   return iterator<U> (new where_iterator_rep<T,U> (fun, it, format<U> ()));
00592 }

generic mmx::keyword ( const generic op,
const generic g 
) [inline]

Definition at line 143 of file mmx_printer.cpp.

References gen().

00143                                                              {
00144   return gen ("$keyword", op, g); }

generic mmx::keyword ( const generic g  )  [inline]

Definition at line 141 of file mmx_printer.cpp.

References gen().

Referenced by mmx_lex(), and mmx_printer::pp_E0().

00141                                           {
00142   return gen ("$keyword", g); }

C mmx::largest_cst ( const format< C > &  fm  )  [inline]

Definition at line 948 of file type_props.hpp.

References C, promote(), and set_largest().

00948                                   {
00949   C r= promote (0, fm); set_largest (r); return r; }

C mmx::largest_cst (  )  [inline]

Definition at line 910 of file type_props.hpp.

References C, and set_largest().

00910 { C r; set_largest (r); return r; }

iterator<C> mmx::lazy_iterator ( const T &  x,
const format< C > &  fm 
) [inline]

Definition at line 436 of file iterator.hpp.

References Iterator.

00436                                              {
00437   return Iterator (new lazy_iterator_rep<C,T> (x, fm));
00438 }

syntactic lcm ( const syntactic g1,
const syntactic g2 
)

Definition at line 408 of file syntactic.cpp.

References exact_eq(), GEN_LCM, and syn().

00408                                                          {
00409   if (exact_eq (g1, 0) || exact_eq (g2, 0)) return 0;
00410   return syn (GEN_LCM, g1, g2);
00411 }

generic lcm ( const generic x1,
const generic x2 
)

Definition at line 719 of file generic.cpp.

References current_ev, and GEN_LCM.

Referenced by lcm_op::op(), and lcm_op::set_op().

00719                                                    {
00720   return current_ev->apply (GEN_LCM, x1, x2); }

chain< C > left ( const chain< C > &  c  )  [inline]
bool mmx::less_operator ( const T &  x,
const T &  y 
) [inline]

Definition at line 38 of file operators.hpp.

00038 { return x<y; }

bool mmx::lesseq_operator ( const T &  x,
const T &  y 
) [inline]

Definition at line 39 of file operators.hpp.

00039 { return x<=y; }

format<typename unary_return_type_helper<lift_op, C >::RET > mmx::lift ( const format< C > &  fm  )  [inline]

Definition at line 835 of file type_props.hpp.

References get_format(), get_sample(), and lift().

00835 { return get_format (lift (get_sample (fm))); }

unary_return_type_helper<lift_op, C >::RET mmx::lift ( const C &  x  )  [inline]

Definition at line 829 of file type_props.hpp.

Referenced by lift(), and lift_helper< vector< C, V > >::op().

00829 { return lift_helper<C>::op (x); }

generic mmx::list_append_several ( const tuple< list< generic > > &  t  ) 

Definition at line 96 of file glue_list_map.cpp.

References N(), and rebuild().

Referenced by glue_list_map().

00096                                                      {
00097   list<generic> r;
00098   for (int i=N(t)-1; i>=0; i--)
00099     r= t[i] * r;
00100   return rebuild (r);
00101 }

generic mmx::list_apply ( const generic f,
const list< generic > &  l2 
)

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().

00104                                                        {
00105   routine fun= is<routine> (f)? as<routine> (f): default_routine (f);
00106   list<generic> l= l2;
00107   nat i, n= N(l);
00108   vector<generic> a= fill<generic> (n);
00109   for (i=0; !is_nil (l); i++, l= read_cdr(l))
00110     a[i]= read_car (l);
00111   return fun->apply (a);
00112 }

generic mmx::list_foreach ( const generic f,
const tuple< list< generic > > &  t 
)

Definition at line 90 of file glue_list_map.cpp.

References gen(), GEN_TUPLE, and list_map().

Referenced by glue_list_map().

00090                                                                 {
00091   generic r= list_map (f, t);
00092   return as<generic> (tuple<generic> (gen (GEN_TUPLE)));
00093 }

generic mmx::list_map ( const generic f,
const tuple< list< generic > > &  t 
)

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().

00072                                                             {
00073   routine fun= is<routine> (f)? as<routine> (f): default_routine (f);
00074   switch (N(t)) {
00075   case 0: ASSERT (N(t)>0, "wrong number of arguments");
00076   case 1: return rebuild (list_map_1 (fun, t[0]));
00077   case 2: return rebuild (list_map_2 (fun, t[0], t[1]));
00078   default:
00079     {
00080       const vector<generic> a= cdr (compound_to_vector (*t));
00081       nat i, n= N(a);
00082       vector<list<generic> > b= fill<list<generic> > (n);
00083       for (i=0; i<n; i++) b[i]= as<list<generic> > (a[i]);
00084       return rebuild (list_map_n (fun, b));
00085     }
00086   }
00087 }

list<generic> mmx::list_map_1 ( const routine fun,
const list< generic > &  l 
)

Definition at line 36 of file glue_list_map.cpp.

References car(), cdr(), cons(), and is_nil().

Referenced by list_map().

00036                                                         {
00037   if (is_nil (l)) return l;
00038   generic r= fun->apply (car (l));
00039   return cons (r, list_map_1 (fun, cdr (l)));
00040 }

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().

00045 {
00046   ASSERT (is_nil (l1) == is_nil (l2), "lists of unequal lengths");
00047   if (is_nil (l1)) return l1;
00048   generic r= fun->apply (car (l1), car (l2));
00049   return cons (r, list_map_2 (fun, cdr (l1), cdr (l2)));
00050 }

list<generic> mmx::list_map_n ( const routine fun,
const vector< list< generic > > &  a 
)

Definition at line 53 of file glue_list_map.cpp.

References ASSERT, car(), cdr(), cons(), is_nil(), N(), and n.

Referenced by list_map().

00053                                                                  {
00054   nat i, n= N(a);
00055   vector<generic> cara= fill<generic> (n);
00056   if (is_nil (a[0])) {
00057     for (i=0; i<n; i++)
00058       ASSERT (is_nil (a[i]), "lists of unequal lengths");
00059     return a[0];
00060   }
00061   for (i=0; i<n; i++) {
00062     ASSERT (!is_nil (a[i]), "lists of unequal lengths");
00063     cara[i]= car (a[i]);
00064   }
00065   vector<list<generic> > cdra= fill<list<generic> > (n);
00066   for (i=0; i<n; i++) cdra[i]= cdr (a[i]);
00067   generic r= fun->apply (cara);
00068   return cons (r, list_map_n (fun, cdra));
00069 }

list<generic> mmx::list_sort ( const list< generic > &  l,
const generic f 
)

Definition at line 123 of file glue_list_map.cpp.

References current_comparison, default_routine(), generic_compare(), and sort().

Referenced by glue_list_map().

00123                                                      {
00124   routine old_comparison= current_comparison;
00125   current_comparison= is<routine> (f)? as<routine> (f): default_routine (f);
00126   list<generic> r= sort (l, generic_compare);
00127   current_comparison= old_comparison;
00128   return r;
00129 }

generic lit ( const string s  ) 

Definition at line 39 of file literal.cpp.

00039                               {
00040   return new generic_concrete_rep<literal> (literal (s)); }

generic lit ( const char *  s  ) 
compound mmx::literal_apply ( const literal f,
const vector< generic > &  v 
) [inline]

Definition at line 70 of file mmc_glue.hpp.

References cons().

00070                                                            {
00071   return compound (cons (as<generic> (f), v));
00072 }

string literal_to_string ( const generic g  ) 
bool mmx::load ( const string file_path,
const string file_name,
string obj->lex_string 
)

Definition at line 749 of file system.cpp.

References decode_name(), and var_load().

00749                                                                    {
00750   //mmout << "load: " << file_path << ", " << file_name << lf;
00751   return var_load (file_path, decode_name (file_name), s);
00752 }

bool mmx::load ( const string orig_file_name,
string obj->lex_string 
)

Definition at line 718 of file system.cpp.

References decode_name(), and var_load().

00718                                                {
00719   return var_load (decode_name (orig_file_name), s);
00720 }

bool mmx::load ( const string fp,
const string file_name,
string s 
)
bool mmx::load ( const string file_name,
string s 
)
bool load_directory ( const string name,
vector< string > &  s 
)

Definition at line 764 of file system.cpp.

References as_charp(), decode_name(), free_charp(), and sort().

Referenced by mmc_load_directory(), and recursive_search_name().

00764                                                               {
00765   string name= decode_name (orig_name);
00766   DIR* dp;
00767   char* temp= as_charp (name);
00768   dp= opendir (temp);
00769   free_charp (temp);
00770   dir= vector<string> ();
00771   if (dp == NULL) return true;
00772 
00773   struct dirent* ep;
00774   while (true) {
00775     ep= readdir (dp);
00776     if (ep == NULL) break;
00777     dir << string (ep->d_name);
00778   }
00779   (void) closedir (dp);
00780   sort (dir);
00781   return false;
00782 }

string load_path (  ) 

Definition at line 259 of file system.cpp.

References _from_dos_to_unix(), get_env(), path_sep, prefix_dir(), and user_dir().

Referenced by path_name(), resolve_name(), and var_load().

00259              {
00260   string path= _from_dos_to_unix (get_env ("MMX_LOAD_PATH"));
00261   if (path != "" && path[0] != path_sep) path= string (path_sep) * path;
00262   path= "." * string (path_sep) * user_dir () * "/mmx"
00263     * string (path_sep) * prefix_dir () * "/share"
00264     * string (path_sep) * prefix_dir () * "/share/mmx" * path;
00265   return path;
00266 }

string mmx::locase ( const string obj->lex_string  ) 

Definition at line 452 of file string.cpp.

References is_upcase(), and N().

00452                          {
00453   nat i, n= N(s);
00454   string r (n);
00455   for (i=0; i<n; i++)
00456     if (!is_upcase (s[i])) r[i]= s[i];
00457     else r[i]= (char) (((int) ((unsigned char) s[i]))+32);
00458   return r;
00459 }

string mmx::locase ( const string &  s  ) 

Replace upcases by locases.

Referenced by GLUE_17().

string mmx::locase_first ( const string obj->lex_string  ) 

Definition at line 470 of file string.cpp.

References copy(), is_upcase(), and N().

00470                                {
00471   string r= copy (s);
00472   if (N(r) != 0 && is_upcase (s[0]))
00473     r[0]= (char) (((int) ((unsigned char) s[0]))+32);
00474   return r;
00475 }

string mmx::locase_first ( const string &  s  ) 

Replace upcase by locase for first letter.

Referenced by GLUE_19().

void mmx::lock ( const storage st,
const string var 
) [inline]

Read variable var from storage st.

Definition at line 72 of file storage.hpp.

Referenced by GLUE_6(), mmx_free_thread_safe(), mmx_malloc_thread_safe(), and mmx_realloc_thread_safe().

00072                                                         {
00073   st->lock (var); }

vector<C,V> mmx::log ( const vector< C, V > &  v  )  [inline]

Definition at line 1179 of file vector.hpp.

01179 { return unary_map<log_op> (v); }

table<C,T,V> mmx::log ( const table< C, T, V > &  t  )  [inline]

Definition at line 700 of file table.hpp.

00700 { return unary_map<log_op> (t); }

syntactic log ( const syntactic g  ) 

Definition at line 429 of file syntactic.cpp.

References GEN_LOG, and syn().

00429 { return syn (GEN_LOG, g); }

new_table<C,T,V> mmx::log ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 771 of file new_table.hpp.

00771 { return unary_map<log_op> (t); }

generic log ( const generic x1  ) 

Definition at line 439 of file generic.cpp.

References ACC_LOG, ACC_UNARY, current_ev, and GEN_LOG.

00439                         {
00440   ACC_UNARY (ACC_LOG, x1);
00441   return current_ev->apply (GEN_LOG, x1);
00442 }

double log ( const double &  x  )  [inline]

Definition at line 47 of file double.hpp.

Referenced by acosh(), asinh(), atanh(), log_op::op(), set_log2(), and log_op::set_op().

00047 { return std::log (x); }

double log2 ( const double &  x  )  [inline]

Definition at line 48 of file double.hpp.

Referenced by magnitude(), log2_op::op(), and log2_op::set_op().

00048 { return ::log2 (x); }

C mmx::log2_cst ( const format< C > &  fm  )  [inline]

Definition at line 927 of file type_props.hpp.

References C, promote(), and set_log2().

00927                                {
00928   C r= promote (0, fm); set_log2 (r); return r; }

C mmx::log2_cst (  )  [inline]

Definition at line 896 of file type_props.hpp.

References C, and set_log2().

00896 { C r; set_log2 (r); return r; }

nat mmx::log_2 ( nat  p  )  [inline]

Definition at line 70 of file int.hpp.

00070               {
00071   nat i=0;
00072   while (p>1) {
00073     p >>= 1;
00074     i++;
00075   }
00076   return i;
00077 }

nat mmx::log_3 ( nat  p  )  [inline]

Definition at line 96 of file int.hpp.

00096               {
00097   nat i=0;
00098   while (p>1) {
00099     p /= 3;
00100     i++;
00101   }
00102   return i;
00103 }

syntactic log_init ( const syntactic x,
const syntactic c 
)

Definition at line 491 of file syntactic.cpp.

References syn().

00491                                                             {
00492   return syn ("log_init", x, c); }

generic log_init ( const generic x,
const generic c 
)

Definition at line 804 of file generic.cpp.

References current_ev.

Referenced by log_op::op_init().

00804                                                         {
00805   return current_ev->apply ("log_init", x1, x2); }

vector<typename unary_return_type_helper<center_op, C >::RET,V> mmx::lower ( const vector< C, V > &  v  )  [inline]

Definition at line 1349 of file vector.hpp.

01349                                            {
01350   return unary_map<lower_op> (v); }

C mmx::lower ( const C &  x  )  [inline]

Definition at line 1114 of file type_props.hpp.

Referenced by lower_op::Center_type(), and lower_op::set_op().

01114 { return x; }

generic lres ( const generic x1,
const generic x2 
)

Definition at line 842 of file generic.cpp.

References current_ev.

00842                                                     {
00843   return current_ev->apply ("lres", x1, x2); }

void mmx::lshift2 ( C &  x,
const C &  y,
const S &  z 
) [inline]

Definition at line 296 of file defaults.hpp.

00296 { x= y << z; }

C mmx::lshift2 ( const C &  x  )  [inline]

Definition at line 292 of file defaults.hpp.

00292 { return lshift2<C,int> (x, 1); }

C mmx::lshift2 ( const C &  x,
const S &  y 
) [inline]

Definition at line 290 of file defaults.hpp.

Referenced by lshift2_op::op(), and lshift2_op::set_op().

00290 { return x << y; }

void mmx::lshift2_assign ( C &  x,
const S &  y 
) [inline]

Definition at line 294 of file defaults.hpp.

Referenced by lshift2_op::set_op().

00294 { x <<= y; }

syntactic lshiftz ( const syntactic g,
const syntactic sh 
)

Definition at line 471 of file syntactic.cpp.

References syn().

00471                                                             {
00472   return syn ("lshiftz", g, sh); }

generic lshiftz ( const generic x1,
const generic x2 
)

Definition at line 834 of file generic.cpp.

References current_ev.

00834                                                        {
00835   return current_ev->apply ("lshiftz", x1, x2); }

void mmx::lshiftz ( C &  x,
const C &  y,
const S &  z 
) [inline]

Definition at line 313 of file defaults.hpp.

00313 { x= y << z; }

C mmx::lshiftz ( const C &  x  )  [inline]

Definition at line 309 of file defaults.hpp.

00309 { return lshiftz<C,int> (x, 1); }

C mmx::lshiftz ( const C &  x,
const S &  y 
) [inline]

Definition at line 307 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().

00307 { return x << y; }

void mmx::lshiftz_assign ( C &  x,
const S &  y 
) [inline]

Definition at line 311 of file defaults.hpp.

Referenced by rshiftz_assign(), and lshiftz_op::set_op().

00311 { x <<= y; }

double mmx::magnitude ( const vector< C, V > &  v  )  [inline]

Definition at line 1333 of file vector.hpp.

01333                                                {
01334   return big<max_magnitude_op> (v); }

double magnitude ( const generic x  ) 

Definition at line 785 of file generic.cpp.

References ASSERT, current_ev, and GEN_MAGNITUDE.

00785                                     {
00786   generic r= current_ev->apply (GEN_MAGNITUDE, x);
00787   ASSERT (is<double> (r), "Double return value expected");
00788   return as<double> (r); }

double mmx::magnitude ( const double &  x  )  [inline]

Definition at line 93 of file double.hpp.

References log2().

00093 { return log2 (x); }

double mmx::magnitude ( const C &  x  )  [inline]

Definition at line 703 of file defaults.hpp.

References exponent().

Referenced by GLUE_48(), magnitude_op::op(), max_magnitude_op::set_op(), and magnitude_op::set_op().

00703                                                           {
00704   return (double) exponent (x); }

generic mmx::make_abstract ( const T &  x  )  [inline]

Definition at line 53 of file routine.hpp.

References generic_converter< T >::make_abstract().

00053                            {
00054   return generic_converter<T>::make_abstract (x);
00055 }

B mmx::make_ball ( const C &  c,
const R &  r 
) [inline]

Definition at line 1088 of file type_props.hpp.

01088                                    {
01089   return make_ball_helper<B,C,R>::val (c, r);
01090 }

document make_block ( const vector< document > &  v  ) 

Definition at line 97 of file document.cpp.

References make_document().

Referenced by GLUE_12().

00097                                        {
00098   return make_document (v, true);
00099 }

cache<C,T> mmx::make_cache_1 ( const format< T > &  fm1,
const format< C > &  fm2 
) [inline]

Definition at line 86 of file cache.hpp.

References Cache, and default_cst().

00086                                                           {
00087   return Cache (table<C,T> (default_cst (fm2), fm1));
00088 }

cache<C,T> mmx::make_cache_2 ( const C &  init,
const format< T > &  fm 
) [inline]

Definition at line 91 of file cache.hpp.

References Cache.

00091                                                   {
00092   return Cache (table<C,T> (init, fm));
00093 }

cache<C,T> mmx::make_cache_3 ( const vector< pair< T, C > > &  v  )  [inline]

Definition at line 96 of file cache.hpp.

References Cache, CF(), default_cst(), get_format2(), and iterate().

00096                                            {
00097   return Cache (table<C,T> (default_cst (get_format2 (CF(v))), iterate (v)));
00098 }

cache<C,T> mmx::make_cache_4 ( const C &  init,
const vector< pair< T, C > > &  v 
) [inline]

Definition at line 101 of file cache.hpp.

References Cache, and iterate().

00101                                                           {
00102   return Cache (table<C,T> (init, iterate (v)));
00103 }

T mmx::make_concrete ( const generic x  )  [inline]

Definition at line 48 of file routine.hpp.

References generic_converter< T >::make_concrete().

00048                                  {
00049   return generic_converter<T>::make_concrete (x);
00050 }

document mmx::make_document ( const vector< document > &  v,
bool  block = false 
)

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().

00071                                                              {
00072   //mmout << "v= " << v << indent << lf;
00073   vector<generic> r;
00074   if (block) r << generic ("$cr");
00075   for (nat i=0; i<N(v); i++) {
00076     generic x= as_generic (v[i]);
00077     //mmout << "v[" << i << "] = " << x << ": " << type_name (x) << lf;
00078     if (is_func (x, GEN_ROW)) {
00079       vector<document> a= as_documents (cdr (compound_to_vector (x)));
00080       r << as_generic (make_document (a));
00081       if (i != N(v) - 1) r << generic ("$lf");
00082     }
00083     else r << x;
00084   }
00085   //mmout << unindent;
00086   //mmout << "r= " << r << lf;
00087   if (N (r) == 1) return as_document (r[0]);
00088   else return as_document (gen ("$concat", r));
00089 }

sparse_vector<C,symbol<M>,hard_eq_sparse_vector> mmx::make_formal_vector ( const C &  c,
const M &  m 
) [inline]

Definition at line 353 of file sparse_vector.hpp.

00353                                             {
00354   return sparse_vector<C,symbol<M>,hard_eq_sparse_vector> (symbol<M> (m), c);
00355 }

document make_inline ( const vector< document > &  v  ) 

Definition at line 92 of file document.cpp.

References make_document().

Referenced by GLUE_11().

00092                                         {
00093   return make_document (v);
00094 }

B mmx::make_interval ( const C &  l,
const C &  r 
) [inline]

Definition at line 1110 of file type_props.hpp.

01110                                        {
01111   return make_interval_helper<B,C>::val (l, r);
01112 }

C mmx::make_literal ( const literal lit  )  [inline]

Definition at line 58 of file literal.hpp.

References as_string(), and C.

00058                                   {
00059   return C (as_string (lit));
00060 }

document make_math ( const document x  ) 

Definition at line 60 of file document.cpp.

References as_generic(), and make_math().

00060                               {
00061   return make_math (as_generic (x));
00062 }

document make_math ( const generic x  ) 

Definition at line 55 of file document.cpp.

References as_document(), and gen().

Referenced by GLUE_10(), GLUE_9(), and make_math().

00055                              {
00056   return as_document (gen ("$math", x));
00057 }

new_table<C,T> mmx::make_mmx_new_table ( const C &  init,
const vector< pair< T, C > > &  v 
) [inline]

Definition at line 885 of file new_table.hpp.

References iterate().

00885                                                                 {
00886   return table<C,T> (init, iterate (v));
00887 }

new_table<C,T> mmx::make_mmx_new_table ( const vector< pair< T, C > > &  v  )  [inline]

Definition at line 880 of file new_table.hpp.

References CF(), default_cst(), get_format2(), and iterate().

00880                                                  {
00881   return table<C,T> (default_cst (get_format2 (CF(v))), iterate (v));
00882 }

new_table<C,T> mmx::make_mmx_new_table ( const C &  init,
const format< T > &  fm 
) [inline]

Definition at line 875 of file new_table.hpp.

00875                                                         {
00876   return table<C,T> (init, fm);
00877 }

new_table<C,T> mmx::make_mmx_new_table ( const format< T > &  fm1,
const format< C > &  fm2 
) [inline]

Definition at line 870 of file new_table.hpp.

References default_cst().

00870                                                                 {
00871   return table<C,T> (default_cst (fm2), fm1);
00872 }

table<C,T> mmx::make_mmx_table ( const C &  init,
const vector< pair< T, C > > &  v 
) [inline]

Definition at line 814 of file table.hpp.

References iterate().

00814                                                             {
00815   return table<C,T> (init, iterate (v));
00816 }

table<C,T> mmx::make_mmx_table ( const vector< pair< T, C > > &  v  )  [inline]

Definition at line 809 of file table.hpp.

References CF(), default_cst(), get_format2(), and iterate().

00809                                              {
00810   return table<C,T> (default_cst (get_format2 (CF(v))), iterate (v));
00811 }

table<C,T> mmx::make_mmx_table ( const C &  init,
const format< T > &  fm 
) [inline]

Definition at line 804 of file table.hpp.

00804                                                     {
00805   return table<C,T> (init, fm);
00806 }

table<C,T> mmx::make_mmx_table ( const format< T > &  fm1,
const format< C > &  fm2 
) [inline]

Definition at line 799 of file table.hpp.

References default_cst().

Referenced by GLUE_6().

00799                                                             {
00800   return table<C,T> (default_cst (fm2), fm1);
00801 }

pair<T,U> mmx::make_pair ( const T &  x,
const U &  y 
) [inline]

Definition at line 704 of file mmc_glue.hpp.

00704                                    {
00705   return pair<T,U> (x, y);
00706 }

document make_row ( const vector< document > &  v  ) 

Definition at line 65 of file document.cpp.

References as_document(), as_generics(), gen(), and GEN_ROW.

Referenced by GLUE_13().

00065                                      {
00066   vector<generic> r= as_generics (v);
00067   return as_document (gen (GEN_ROW, r));
00068 }

document make_texmacs ( const literal x,
const vector< document > &  v 
)

Definition at line 107 of file document.cpp.

References as_document(), as_generics(), as_string(), and gen().

00107                                                              {
00108   return as_document (gen ("tm$" * as_string (fun), as_generics (v)));
00109 }

document make_texmacs ( const string x,
const vector< document > &  v 
)

Definition at line 102 of file document.cpp.

References as_document(), as_generics(), and gen().

Referenced by GLUE_5(), and GLUE_6().

00102                                                             {
00103   return as_document (gen ("tm$" * fun, as_generics (v)));
00104 }

document make_text ( const document x  ) 

Definition at line 50 of file document.cpp.

References as_generic(), and make_text().

00050                               {
00051   return make_text (as_generic (x));
00052 }

document make_text ( const generic x  ) 

Definition at line 45 of file document.cpp.

References as_document(), and gen().

Referenced by GLUE_8(), and make_text().

00045                              {
00046   return as_document (gen ("$text", x));
00047 }

vector<D> mmx::map ( const Fun &  fun,
const vector< S1 > &  v1,
const vector< S2 > &  v2,
const vector< S3 > &  v3,
const format< D > &  fm 
) [inline]

Definition at line 982 of file vector.hpp.

References ASSERT, is_non_scalar(), n, and N().

00985 {
00986   ASSERT (is_non_scalar (v1), "non-scalar vector expected");
00987   ASSERT (is_non_scalar (v2), "non-scalar vector expected");
00988   ASSERT (is_non_scalar (v3), "non-scalar vector expected");
00989   ASSERT (N(v1) == N(v2) && N(v2) == N(v3), "lengths don't match");
00990   nat n= N(v1);
00991   nat l= default_aligned_size<D> (n);
00992   D* r= mmx_formatted_new<D> (l, fm);
00993   for (nat i=0; i<n; i++) r[i]= fun (v1[i], v2[i], v3[i]);
00994   return vector<D> (r, n, l, fm);
00995 }

vector<D> mmx::map ( const function_3< D, typename argument_helper< S1 >::arg_type, typename argument_helper< S2 >::arg_type, typename argument_helper< S3 >::arg_type > &  fun,
const vector< S1 > &  v1,
const vector< S2 > &  v2,
const vector< S3 > &  v3 
) [inline]

Definition at line 965 of file vector.hpp.

References ASSERT, is_non_scalar(), n, and N().

00967 {
00968   format<D> fm; //= map (fun, CF(v1), CF(v2), CF(v3));
00969   ASSERT (is_non_scalar (v1), "non-scalar vector expected");
00970   ASSERT (is_non_scalar (v2), "non-scalar vector expected");
00971   ASSERT (is_non_scalar (v3), "non-scalar vector expected");
00972   ASSERT (N(v1) == N(v2) && N(v2) == N(v3), "lengths don't match");
00973   nat n= N(v1);
00974   nat l= default_aligned_size<D> (n);
00975   D* r= mmx_formatted_new<D> (l, fm);
00976   for (nat i=0; i<n; i++) r[i]= fun (v1[i], v2[i], v3[i]);
00977   return vector<D> (r, n, l, fm);
00978 }

vector<D> mmx::map ( const Fun &  fun,
const vector< S1 > &  v1,
const vector< S2 > &  v2,
const format< D > &  fm 
) [inline]

Definition at line 951 of file vector.hpp.

References ASSERT, is_non_scalar(), n, and N().

00953 {
00954   ASSERT (is_non_scalar (v1), "non-scalar vector expected");
00955   ASSERT (is_non_scalar (v2), "non-scalar vector expected");
00956   ASSERT (N(v1) == N(v2), "lengths don't match");
00957   nat n= N(v1);
00958   nat l= default_aligned_size<D> (n);
00959   D* r= mmx_formatted_new<D> (l, fm);
00960   for (nat i=0; i<n; i++) r[i]= fun (v1[i], v2[i]);
00961   return vector<D> (r, n, l, fm);
00962 }

vector<D> mmx::map ( D(*)(const S1 &, const S2 &)  fun,
const vector< S1 > &  v1,
const vector< S2 > &  v2 
) [inline]

Definition at line 936 of file vector.hpp.

References ASSERT, is_non_scalar(), n, and N().

00938 {
00939   format<D> fm; //= map (fun, CF(v1), CF(v2));
00940   ASSERT (is_non_scalar (v1), "non-scalar vector expected");
00941   ASSERT (is_non_scalar (v2), "non-scalar vector expected");
00942   ASSERT (N(v1) == N(v2), "lengths don't match");
00943   nat n= N(v1);
00944   nat l= default_aligned_size<D> (n);
00945   D* r= mmx_formatted_new<D> (l, fm);
00946   for (nat i=0; i<n; i++) r[i]= fun (v1[i], v2[i]);
00947   return vector<D> (r, n, l, fm);
00948 }

vector<D> mmx::map ( const function_2< D, typename argument_helper< S1 >::arg_type, typename argument_helper< S2 >::arg_type > &  fun,
const vector< S1 > &  v1,
const vector< S2 > &  v2 
) [inline]

Definition at line 921 of file vector.hpp.

References ASSERT, is_non_scalar(), n, and N().

00923 {
00924   format<D> fm; //= map (fun, CF(v1), CF(v2));
00925   ASSERT (is_non_scalar (v1), "non-scalar vector expected");
00926   ASSERT (is_non_scalar (v2), "non-scalar vector expected");
00927   ASSERT (N(v1) == N(v2), "lengths don't match");
00928   nat n= N(v1);
00929   nat l= default_aligned_size<D> (n);
00930   D* r= mmx_formatted_new<D> (l, fm);
00931   for (nat i=0; i<n; i++) r[i]= fun (v1[i], v2[i]);
00932   return vector<D> (r, n, l, fm);
00933 }

vector<D> mmx::map ( const Fun &  fun,
const vector< S1 > &  v1,
const format< D > &  fm 
) [inline]

Definition at line 911 of file vector.hpp.

References ASSERT, is_non_scalar(), N(), and n.

00911                                                                 {
00912   ASSERT (is_non_scalar (v1), "non-scalar vector expected");
00913   nat n= N(v1);
00914   nat l= default_aligned_size<D> (n);
00915   D* r= mmx_formatted_new<D> (l, fm);
00916   for (nat i=0; i<n; i++) r[i]= fun (v1[i]);
00917   return vector<D> (r, n, l, fm);
00918 }

vector<D> mmx::map ( D(*)(const S1 &)  fun,
const vector< S1 > &  v1 
) [inline]

Definition at line 900 of file vector.hpp.

References ASSERT, CF(), is_non_scalar(), map(), N(), and n.

00900                                                  {
00901   format<D> fm= map (fun, CF(v1));
00902   ASSERT (is_non_scalar (v1), "non-scalar vector expected");
00903   nat n= N(v1);
00904   nat l= default_aligned_size<D> (n);
00905   D* r= mmx_formatted_new<D> (l, fm);
00906   for (nat i=0; i<n; i++) r[i]= fun (v1[i]);
00907   return vector<D> (r, n, l, fm);
00908 }

vector<D> mmx::map ( const function_1< D, typename argument_helper< S1 >::arg_type > &  fun,
const vector< S1 > &  v1 
) [inline]

Definition at line 889 of file vector.hpp.

References ASSERT, CF(), is_non_scalar(), map(), N(), and n.

00889                                                                    {
00890   format<D> fm= map (fun, CF(v1));
00891   ASSERT (is_non_scalar (v1), "non-scalar vector expected");
00892   nat n= N(v1);
00893   nat l= default_aligned_size<D> (n);
00894   D* r= mmx_formatted_new<D> (l, fm);
00895   for (nat i=0; i<n; i++) r[i]= fun (v1[i]);
00896   return vector<D> (r, n, l, fm);
00897 }

table<C2,T2> mmx::map ( const Fun1 &  funT,
const Fun2 &  funC,
const table< C1, T1 > &  t,
const format< T2 > &  fmT,
const format< C2 > &  fmC 
) [inline]

Definition at line 596 of file table.hpp.

References busy(), entries(), I(), and simplify().

00599 {
00600   table<C2,T2> r (funC (I(t)), fmT);
00601   for (iterator<T1> it= entries (t); busy (it); ++it)
00602     r[funT(*it)]= funC (t[*it]);
00603   simplify (r);
00604   return r;
00605 }

row_tuple<D> mmx::map ( const function_1< D, typename argument_helper< S1 >::arg_type > &  fun,
const row_tuple< S1 > &  v1,
const format< D > &  fm 
) [inline]

Definition at line 88 of file row_tuple.hpp.

References as_vector(), and map().

00089                           {
00090   return as_row_tuple (map (fun, as_vector (v1), fm)); }

pair<C2,T2> mmx::map ( const Fun1 &  funT,
const Fun2 &  funC,
const pair< C1, T1 > &  p,
const format< C2 > &  fmC,
const format< T2 > &  fmT 
) [inline]

Definition at line 99 of file pair.hpp.

References set_as(), pair< C1, C2 >::x1, and pair< C1, C2 >::x2.

00102 {
00103   pair<C2,T2> r (fmC, fmT);
00104   set_as (r.x1, p.x1);
00105   set_as (r.x2, p.x2);
00106   return r;
00107 }

new_table<C2,T2> mmx::map ( const Fun1 &  funT,
const Fun2 &  funC,
const new_table< C1, T1 > &  t,
const format< T2 > &  fmT,
const format< C2 > &  fmC 
) [inline]

Definition at line 667 of file new_table.hpp.

References busy(), entries(), I(), and simplify().

00670 {
00671   table<C2,T2> r (funC (I(t)), fmT);
00672   for (iterator<T1> it= entries (t); busy (it); ++it)
00673     r[funT(*it)]= funC (t[*it]);
00674   simplify (r);
00675   return r;
00676 }

iterator<U> mmx::map ( const function_1< U, typename argument_helper< T >::arg_type > &  fun,
const iterator< T > &  it,
const format< U > &  fm 
) [inline]

Definition at line 559 of file mmc_glue.hpp.

00561 {
00562   return iterator<U> (new lift_arg_iterator_rep<T,U> (fun, it, fm));
00563 }

list<D> mmx::map ( const Fun &  fun,
const list< S1 > &  l1,
const format< D > &  fm 
) [inline]

Definition at line 337 of file list.hpp.

References car(), cdr(), cons(), is_nil(), and map().

00337                                                               {
00338   if (is_nil (l1)) return list<D> (fm);
00339   else return cons (fun (car (l1)), map (fun, cdr (l1), fm));
00340 }

format<R> mmx::map ( R(*)(const C &)  fun,
const format< C > &  fm 
) [inline]

Definition at line 201 of file function.hpp.

References C, and format_function_helper< FT, R, C, Fun >::op().

00201                                                {
00202   typedef R (*Fun) (const C&);
00203   typedef typename format<R>::FT FT;
00204   return format_function_helper<FT,R,C,Fun>::op (fun, fm);
00205 }

format<R> mmx::map ( const function_1< R, typename argument_helper< C >::arg_type > &  fun,
const format< C > &  fm 
) [inline]

Definition at line 194 of file function.hpp.

References format_function_helper< FT, R, C, Fun >::op().

00194                                                                  {
00195   typedef function_1<R,Argument(C) > Fun;
00196   typedef typename format<R>::FT FT;
00197   return format_function_helper<FT,R,C,Fun>::op (fun, fm);
00198 }

chain<D> mmx::map ( const Fun &  fun,
const chain< S1 > &  c1,
const format< D > &  fm 
) [inline]

Definition at line 353 of file chain.hpp.

References is_nil(), left(), middle(), and right().

Referenced by map().

00353                                                                {
00354   if (is_nil (c1)) return chain<D> (fm);
00355   return chain<D> (map (fun, left (c1), fm),
00356                    fun (middle (c1)),
00357                    map (fun, right (c1), fm));
00358 }

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_SEQAND, GEN_SEQOR, GEN_SIZE, GEN_SQTUPLE, GEN_TIMES, GEN_TO, GEN_TRANSTYPE, GEN_TUPLE, GEN_UNEQUAL, GEN_VARTRANSTYPE, GEN_VARTYPE, GEN_VWHERE, GEN_WHERE, GEN_XOR, and SET_OPNAME.

Referenced by as_math().

00024                      {
00025   table<string, string, exact_eq_table> t;
00026 
00027   SET_OPNAME (GEN_ACCESS, "_"); // or "%sqaccess"
00028   SET_OPNAME (GEN_AND, "/\\");
00029   SET_OPNAME (GEN_CATALAN, "%mathcatalan");
00030   SET_OPNAME (GEN_COMPOSE, "%circ");
00031   SET_OPNAME (GEN_APPEND, "%join");
00032   SET_OPNAME (GEN_DELTA, "%delta");
00033   SET_OPNAME (GEN_DERIVATIVE, "D");
00034   SET_OPNAME (GEN_DOT, "%dotaccess");
00035   SET_OPNAME (GEN_DIV, "div");
00036   SET_OPNAME (GEN_E, "%mathe");
00037   SET_OPNAME (GEN_EQUAL, "=");
00038   SET_OPNAME (GEN_EQUIV, "<=>");
00039   SET_OPNAME (GEN_EULER, "%matheuler");
00040   SET_OPNAME (GEN_FACTORIAL, "factorial");
00041   SET_OPNAME (GEN_GTR, ">");
00042   SET_OPNAME (GEN_GTREQ, ">=");
00043   SET_OPNAME (GEN_GTRGTR, ">>");
00044   SET_OPNAME (GEN_I, "%mathi");
00045   SET_OPNAME (GEN_IMPLIES, "=>");
00046   SET_OPNAME (GEN_IN, "%in");
00047   SET_OPNAME (GEN_INFINITY, "%infty");
00048   SET_OPNAME (GEN_INTO, "->");
00049   SET_OPNAME (GEN_LESS, "<");
00050   SET_OPNAME (GEN_LESSEQ, "<=");
00051   SET_OPNAME (GEN_LESSLESS, "<<");
00052   SET_OPNAME (GEN_MAPSTO, "#{:->}#");
00053   SET_OPNAME (GEN_MINUS, "-");
00054   SET_OPNAME (GEN_MOD, "mod");
00055   SET_OPNAME (GEN_NOT, "!");
00056   SET_OPNAME (GEN_OR, "\\/");
00057   SET_OPNAME (GEN_OVER, "/");
00058   SET_OPNAME (GEN_PARTIAL, "%partial");
00059   SET_OPNAME (GEN_PI, "%mathpi");
00060   SET_OPNAME (GEN_PLUS, "+&");
00061   SET_OPNAME (GEN_POWER, "^");
00062   SET_OPNAME (GEN_PRIME, "%prime");
00063   SET_OPNAME (GEN_RANGE, "%ldots"); // problem with iterator flattening
00064   SET_OPNAME (GEN_TO, "to");
00065   SET_OPNAME (GEN_DOWNTO, "downto");
00066   SET_OPNAME (GEN_ROW, "row");
00067   SET_OPNAME (GEN_SEQAND, "and");
00068   SET_OPNAME (GEN_SEQOR, "or");
00069   SET_OPNAME (GEN_SIZE, "%card");
00070   SET_OPNAME (GEN_SQTUPLE, "list");
00071   SET_OPNAME (GEN_TIMES, "*&");
00072   SET_OPNAME (GEN_VARTYPE, "%colons");
00073   SET_OPNAME (GEN_TRANSTYPE, "#{:>}#");
00074   SET_OPNAME (GEN_VARTRANSTYPE, "#{::>}#");
00075   SET_OPNAME (GEN_TUPLE, "tuple");
00076   //SET_OPNAME (GEN_TYPE, "#{:}#");
00077   SET_OPNAME (GEN_UNEQUAL, "!=");
00078   SET_OPNAME (GEN_VWHERE, "|");
00079   SET_OPNAME (GEN_WHERE, "||");
00080   SET_OPNAME (GEN_XOR, "%veebar");
00081 
00082   t["alpha"] = "%alpha";
00083   t["beta"] = "%beta";
00084   t["gamma"] = "%gamma";
00085   t["delta"] = "%delta";
00086   t["epsilon"] = "%varepsilon";
00087   t["zeta"] = "%zeta";
00088   t["eta"] = "%eta";
00089   t["theta"] = "%theta";
00090   t["iota"] = "%iota";
00091   t["kappa"] = "%kappa";
00092   t["lambda"] = "%lambda";
00093   t["mu"] = "%mu";
00094   t["nu"] = "%nu";
00095   t["xi"] = "%xi";
00096   t["omicron"] = "%omicron";
00097   t["pi"] = "%pi";
00098   t["rho"] = "%rho";
00099   t["sigma"] = "%sigma";
00100   t["tau"] = "%tau";
00101   t["upsilon"] = "%upsilon";
00102   t["phi"] = "%varphi";
00103   t["chi"] = "%chi";
00104   t["psi"] = "%psi";
00105   t["omega"] = "%omega";
00106 
00107   t["Alpha"] = "%Alpha";
00108   t["Beta"] = "%Beta";
00109   t["Gamma"] = "%Gamma";
00110   t["Delta"] = "%Delta";
00111   t["Epsilon"] = "%Epsilon";
00112   t["Zeta"] = "%Zeta";
00113   t["Eta"] = "%Eta";
00114   t["Theta"] = "%Theta";
00115   t["Iota"] = "%Iota";
00116   t["Kappa"] = "%Kappa";
00117   t["Lambda"] = "%Lambda";
00118   t["Mu"] = "%Mu";
00119   t["Nu"] = "%Nu";
00120   t["Xi"] = "%Xi";
00121   t["Omicron"] = "%Omicron";
00122   t["Pi"] = "%Pi";
00123   t["Rho"] = "%Rho";
00124   t["Sigma"] = "%Sigma";
00125   t["Tau"] = "%Tau";
00126   t["Upsilon"] = "%Upsilon";
00127   t["Phi"] = "%Phi";
00128   t["Chi"] = "%Chi";
00129   t["Psi"] = "%Psi";
00130   t["Omega"] = "%Omega";
00131   return t;
00132 }

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.

00053                                                            {
00054   return p1.position > p2.position? p1: p2;
00055 };

generic max ( const generic x1,
const generic x2 
)

Definition at line 728 of file generic.cpp.

References current_ev, and GEN_MAX.

00728                                                    {
00729   return current_ev->apply (GEN_MAX, x1, x2); }

C mmx::max ( const C &  x,
const C &  y 
) [inline]
C mmx::maximal_cst ( const format< C > &  fm  )  [inline]

Definition at line 957 of file type_props.hpp.

References C, promote(), and set_maximal().

00957                                   {
00958   C r= promote (0, fm); set_maximal (r); return r; }

C mmx::maximal_cst (  )  [inline]

Definition at line 916 of file type_props.hpp.

References C, and set_maximal().

00916 { 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.

Referenced by input_output_string_port_rep::read(), input_string_port_rep::read(), and posix_port_rep::read().

00112                                                {
00113   for (nat i=0; i<n; i++) d[i]= s[i]; }

list<C> mmx::merge ( const list< C > &  head,
const list< C > &  tail,
int(*)(const C &, const C &)  cmp 
) [inline]

Merge head and tail that are supposed to be ordered increasingly wrt cmp.

Definition at line 41 of file list_sort.hpp.

References car(), cdr(), cons(), and is_nil().

Referenced by sort().

00041                                                                             {
00042   if (is_nil (head)) return tail;
00043   if (is_nil (tail)) return head;
00044   if (cmp (car (head), car (tail)) <= 0)
00045     return cons (car (head), merge (cdr (head), tail, cmp));
00046   return cons (car (tail), merge (head, cdr (tail), cmp));
00047 }

void message ( const dynamic d,
const generic msg 
)

Definition at line 41 of file dynamic.cpp.

References N().

00041                                                {
00042   for (nat i=0; i<N(d->obs); i++)
00043     d->obs[i]->message (msg);
00044 }

C middle ( const chain< C > &  c  )  [inline]
syntactic migrate_negate ( const syntactic g,
nat  maximal 
)

Definition at line 221 of file syntactic.cpp.

References GEN_MINUS, GEN_PLUS, is_func(), migrate_sub(), and signed_decompose().

Referenced by ordered_sum().

00221                                                  {
00222   int i= 0, found= -1;
00223   syntactic h= g;
00224   while (is_func (h, GEN_PLUS, 2) || is_func (h, GEN_MINUS, 2)) {
00225     if (is_func (h, GEN_PLUS, 2)) found= i;
00226     if (maximal == 0) return g;
00227     h= h[1];
00228     maximal--;
00229     i++;
00230   }
00231   if (found == -1) return g;
00232   syntactic abs_h; int sgn_h;
00233   signed_decompose (h, abs_h, sgn_h);
00234   if (sgn_h >= 0) return g;
00235   return migrate_sub (g, found);
00236 }

static syntactic mmx::migrate_sub ( const syntactic g,
nat  found 
) [static]

Definition at line 215 of file syntactic.cpp.

References migrate_sub(), and syn().

00215                                             {
00216   if (found == 0) return migrate_sub (g[1], g[2]);
00217   return syn (g[0], migrate_sub (g[1], found-1), g[2]);
00218 }

static syntactic mmx::migrate_sub ( const syntactic g,
const syntactic h 
) [static]

Definition at line 206 of file syntactic.cpp.

References GEN_MINUS, is_func(), signed_decompose(), and syn().

Referenced by migrate_negate(), and migrate_sub().

00206                                                      {
00207   if (is_func (g, GEN_MINUS, 2))
00208     return syn (GEN_MINUS, migrate_sub (g[1], h), g[2]);
00209   syntactic abs_g; int sgn_g;
00210   signed_decompose (g, abs_g, sgn_g);
00211   return syn (GEN_MINUS, h, abs_g);
00212 }

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.

00048                                                            {
00049   return p1.position < p2.position? p1: p2;
00050 };

generic min ( const generic x1,
const generic x2 
)

Definition at line 726 of file generic.cpp.

References current_ev, and GEN_MIN.

00726                                                    {
00727   return current_ev->apply (GEN_MIN, x1, x2); }

C mmx::min ( const C &  x,
const C &  y 
) [inline]
C mmx::minimal_cst ( const format< C > &  fm  )  [inline]

Definition at line 960 of file type_props.hpp.

References C, promote(), and set_minimal().

00960                                   {
00961   C r= promote (0, fm); set_minimal (r); return r; }

C mmx::minimal_cst (  )  [inline]

Definition at line 918 of file type_props.hpp.

References C, and set_minimal().

00918 { C r; set_minimal (r); return r; }

bool mkdir ( const string orig_name  ) 

Definition at line 807 of file system.cpp.

References decode_name(), and var_mkdir().

Referenced by var_mkdir().

00807                            {
00808   return var_mkdir (decode_name (name));
00809 }

exception mmc_exception ( const string message,
const generic where 
) [final]

Definition at line 105 of file mmc_glue.cpp.

00105                                                             {
00106   return exception (message, where);
00107 }

void mmc_exit ( const int &  status  ) 

Definition at line 41 of file mmc_glue.cpp.

References mmc_terminate().

00041                              {
00042   mmc_terminate ();
00043   exit (status);
00044 }

void mmc_initialize ( int  argc,
char **  argv 
)

Definition at line 28 of file mmc_glue.cpp.

References compiler_initialize, and mmc_args.

00028                                        {
00029   mmc_args= fill<string> (argc);
00030   for (int i= 0; i<argc; i++)
00031     mmc_args[(nat) i]= string (argv[i]);
00032   if (compiler_initialize != NULL) compiler_initialize ();
00033 }

string mmc_load ( const string name  ) 

Definition at line 64 of file mmc_glue.cpp.

References ASSERT, load(), and s.

00064                               {
00065   string s;
00066   string file_name= name; //resolve_name ("", name); FIXME ???
00067   bool e= load (file_name, s);
00068   ASSERT (!e, "file did not load");
00069   return s;
00070 }

vector< string > mmc_load_directory ( const string name  ) 

Definition at line 50 of file mmc_glue.cpp.

References ERROR, load_directory(), and relative_name().

00050                                                        {
00051   string dir_name= relative_name ("", name);
00052   vector<string> dir;
00053   if (load_directory (dir_name, dir))
00054     ERROR ("directory " * dir_name * " not found");
00055   return dir;
00056 }

generic mmc_parse ( const string s,
const string input_name 
)

Definition at line 93 of file mmc_glue.cpp.

References mmx_parse(), and store_file_source().

00093                                                       {
00094   store_file_source (input_name, s);
00095   generic r= mmx_parse (input_name, s);
00096   if (is<exception> (r)) throw as<exception> (r);
00097   return r;  
00098 }

generic mmc_parse ( const string file_name  ) 

Definition at line 81 of file mmc_glue.cpp.

References ERROR, load(), mmx_parse(), s, store_file_source(), and strip_preamble().

00081                                     {
00082   string s;
00083   if (load (file_name, s))
00084     ERROR ("file " * file_name * " not found");
00085   s= strip_preamble (s);
00086   store_file_source (file_name, s);
00087   generic r= mmx_parse (file_name, s);
00088   if (is<exception> (r)) throw as<exception> (r);
00089   return r;
00090 }

void mmc_save ( const string name,
const string s 
)

Definition at line 59 of file mmc_glue.cpp.

References save().

00059                                                {
00060   (void) save (name, s);
00061 }

void mmc_terminate (  ) 

Definition at line 36 of file mmc_glue.cpp.

References compiler_terminate.

Referenced by mmc_exit().

00036                  {
00037   if (compiler_terminate != NULL) compiler_terminate ();
00038 }

generic mmc_unliteral ( const generic x  ) 

Definition at line 115 of file mmc_glue.cpp.

References as_double(), as_int(), as_string(), ERROR, is_func(), mmerr, and unquote().

00115                                  {
00116   if (is_func (x, "literal_integer", 1))
00117     return as<generic> (as_int (as_string (as<literal> (x[1]))));
00118   else if (is_func (x, "literal_floating", 1))
00119     return as<generic> (as_double (as_string (as<literal> (x[1]))));
00120   else if (is_func (x, "literal_string", 1))
00121     return as<generic> (unquote (as_string (as<literal> (x[1]))));
00122   else {
00123     mmerr << "x= " << x << "\n";
00124     ERROR ("unknown literal type");
00125   }
00126 }

void mmx::mmx_classical_delete ( C *  Ptr  )  [inline]

Definition at line 331 of file fast_new.hpp.

References C, mmx_free(), and n.

00331                               {
00332   void* ptr= (void*) (((nat*) ((void*) Ptr)) - 1);
00333   nat n= *((nat*) ptr);
00334   C* ctr= Ptr+n-1;
00335   for (nat i=0; i<n; i++, ctr--) ctr -> ~C();
00336   mmx_free (ptr, n * sizeof (C) + sizeof (nat));
00337 }

C* mmx::mmx_classical_new ( nat  n  )  [inline]

Definition at line 320 of file fast_new.hpp.

References C, and mmx_malloc().

00320                           {
00321   void* ptr= mmx_malloc (n * sizeof (C) + sizeof (nat));
00322   *((nat*) ptr)= n;
00323   ptr= (void*) (((nat*) ptr) + 1);
00324   C* ctr= (C*) ptr;
00325   for (nat i=0; i<n; i++, ctr++)
00326     (void) new ((void*) ctr) C ();
00327   return (C*) ptr;
00328 }

size_t mmx::mmx_compute_free ( void *  ptr  ) 

Definition at line 118 of file fast_new.cpp.

References MMX_IND.

Referenced by mmx_mem_info(), and mmx_used_bytes().

00118                              {
00119   nat i= (nat) -1;
00120   while (ptr!=NULL) {
00121     i++;
00122     ptr= MMX_IND (ptr);
00123   }
00124   return i;
00125 }

xnat mmx::mmx_cpu_time (  )  [inline]

Number of cycles of the cpu.

Definition at line 58 of file timer.hpp.

00058                             {
00059   return (xnat) clock ();
00060 }

string mmx::mmx_cpu_time_unit (  )  [inline]

Definition at line 61 of file timer.hpp.

00061 { return("mus"); };

void mmx::mmx_delete ( C *  Ptr,
nat  n 
) [inline]

Definition at line 285 of file fast_new.hpp.

References C, and mmx_free().

Referenced by vector< observer >::vector().

00285                            {
00286 #ifdef BASIX_ENABLE_VERIFY
00287   void* ptr= (void*) Ptr;
00288   //printf ("{--%p}", ptr); fflush (stdout);
00289   ptr= (void*) (((char*) ptr) - 16);
00290   //printf ("{-%p}", ptr); fflush (stdout);
00291   if (*((nat*) ptr) != n)
00292     printf ("[%u should be %u]\n", n, *((nat*) ptr));
00293   assert (*((nat*) ptr) == n);
00294   C* ctr= Ptr+n-1;
00295   for (nat i=0; i<n; i++, ctr--) ctr -> ~C();
00296   mmx_free (ptr, n * sizeof (C) + 16);
00297 #else
00298   C* ctr= Ptr+n-1;
00299   for (nat i=0; i<n; i++, ctr--) ctr -> ~C();
00300   mmx_free ((void*) Ptr, n * sizeof (C));
00301 #endif
00302 }

void mmx::mmx_delete_at ( T *  pos  )  [inline]

Definition at line 72 of file new_table.hpp.

References T.

Referenced by new_table_rep< C, T, V >::remove(), and new_table_rep< C, T, V >::resize().

00072                        {
00073   pos -> ~T ();
00074 }

void mmx::mmx_delete_one ( C *  ptr  )  [inline]

Definition at line 315 of file fast_new.hpp.

00315                         {
00316   mmx_delete<C> (ptr, 1);
00317 }

void mmx::mmx_delete_uninitialized ( T *  mem,
nat  i 
) [inline]

Definition at line 62 of file new_table.hpp.

References T.

00062                                          {
00063   mmx_delete<char> ((char*) ((void*) mem), i * sizeof (T));
00064 }

T* mmx::mmx_formatted_new ( nat  l,
const format< T > &  fm 
) [inline]

Definition at line 587 of file type_props.hpp.

00587                                                {
00588   typedef typename format<T>::FT FT;
00589   return formatted_new_helper<FT,T>::op (l, fm);
00590 }

void mmx::mmx_free ( void *  ptr,
size_t  old_size 
) [inline]
void mmx::mmx_free_thread_safe ( void *  ptr,
size_t  old_size 
) [inline]

Definition at line 193 of file fast_new.hpp.

References lock(), memory_lock, and mmx_free_thread_unsafe().

Referenced by mmx_free().

00193                                                   {
00194   mutex_lock lock (memory_lock);
00195   mmx_free_thread_unsafe (ptr, old_size); }

void mmx_free_thread_unsafe ( register void *  ptr,
register size_t  sz 
)

Definition at line 93 of file fast_new.cpp.

References large_uses, MMX_ALLOC_PTR, MMX_IND, MMX_MAX_FAST, MMX_WORD_LENGTH_INC, MMX_WORD_MASK, and safe_free().

Referenced by mmx_free(), mmx_free_thread_safe(), and mmx_realloc_thread_unsafe().

00093                                                                 {
00094   if (sz == 0) return;
00095   sz=(sz+MMX_WORD_LENGTH_INC)&MMX_WORD_MASK;
00096   if (sz<MMX_MAX_FAST) {
00097     MMX_IND (ptr)     = MMX_ALLOC_PTR (sz);
00098     MMX_ALLOC_PTR (sz)= ptr;
00099   }
00100   else {
00101     large_uses -= sz;
00102     safe_free (ptr);
00103     //printf ("Big free of %d bytes", (int) sz);
00104     //printf ("Memory used: %d bytes", (int) mmx_used_bytes ());
00105   }
00106 }

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.

00079                                              {
00080   if (pos == n) {
00081     s= NULL;
00082     *lval= generic ();
00083     return 0;
00084   }
00085 
00086   SET_PREV;
00087   char c= s[pos];
00088   while ((c<=' ') || (c>'~')) {
00089     if ((c == '\n') || (c == '\r')) 
00090       INC_LINE
00091     else
00092       INC_POS;
00093     if (pos == n) {
00094       s= NULL;
00095       *lval= generic ();
00096       return 0;
00097     }
00098     c= s[pos];
00099   }
00100 
00101   SAVE_START;
00102   INC_POS;
00103   switch (c) {
00104   case '!':
00105     test ('=', NOT_EQUAL);
00106     if ((pos<n) && (s[pos]=='<')) {
00107       INC_POS;
00108       test ('=', NOT_LEQ);
00109       produce (NOT_LESS);
00110     }
00111     if ((pos<n) && (s[pos]=='>')) {
00112       INC_POS;
00113       test ('=', NOT_GEQ);
00114       produce (NOT_GREATER);
00115     }
00116     produce (NOT);
00117   case '\042':
00118     while (pos<n) {
00119       if ((s[pos]=='\\') && ((pos+2)<n)) { ADD_POS(2); continue; }
00120       if (s[pos]=='\n' || (s[pos]=='\r')) { INC_LINE; continue; }
00121       if (s[pos]=='\042') { INC_POS; break; }
00122       INC_POS;
00123     }
00124     produce (STRING);
00125   case '#':
00126     produce (SIZE);
00127   case '$':
00128     goto identifier;
00129   case '%':
00130     produce (PERCENT);
00131   case '&':
00132     produce (AMPERSAND);
00133   case '\047':
00134     produce (QUOTE);
00135   case '(':
00136   case ')':
00137     produce (c);
00138   case '*':
00139     test ('=', TIMES_ASSIGN);
00140     produce (TIMES);
00141   case '+':
00142     test ('=', PLUS_ASSIGN);
00143     test ('+', INC);
00144     produce (PLUS);
00145   case ',':
00146     produce (c);
00147   case '-':
00148     test ('=', MINUS_ASSIGN);
00149     test ('-', DEC);
00150     test ('>', INTO);
00151     produce (MINUS);
00152   case '.':
00153     test ('.', RANGE);
00154     produce (ACCESS);
00155   case '/':
00156     test ('\\', AND);
00157     if (s[pos]=='/') {
00158       INC_POS;
00159       while ((pos<n) && (s[pos]!='\n')) {
00160         INC_POS;
00161       }
00162       if (pos<n) { INC_LINE; }
00163       return mmx_lex (lval, obj);
00164     }
00165     if (s[pos]=='{') {
00166       nat level= 1;
00167       INC_POS;
00168       while ((pos+1<n) && (level>0)) {
00169         if (s[pos]=='\n' || (s[pos]=='\r')) {
00170           INC_LINE; continue; }
00171         if ((s[pos]=='/') && (s[pos+1]=='{')) {
00172           level++; ADD_POS(2); continue; }
00173         if ((s[pos]=='}') && (s[pos+1]=='/')) {
00174           level--; ADD_POS(2); continue; }
00175         INC_POS;
00176       }
00177       if (level>0) pos=n;
00178       return mmx_lex (lval, obj);
00179     }
00180     if (s[pos] == '\"') {
00181       INC_POS;
00182       while ((pos+1<n) && ((s[pos]!='\"') || (s[pos+1]!='/'))) {
00183         if (s[pos]=='\n' || (s[pos]=='\r')) {
00184           INC_LINE; }
00185         else {
00186           INC_POS; }
00187       }
00188       if (pos+1 < n) {
00189         ADD_POS(2);
00190       }
00191       produce (STRING);
00192     }
00193     test ('=', OVER_ASSIGN);
00194     produce (OVER);
00195   case '0':
00196   case '1':
00197   case '2':
00198   case '3':
00199   case '4':
00200   case '5':
00201   case '6':
00202   case '7':
00203   case '8':
00204   case '9':
00205     goto identifier;
00206   case ':':
00207     if ((pos<n) && (s[pos]=='=')) {
00208       if ((pos+1<n) && (s[pos+1]=='>')) {
00209         ADD_POS(2); produce (ASSIGN_MACRO); }
00210       INC_POS; produce (ASSIGN);
00211     }
00212     test ('>', TRANSTYPE);
00213     if ((pos<n) && (s[pos]==':')) {
00214       if ((pos+1<n) && (s[pos+1]=='>')) {
00215         ADD_POS(2); produce (VARTRANSTYPE); }
00216       INC_POS; produce (VARTYPE);
00217     }
00218     if ((pos+1<n) && (s[pos]=='-') && (s[pos+1]=='>')) {
00219       ADD_POS(2); produce (MAPSTO);
00220     }
00221     produce (TYPE);
00222   case ';':
00223     produce (c);
00224   case '<':
00225     if ((pos<n) && (s[pos]=='<')) {
00226       if ((pos+1<n) && (s[pos+1]=='<')) {
00227         ADD_POS(2); produce (LEFT_FLUX_BIN); }
00228       if ((pos+1<n) && (s[pos+1]=='*')) {
00229         ADD_POS(2); produce (LEFT_FLUX_VAR); }
00230       if ((pos+1<n) && (s[pos+1]=='%')) {
00231         ADD_POS(2); produce (LEFT_FLUX_STR); }
00232       if ((pos+1<n) && (s[pos+1]=='=')) {
00233         ADD_POS(2); produce (LL_ASSIGN); }
00234       INC_POS; produce (LEFT_FLUX);
00235     }
00236     if ((pos+1<n) && (s[pos]=='=') && (s[pos+1]=='>')) {
00237       ADD_POS(2); produce (EQUIVALENT);
00238     }
00239     test ('=', LEQ);
00240     produce (LESS);
00241   case '=':
00242     if ((pos<n) && (s[pos]=='=')) {
00243       if ((pos+1<n) && (s[pos+1]=='>')) {
00244         ADD_POS(2); produce (DEFINE_MACRO); }
00245       INC_POS; produce (DEFINE);
00246     }
00247     test ('>', IMPLIES);
00248     produce (EQUAL);
00249   case '>':
00250     test ('<', APPEND);
00251     if ((pos<n) && (s[pos]=='>')) {
00252       if ((pos+1<n) && (s[pos+1]=='>')) {
00253         ADD_POS(2); produce (RIGHT_FLUX_BIN); }
00254       if ((pos+1<n) && (s[pos+1]=='=')) {
00255         ADD_POS(2); produce (GG_ASSIGN); }
00256       INC_POS; produce (RIGHT_FLUX);
00257     }
00258     test ('=', GEQ);
00259     produce (GREATER);
00260   case '?':
00261     goto identifier;
00262   case '@':
00263     test ('+', OPLUS);
00264     test ('-', OMINUS);
00265     test ('*', OTIMES);
00266     test ('/', OOVER);
00267     produce (COMPOSE);
00268   case 'A':
00269   case 'B':
00270   case 'C':
00271   case 'D':
00272   case 'E':
00273   case 'F':
00274   case 'G':
00275   case 'H':
00276   case 'I':
00277   case 'J':
00278   case 'K':
00279   case 'L':
00280   case 'M':
00281   case 'N':
00282   case 'O':
00283   case 'P':
00284   case 'Q':
00285   case 'R':
00286   case 'S':
00287   case 'T':
00288   case 'U':
00289   case 'V':
00290   case 'W':
00291   case 'X':
00292   case 'Y':
00293   case 'Z':
00294     goto identifier;
00295   case '[':
00296     produce (c);
00297   case '\\':
00298     test ('/', OR);
00299     produce (c);
00300   case ']':
00301     produce (c);
00302   case '^':
00303     test ('^', FILL);
00304     produce (POWER);
00305   case '_':
00306     goto identifier;
00307   case '`':
00308     produce (BACKQUOTE);
00309   case 'a':
00310     if (pos<n) {
00311       keyword ('b', "abstract", ABSTRACT);
00312       keyword ('n', "and", SEQAND);
00313       keyword ('s', "assume", ASSUME);
00314       keyword ('u', "autofold", AUTOFOLD);
00315     }
00316     goto identifier;
00317   case 'b':
00318     if (pos<n) keyword ('r', "break", BREAK);
00319     goto identifier;
00320   case 'c':
00321     if ((pos+3)<n) {
00322       if (s[pos]=='a') {
00323         INC_POS;
00324         keyword ('s', "case", CASE);
00325         if (s[pos] == 't') {
00326           INC_POS;
00327           keyword ('c', "catch", CATCH);
00328           keyword ('e', "category", CATEGORY);
00329         }
00330         goto identifier;
00331       }
00332       keyword ('l', "class", CLASS);
00333       if ((s[pos]=='o') && (s[pos+1]=='n')) {
00334         ADD_POS(2);
00335         keyword ('c', "concrete", CONCRETE);
00336         if (((pos+1)<n) && s[pos]=='s' && s[pos+1]=='t') {
00337           ADD_POS(2);
00338           keyword ('a', "constant", CONSTANT);
00339           keyword ('r', "constructor", CONSTRUCTOR);
00340           goto identifier;
00341         }
00342         keyword ('t', "continue", CONTINUE);
00343       }
00344     }
00345     goto identifier;
00346   case 'd':
00347     if (pos<n) {
00348       keyword ('e', "destructor", DESTRUCTOR);
00349       if (s[pos]=='i') {
00350         INC_POS;
00351         keyword ('r', "direct", DIRECT);
00352         if (((pos+1)<n) && s[pos]=='s') {
00353           INC_POS;
00354           keyword ('j', "disjunction", DISJUNCTION);
00355           keyword ('p', "dispatch", DISPATCH);
00356           goto identifier;
00357         }
00358         keyword ('v', "div", DIV);
00359         goto identifier;
00360       }
00361       if (s[pos]=='o') {
00362         INC_POS;
00363         if ((pos >= n) || (!is_alpha (s[pos]))) produce (DO);
00364         keyword ('w', "downto", DOWNTO);
00365       }
00366     }
00367     goto identifier;
00368   case 'e':
00369     if ((pos+1)<n) {
00370       keyword ('l', "else", ELSE);
00371       keyword ('v', "evolutive", EVOLUTIVE);
00372       if (s[pos]=='x') {
00373         INC_POS;
00374         keyword ('i', "exists", EXISTS);
00375         if (s[pos]=='p' && pos+1<n) {
00376           INC_POS;
00377           keyword ('l', "explicit", EXPLICIT);
00378           keyword ('o', "export", EXPORT);
00379         }
00380         else if (((pos+2)<n) && (s[pos]=='t') && (s[pos+1]=='e')) {
00381           ADD_POS(2);
00382           keyword ('n', "extend", EXTEND);
00383           keyword ('r', "extern", EXTERN);
00384         }
00385       }
00386     }
00387     goto identifier;
00388   case 'f':
00389     if (pos<n) {
00390       if ((pos+1<n) && (s[pos]=='o') && (s[pos+1]=='r')) {
00391         if ((pos+2<n) && (s[pos+2]=='a')) {
00392           keyword ('o', "forall", FORALL); }
00393         else if ((pos+2<n) && (s[pos+2]=='e')) {
00394           keyword ('o', "foreign", FOREIGN); }
00395         else {
00396           keyword ('o', "for", FOR); }
00397       }
00398       keyword ('r', "from", FROM);
00399     }
00400     goto identifier;
00401   case 'g':
00402     if (pos<n) keyword ('e', "generate", GENERATE);
00403     goto identifier;
00404   case 'h':
00405     if (pos<n) {
00406       keyword ('a', "has", HAS);
00407       keyword ('i', "hidden", HIDDEN);
00408       keyword ('o', "holds", HOLDS);
00409     }
00410     goto identifier;
00411   case 'i':
00412     if (pos<n) {
00413       keyword ('f', "if", IF);
00414       if (s[pos]=='m' && pos+2<n && s[pos+1]=='p') {
00415         ADD_POS(2);
00416         keyword ('o', "import", IMPORT);
00417         keyword ('l', "implicit", IMPLICIT);
00418       }
00419       else if (s[pos]=='n') {
00420         INC_POS;
00421         if ((pos >= n) || (!is_alpha (s[pos]))) produce (IN);
00422         keyword ('d', "indirect", INDIRECT);
00423         keyword ('f', "infix", INFIX);
00424         keyword ('h', "inherit", INHERIT);
00425         keyword ('l', "inline", INLINE);
00426         keyword ('p', "inplace", INPLACE);
00427         if ((pos+3<n) && (s[pos]=='t') && (s[pos+1]=='e') && (s[pos+2]=='r')) {
00428           ADD_POS(3);
00429           keyword ('a', "interactive", INTERACTIVE);
00430           keyword ('n', "intern", INTERN);
00431         }
00432       }
00433     }
00434     goto identifier;
00435   case 'j':
00436     if (pos<n) keyword ('o', "join", JOIN);
00437     goto identifier;
00438   case 'k':
00439     if (pos<n) keyword ('e', "keyword", KEYWORD);
00440     goto identifier;
00441   case 'l':
00442     if (pos<n) {
00443       keyword ('a', "lambda", LAMBDA);
00444       keyword ('i', "literal", LITERAL);
00445       if (((pos+1)<n) && (s[pos]=='o')) {
00446         INC_POS;
00447         keyword ('c', "locked", LOCKED);
00448         keyword ('o', "loop", LOOP);
00449       }
00450     }
00451     goto identifier;
00452   case 'm':
00453     if (pos<n) {
00454       if (((pos+1)<n) && (s[pos]=='a')) {
00455         INC_POS;
00456         keyword ('c', "macro", MACRO);
00457         keyword ('t', "match", MATCH);
00458         goto identifier;
00459       }
00460       keyword ('e', "method", METHOD);
00461       if (((pos+1)<n) && (s[pos]=='o') && (s[pos+1]=='d')) {
00462         if ((pos+2<n) && (s[pos+2]=='u')) {
00463           keyword ('o', "module", MODULE); }
00464         else {
00465           keyword ('o', "mod", MOD); }
00466       }
00467       keyword ('u', "mutable", MUTABLE);
00468     }
00469     goto identifier;
00470   case 'n':
00471     goto identifier;
00472   case 'o':
00473     if (pos<n) {
00474       keyword ('p', "operator", OPERATOR);
00475       keyword ('r', "or", SEQOR);
00476       keyword ('u', "outline", OUTLINE);
00477     }
00478     goto identifier;
00479   case 'p':
00480     if ((pos+1)<n) {
00481       if (s[pos]=='a') {
00482         INC_POS;
00483         keyword ('c', "packed", PACKED);
00484         keyword ('t', "pattern", PATTERN);
00485         goto identifier;
00486       }
00487       keyword ('e', "penalty", PENALTY);
00488       keyword ('o', "postfix", POSTFIX);
00489       if (s[pos]=='r') {
00490         INC_POS;
00491         if ((pos+3<n) && s[pos] == 'e' && s[pos+1] == 'f') {
00492           ADD_POS(2);
00493           keyword ('e', "prefer", PREFER);
00494           keyword ('i', "prefix", PREFIX);
00495           goto identifier;
00496         }
00497         keyword ('i', "private", PRIVATE);
00498         keyword ('o', "protected", PROTECTED);
00499         goto identifier;
00500       }
00501       keyword ('u', "public", PUBLIC);
00502     }
00503     goto identifier;
00504   case 'q':
00505     if (pos<n) keyword ('u', "quo", QUO);
00506     goto identifier;
00507   case 'r':
00508     if ((pos+1)<n) {
00509       keyword ('a', "raise", RAISE);
00510       if (s[pos]=='e') {
00511         INC_POS;
00512         keyword ('m', "rem", REM);
00513         keyword ('t', "return", RETURN);
00514       }
00515     }
00516     goto identifier;
00517   case 's':
00518     if (pos<n) {
00519       keyword ('e', "sequel", SEQUEL);
00520       keyword ('p', "split", SPLIT);
00521       if ((pos+1<n) && (s[pos]=='t')) {
00522         INC_POS;
00523         keyword ('e', "step", STEP);
00524         keyword ('r', "structure", STRUCTURE);
00525         goto identifier;
00526       }
00527     }
00528     goto identifier;
00529   case 't':
00530     if ((pos+1)<n) {
00531       if (s[pos]=='h') {
00532         INC_POS;
00533         keyword ('e', "then", THEN);
00534         keyword ('i', "this", THIS);
00535         goto identifier;
00536       }
00537       keyword ('r', "try", TRY);
00538       keyword ('o', "to", TO);
00539     }
00540     goto identifier;
00541   case 'u':
00542     if (((pos+1)<n) && (s[pos]=='n')) {
00543       INC_POS;
00544       keyword ('p', "unpacked", UNPACKED);
00545       keyword ('t', "until", UNTIL);
00546     }
00547     goto identifier;
00548   case 'v':
00549     if (pos<n) {
00550       keyword ('a', "value", VALUE);
00551       keyword ('i', "virtual", VIRTUAL);
00552     }
00553     goto identifier;
00554   case 'w':
00555     if (pos<n) {
00556       keyword ('h', "while", WHILE);
00557       keyword ('i', "with", WITH);
00558     }
00559     goto identifier;
00560   case 'x':
00561     if (pos<n) keyword ('o', "xor", XOR);
00562     goto identifier;
00563   case 'y':
00564     if (pos<n) keyword ('i', "yield", YIELD);
00565     goto identifier;
00566   case 'z':
00567     goto identifier;
00568   case '{':
00569     produce (c);
00570   case '|':
00571     test ('|', VWHERE);
00572     produce (WHERE);
00573   case '}':
00574     produce (c);
00575   case '~':
00576     test ('>', CONVERTS);
00577     produce (TILDA);
00578   default:
00579     return mmx_lex (lval, obj);
00580 
00581   identifier:
00582     while ((pos<n) &&
00583            (is_alpha (s[pos]) ||
00584             (s[pos] == '.' && pos>0 && (pos+1)<n &&
00585              s[pos-1] >= '0' && s[pos-1] <= '9' &&
00586              s[pos+1] >= '0' && s[pos+1] <= '9')))
00587       INC_POS;
00588     produce (IDENTIFIER);
00589   }
00590 }

void* mmx::mmx_malloc ( size_t  sz  )  [inline]
void* mmx::mmx_malloc_thread_safe ( size_t  new_size  )  [inline]

Definition at line 183 of file fast_new.hpp.

References lock(), memory_lock, and mmx_malloc_thread_unsafe().

Referenced by mmx_malloc().

00183                                          {
00184   mutex_lock lock (memory_lock);
00185   return mmx_malloc_thread_unsafe (new_size); }

void * mmx_malloc_thread_unsafe ( register size_t  sz  ) 

Definition at line 73 of file fast_new.cpp.

References enlarge_malloc(), large_uses, MMX_ALLOC_PTR, MMX_IND, MMX_MAX_FAST, MMX_WORD_LENGTH_INC, MMX_WORD_MASK, and safe_malloc().

Referenced by mmx_malloc(), mmx_malloc_thread_safe(), and mmx_realloc_thread_unsafe().

00073                                               {
00074   if (sz == 0) return NULL;
00075   sz= (sz+MMX_WORD_LENGTH_INC)&MMX_WORD_MASK;
00076   if (sz<MMX_MAX_FAST) {
00077     register void *ptr= MMX_ALLOC_PTR (sz);
00078     if (ptr==NULL) return enlarge_malloc (sz);
00079     //assert (((nat) ptr) != 2);
00080     //assert (((nat) (MMX_IND (ptr))) != 2);
00081     MMX_ALLOC_PTR (sz)= MMX_IND (ptr);
00082     return ptr;
00083   }
00084   else {
00085     //printf ("Big alloc of %d bytes", (int) sz);
00086     //printf ("Memory used: %d bytes", (int) mmx_used_bytes ());
00087     large_uses += sz;
00088     return safe_malloc (sz);
00089   }
00090 }

void mmx::mmx_mem_info (  ) 

Definition at line 138 of file fast_new.cpp.

References alloc_remains, alloc_table, fast_chunks, large_uses, mmout, MMX_BLOCK_SIZE, mmx_compute_free(), MMX_MAX_FAST, and MMX_WORD_LENGTH.

00138                 {
00139   mmout << "\n---------------- memory statistics ----------------\n";
00140   size_t free_bytes= alloc_remains;
00141   size_t chunks_use= MMX_BLOCK_SIZE*fast_chunks;
00142   for (nat i=MMX_WORD_LENGTH; i<MMX_MAX_FAST; i+=MMX_WORD_LENGTH)
00143     free_bytes += i*mmx_compute_free (alloc_table+i);
00144   size_t small_uses= chunks_use- free_bytes;
00145   size_t total_uses= small_uses+ large_uses;
00146   // mmout << "Fast chunks   : " << chunks_use << " bytes\n";
00147   // mmout << "Free on chunks: " << alloc_remains << " bytes\n";
00148   mmout << "User          : " << total_uses << " bytes\n";
00149   mmout << "Allocator     : " << chunks_use+ large_uses << " bytes\n";
00150   mmout << "Small mallocs : "
00151         << ((100*((float) small_uses))/((float) total_uses)) << "%\n";
00152 }

C* mmx::mmx_new ( nat  n,
const T1 &  a1,
const T2 &  a2 
) [inline]

Definition at line 268 of file fast_new.hpp.

References C, and mmx_malloc().

00268                                             {
00269 #ifdef BASIX_ENABLE_VERIFY
00270   void* ptr= mmx_malloc (n * sizeof (C) + 16);
00271   *((nat*) ptr)= n;
00272   //printf ("{..+%p}", ptr); fflush (stdout);
00273   ptr= (void*) (((char*) ptr) + 16);
00274   //printf ("{..++%p}", ptr); fflush (stdout);
00275 #else
00276   void* ptr= mmx_malloc (n * sizeof (C));
00277 #endif
00278   C* ctr= (C*) ptr;
00279   for (nat i=0; i<n; i++, ctr++)
00280     (void) new ((void*) ctr) C (a1, a2);
00281   return (C*) ptr;
00282 }

C* mmx::mmx_new ( nat  n,
const T1 &  a1 
) [inline]

Definition at line 251 of file fast_new.hpp.

References C, and mmx_malloc().

00251                               {
00252 #ifdef BASIX_ENABLE_VERIFY
00253   void* ptr= mmx_malloc (n * sizeof (C) + 16);
00254   *((nat*) ptr)= n;
00255   //printf ("{.+%p}", ptr); fflush (stdout);
00256   ptr= (void*) (((char*) ptr) + 16);
00257   //printf ("{.++%p}", ptr); fflush (stdout);
00258 #else
00259   void* ptr= mmx_malloc (n * sizeof (C));
00260 #endif
00261   C* ctr= (C*) ptr;
00262   for (nat i=0; i<n; i++, ctr++)
00263     (void) new ((void*) ctr) C (a1);
00264   return (C*) ptr;
00265 }

C* mmx::mmx_new ( nat  n  )  [inline]

Definition at line 234 of file fast_new.hpp.

References C, and mmx_malloc().

00234                 {
00235 #ifdef BASIX_ENABLE_VERIFY
00236   void* ptr= mmx_malloc (n * sizeof (C) + 16);
00237   *((nat*) ptr)= n;
00238   //printf ("{+%p}", ptr); fflush (stdout);
00239   ptr= (void*) (((char*) ptr) + 16);
00240   //printf ("{++%p}", ptr); fflush (stdout);
00241 #else
00242   void* ptr= mmx_malloc (n * sizeof (C));
00243 #endif
00244   C* ctr= (C*) ptr;
00245   for (nat i=0; i<n; i++, ctr++)
00246     (void) new ((void*) ctr) C ();
00247   return (C*) ptr;
00248 }

T* mmx::mmx_new_at ( T *  pos  )  [inline]

Definition at line 67 of file new_table.hpp.

References T.

Referenced by new_table_rep< C, T, V >::set().

00067                     {
00068   return new ((void*) pos) T;
00069 }

C* mmx::mmx_new_one ( const T1 &  a1  )  [inline]

Definition at line 310 of file fast_new.hpp.

00310                            {
00311   return mmx_new<C> (1, a1);
00312 }

C* mmx::mmx_new_one (  )  [inline]

Definition at line 305 of file fast_new.hpp.

00305                {
00306   return mmx_new<C> (1);
00307 }

T* mmx::mmx_new_uninitialized ( nat  i  )  [inline]

Definition at line 57 of file new_table.hpp.

References T.

00057                               {
00058   return (T*) ((void*) mmx_new<char> (i * sizeof (T)));
00059 }

generic mmx::mmx_parse ( const string file_name,
const string s 
)
generic mmx::mmx_parse ( const string file_name,
nat  input_number,
const string s,
list< generic > &  errors 
)

Referenced by mmc_parse().

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.

00203                                                           {
00204   return threads_active ? mmx_realloc_thread_safe   (ptr, old_size, new_size)
00205                         : 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 lock(), memory_lock, and mmx_realloc_thread_unsafe().

Referenced by mmx_realloc().

00188                                                                       {
00189   mutex_lock lock (memory_lock);
00190   return mmx_realloc_thread_unsafe (ptr, old_size, new_size); }

void * mmx_realloc_thread_unsafe ( register void *  old_ptr,
register size_t  old_sz,
register size_t  new_sz 
)

Definition at line 109 of file fast_new.cpp.

References mmx_free_thread_unsafe(), and mmx_malloc_thread_unsafe().

Referenced by mmx_realloc(), and mmx_realloc_thread_safe().

00110                                                    {
00111   void* new_ptr= mmx_malloc_thread_unsafe (new_sz);
00112   memcpy (new_ptr, old_ptr, new_sz < old_sz ? new_sz: old_sz);
00113   mmx_free_thread_unsafe (old_ptr, old_sz);
00114   return new_ptr;
00115 }

static table<generic,generic> mmx::mmx_symbol_table (  )  [static]

Definition at line 158 of file mmx_printer.cpp.

References init().

Referenced by serialize().

00158                     {
00159   table<generic,generic> t;
00160   init (t, "mathcatalan", "K");
00161   init (t, "partial", "d");
00162   init (t, "derivative", "D");
00163   init (t, "matheuler", "gamma");
00164   init (t, "mathd", "d");
00165   init (t, "mathe", "e");
00166   init (t, "mathi", "i");
00167   init (t, "mathpi", "pi");
00168   return t;
00169 }

nat mmx_time (  ) 

Relative time of day.

Definition at line 27 of file timer.cpp.

00027             {
00028 #ifdef BASIX_HAVE_GETTIMEOFDAY
00029   struct timeval tp;
00030   gettimeofday (&tp, NULL);
00031   return (nat) ((time_t) ((tp.tv_sec * 1000) + (tp.tv_usec / 1000)));
00032 #else
00033   timeb tb;
00034   ftime (&tb);
00035   return (nat) ((time_t) ((tb.time * 1000) + tb.millitm));
00036 #endif
00037 }

string mmx::mmx_time_unit (  )  [inline]

Definition at line 34 of file timer.hpp.

00034 { return("ms"); };

size_t mmx_used_bytes (  ) 

Definition at line 128 of file fast_new.cpp.

References alloc_remains, alloc_table, fast_chunks, large_uses, MMX_BLOCK_SIZE, mmx_compute_free(), MMX_MAX_FAST, and MMX_WORD_LENGTH.

00128                   {
00129   size_t free_bytes= alloc_remains;
00130   size_t chunks_use= MMX_BLOCK_SIZE*fast_chunks;
00131   for (nat i=MMX_WORD_LENGTH; i<MMX_MAX_FAST; i+=MMX_WORD_LENGTH)
00132     free_bytes += i*mmx_compute_free (alloc_table+i);
00133   size_t small_uses= chunks_use- free_bytes;
00134   return small_uses+ large_uses;
00135 }

nat mmx_user_time (  ) 

User time of the current process and its terminated children.

Definition at line 53 of file timer.cpp.

00053                  {
00054 #if defined(__MINGW__) || defined(__MINGW32__)
00055   return 0;
00056 #else
00057   struct rusage used;
00058   nat t;
00059   getrusage(RUSAGE_SELF, &used);
00060   t = (nat) ((time_t) ((used.ru_utime.tv_sec * 1000)
00061                      + (used.ru_utime.tv_usec / 1000)));
00062   getrusage(RUSAGE_CHILDREN, &used);
00063   return t +  (nat) ((time_t) ((used.ru_utime.tv_sec * 1000)
00064                              + (used.ru_utime.tv_usec / 1000)));
00065 #endif
00066 }

string mmx::mmx_user_time_unit (  )  [inline]

Definition at line 38 of file timer.hpp.

00038 { return("ms"); };

double mmx_var_time (  ) 

Definition at line 40 of file timer.cpp.

00040                 {
00041 #ifdef BASIX_HAVE_GETTIMEOFDAY
00042   struct timeval tp;
00043   gettimeofday (&tp, NULL);
00044   return (((double) tp.tv_sec) * 1000) + ((double) (tp.tv_usec / 1000));
00045 #else
00046   timeb tb;
00047   ftime (&tb);
00048   return (((double) tb.time) * 1000) + ((double) tb.millitm);
00049 #endif
00050 }

void mmx::mul ( R &  x,
const C1 &  y1,
const C2 &  y2 
) [inline]

Definition at line 58 of file operators.hpp.

Referenced by lmul_op::set_op(), rmul_op::set_op(), and mul_op::set_op().

00058 { x= y1 * y2; }

void mmx::mul_add ( R &  x,
const C1 &  y1,
const C2 &  y2 
) [inline]

Definition at line 62 of file operators.hpp.

Referenced by lmul_add_op::set_op(), rmul_add_op::set_op(), and mul_add_op::set_op().

00062 { x += y1 * y2; }

T mmx::mul_operator ( const T &  x,
const T &  y 
) [inline]

Definition at line 33 of file operators.hpp.

00033 { return x*y; }

void mmx::mul_sub ( R &  x,
const C1 &  y1,
const C2 &  y2 
) [inline]

Definition at line 64 of file operators.hpp.

Referenced by mul_sub_op::set_op().

00064 { x -= y1 * y2; }

unary_return_type_helper<abs_op, C >::RET mmx::multiplicative_error ( const C &  x  )  [inline]

Definition at line 1073 of file type_props.hpp.

References rounding_error().

01073                                                                           {
01074   return rounding_error (x); }

generic multiplicative_error ( const generic x  ) 

Definition at line 776 of file generic.cpp.

References current_ev, and GEN_MULTIPLICATIVE_ERROR.

Referenced by multiplicative_error_op::Abs_type(), GLUE_53(), and multiplicative_error_op::set_op().

00776                                                 {
00777   return current_ev->apply (GEN_MULTIPLICATIVE_ERROR, x); }

nat mmx::N ( const vector< C, vector_fixed< V, S > > &  v  )  [inline]

Definition at line 368 of file vector.hpp.

00368 { return S::val; }

nat N ( const vector< C, V > &  v  )  [inline]

Definition at line 210 of file vector.hpp.

00210 { return v->n; }

nat N ( const table< C, T, V > &  t  )  [inline]

Definition at line 227 of file table.hpp.

00227                    {
00228   return t->size;
00229 }

nat N ( const sparse_vector< C, T, V > &  v  )  [inline]

Definition at line 98 of file sparse_vector.hpp.

00098 { return v.rep->n; }

nat mmx::N ( const row_tuple< C > &  t  )  [inline]

Definition at line 43 of file row_tuple.hpp.

References N().

00043 { return N(*t)-1; }

nat N ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 244 of file new_table.hpp.

00244                    {
00245   return t->size;
00246 }

nat mmx::N ( const list< C > &  l  )  [inline]

Return the number of elements in l.

Definition at line 155 of file list.hpp.

References cdr(), is_nil(), and N().

00155 { return is_nil (l)? 0: N (cdr (l)) + 1; }

nat N ( const heap< C > &  h  )  [inline]

Definition at line 193 of file heap.hpp.

00193                                   {
00194   return l.rep->n; }

nat mmx::N ( const generic &  g  )  [inline]

Definition at line 156 of file generic.hpp.

00156                                 {
00157   return g->get_length (); }

nat N ( const chain< C > &  c  )  [inline]

Definition at line 135 of file chain.hpp.

00135 { return (c.rep == NULL? 0: c.rep->size); }

nat mmx::N ( const cache< C, T > &  c  )  [inline]

Definition at line 61 of file cache.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< new_table< C, T, V > >::assemble(), binary_helper< list< C > >::assemble(), binary_helper< heap< C > >::assemble(), binary_helper< chain< C > >::assemble(), assign(), balance_left(), balance_right(), big(), big_dicho(), binary_map(), binary_map_optimized(), binary_map_scalar(), binary_test(), binary_test_scalar(), bool(), 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(), complete(), composite_port_rep::component(), components(), compose(), composed_routine_rep::composed_routine_rep(), composite_port(), concat_append(), cons(), contains(), copy(), cpp_identifier(), 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(), dynamic::dynamic(), ends(), composite_port_rep::error_flag(), composite_port_rep::error_message(), escape(), eval_system(), exact_eq(), exec(), input_output_string_port_rep::expression(), input_string_port_rep::expression(), composite_port_rep::expression(), extend(), extract(), extract_mod(), socket_port_rep::feed(), file_test(), find(), flatten(), composite_port_rep::flush(), foreach(), formatting_port_rep::format(), generic_size(), get_directory(), get_extension(), get_file_source(), get_indentation(), get_interactive_number(), get_interactive_source(), GLUE_2(), GLUE_4(), GLUE_5(), GLUE_6(), GLUE_8(), handle_completion_request(), hash(), identity_routine(), insert(), inside_append(), is_absolute_name(), is_applicable(), is_atom(), vector_iterator_rep< C, V >::is_busy(), heap_iterator_rep< C >::is_busy(), is_C0(), is_evaluable(), is_floating_string(), is_func(), composite_port_rep::is_input_port(), is_integer_string(), is_nil(), is_numeric(), composite_port_rep::is_output_port(), is_quoted(), is_reconstructible(), 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(), symbol_rep< vector< generic >, exact_eq_table >::number_entries(), operator*(), operator<(), operator<<(), vector< C, V >::operator<<(), operator<=(), operator==(), operator>(), operator>=(), vector< observer >::operator[](), ordered_product(), ordered_sum(), output_completion(), parse_blanks(), parse_char(), parse_identifier(), parse_lisp(), parse_nat(), parse_string(), path_name(), range(), input_output_string_port_rep::read(), input_string_port_rep::read(), composite_port_rep::read(), posix_port_rep::read(), reads(), recompose(), recursive_search_name(), relative_name(), remove(), replace(), replace_lf(), resolve_name(), reverse(), scheme_to_tm(), search_backwards(), search_forwards(), semi_recursive_search_name(), serialize(), project_helper< vector< C, V > >::set_op(), lift_helper< vector< C, V > >::set_op(), shell_load_session(), shell_terminal_input(), shell_texmacs_input(), 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_as_charcode(), string_to_floating(), string_to_numeric(), strip_directory(), strip_extension(), strip_preamble(), table_size(), 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_contains(), vector_find(), vector_is_atom(), vector_is_nil(), vector_length(), vector_map(), vector_map_1(), vector_map_2(), vector_map_n(), vector_reverse(), 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< new_table< C, T, V > >::write(), binary_helper< heap< C > >::write(), binary_helper< chain< C > >::write(), xgen_sub(), and dynamic_rep::~dynamic_rep().

00061                                    {
00062   return N (*c); }

C mmx::nan_cst ( const format< C > &  fm  )  [inline]

Definition at line 939 of file type_props.hpp.

References C, promote(), and set_nan().

00939                               {
00940   C r= promote (0, fm); set_nan (r); return r; }

C mmx::nan_cst (  )  [inline]

Definition at line 904 of file type_props.hpp.

References C, and set_nan().

00904 { C r; set_nan (r); return r; }

iterator<S> mmx::natural_range ( const S &  start,
const T &  end 
) [inline]

Definition at line 365 of file iterator.hpp.

References range_iterator().

00365                                              {
00366   return range_iterator (start, outplace_set_as<S> (end),
00367                          outplace_set_as<S> (1), false);
00368 }

void mmx::neg ( R &  x,
const C1 &  y1 
) [inline]

Definition at line 52 of file operators.hpp.

00052 { x= -y1; }

void mmx::neg ( R &  x  )  [inline]

Definition at line 50 of file operators.hpp.

Referenced by neg_op::set_op().

00050 { x= -x; }

T mmx::neg_operator ( const T &  x  )  [inline]

Definition at line 30 of file operators.hpp.

00030 { return -x; }

alias<C> mmx::new_alias ( const C &  c  )  [inline]

Definition at line 55 of file alias.hpp.

00055 { return alias<C> (c); }

nat mmx::new_alias_type_id ( nat  id  )  [inline]

Definition at line 203 of file alias.hpp.

References alias_type_info().

Referenced by define_user_type().

00203                            {
00204   int mode= 2;
00205   alias_type_info (id, mode);
00206   return id;
00207 }

generic_alias<C> mmx::new_genalias ( const alias< generic > &  a  )  [inline]

Definition at line 130 of file alias.hpp.

00130                                                                     {
00131   return generic_alias<C> (a); }

nat mmx::new_generic_alias_type_id ( nat  id  )  [inline]

Definition at line 210 of file alias.hpp.

References alias_type_info().

00210                                    {
00211   int mode= 3;
00212   alias_type_info (id, mode);
00213   return id;
00214 }

nat new_tuple_type_id ( nat  id  )  [inline]

Definition at line 114 of file tuple.hpp.

References tuple_type_info().

Referenced by define_user_type().

00114                            {
00115   bool mode= true;
00116   tuple_type_info (id, mode);
00117   return id;
00118 }

nat new_type_id ( const char *  s  ) 

Definition at line 38 of file generic.cpp.

References contains(), inside_set(), and new_type_id().

00038                             {
00039   static table<nat, string> t;
00040   if (!contains (t, s)) {
00041     nat id= new_type_id ();
00042     inside_set (t, s, id);
00043     return id;
00044   }
00045   return t[s];
00046 }

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().

00031                {
00032   static nat counter= 2;
00033   ASSERT (counter < 65000, "too many types");
00034   return counter++;
00035 }

generic next_above ( const generic x  ) 

Definition at line 768 of file generic.cpp.

References current_ev, and GEN_NEXT_ABOVE.

00768                                       {
00769   return current_ev->apply (GEN_NEXT_ABOVE, x); }

double next_above ( const double &  x  )  [inline]

Referenced by GLUE_45(), and set_smallest().

generic next_below ( const generic x  ) 

Definition at line 770 of file generic.cpp.

References current_ev, and GEN_NEXT_BELOW.

00770                                       {
00771   return current_ev->apply (GEN_NEXT_BELOW, x); }

double mmx::next_below ( const double &  x  )  [inline]

Definition at line 87 of file double.hpp.

Referenced by GLUE_46(), and set_largest().

00087 { return nextafter (x, -HUGE_VAL); }

nat mmx::next_power_of_three ( nat  p  )  [inline]

Definition at line 106 of file int.hpp.

References n.

00106                             {
00107   // return 0 in case of overflow
00108   nat n= 1;
00109   while (n < p)
00110     n *= 3;
00111   return (n<p) ? 0 : n;
00112 }

nat mmx::next_power_of_two ( nat  p  )  [inline]

Definition at line 80 of file int.hpp.

References n.

00080                           {
00081   // return 0 in case of overflow
00082   nat n= 1;
00083   while (n < p && n != 0)
00084     n = n << 1;
00085   return n;
00086 }

void noop (  )  [inline]

Definition at line 24 of file basix.cpp.

Referenced by loop_task_rep::execute().

00024 {}

routine mmx::nullary_routine ( const generic name,
D(*)()  fun 
) [inline]

Definition at line 172 of file routine.hpp.

Referenced by define().

00172                                                    {
00173   return new nullary_routine_rep<D> (name, fun);
00174 }

vector<C,V>& mmx::nullary_set ( vector< C, V > &  v  )  [inline]

Definition at line 812 of file vector.hpp.

References N(), n, and seg().

00812                              {
00813   typedef implementation<vector_linear,V> Vec;
00814   nat n= N(v);
00815   Vec::template vec_nullary<Op> (seg (v), n);
00816   return v;
00817 }

nat mmx::number_entries (  )  [inline]

Definition at line 135 of file symbol.hpp.

References symbol_rep< C, V >::number_entries().

00135                                            {
00136   return symbol_rep<C>::number_entries (); }

syntactic numerator ( const syntactic x  ) 

Definition at line 462 of file syntactic.cpp.

References GEN_NUMERATOR, and syn().

00462                                           {
00463   return syn (GEN_NUMERATOR, g1); }

generic numerator ( const generic x  ) 

Definition at line 713 of file generic.cpp.

References current_ev, and GEN_NUMERATOR.

Referenced by numerator_op::Numerator_type(), numerator_op::op(), and numerator_op::set_op().

00713                                      {
00714   return current_ev->apply (GEN_NUMERATOR, x); }

string mmx::numeric_as_string ( const C &  x  )  [inline]

Definition at line 207 of file string.hpp.

References s.

00207                                {
00208   string s;
00209   numeric_to_string<C> (x, s);
00210   return s;
00211 }

void mmx::numeric_to_string ( const long double &  x,
string obj->lex_string 
) [inline]

Definition at line 239 of file string.cpp.

References floating_to_string().

00239                                                                {
00240   floating_to_string (x, s, "%1.21Le"); }

void mmx::numeric_to_string ( const double &  x,
string obj->lex_string 
) [inline]

Definition at line 237 of file string.cpp.

References floating_to_string().

00237                                                           {
00238   floating_to_string (x, s, "%1.17le"); }

void mmx::numeric_to_string ( const float &  x,
string obj->lex_string 
) [inline]

Definition at line 235 of file string.cpp.

References floating_to_string().

00235                                                          {
00236   floating_to_string (x, s, "%1.8e"); }

void mmx::numeric_to_string ( const long double &  x,
string &  s 
) [inline]
void mmx::numeric_to_string ( const double &  x,
string &  s 
) [inline]
void mmx::numeric_to_string ( const float &  x,
string &  s 
) [inline]
void mmx::numeric_to_string ( const C &  x,
string &  s 
) [inline]

Definition at line 158 of file string.hpp.

00158                                           {
00159   if (x == 0) s << '0';
00160   else if (x <= 0) { // NOTE x < 0 would be nicer, but yields warnings
00161     s << '-';
00162     numeric_to_string (-x, s);
00163   }
00164   else {
00165     if (x >= 10) numeric_to_string (x/10, s);
00166     s << (char) (((char) '0') + ((char) ((int) (x%10))));
00167   }
00168 }

static generic mmx::object_alias ( const generic x  )  [static]

Definition at line 83 of file generic_object.cpp.

References as_object(), scalar_to_alias(), and type().

Referenced by define_user_type().

00083                                                {
00084   nat alias_id= scalar_to_alias (type (x));
00085   return as_object (as<generic> (new_alias<generic> (x)), alias_id); }

static bool mmx::object_equal ( const generic x,
const generic y 
) [static]

Definition at line 74 of file generic_object.cpp.

Referenced by define_user_type().

00074                                                               {
00075   return x == y; }

static syntactic mmx::object_flatten ( const generic x  )  [static]

Definition at line 78 of file generic_object.cpp.

References apply(), as_generic(), flatten(), type(), and type_name().

Referenced by define_user_type().

00078                                                    {
00079   nat id= type (x);
00080   generic rep= as_generic (x, id);
00081   return apply ("object", flatten (rep), flatten (type_name (id))); }

static alias<generic> mmx::object_generalize_alias ( const generic x  )  [static]

Definition at line 95 of file generic_object.cpp.

References as_generic(), and type().

Referenced by define_user_type().

00095                                                                  {
00096   nat alias_id= type (x);
00097   return as<alias<generic> > (as_generic (x, alias_id)); }

static generic mmx::object_get_alias ( const generic x  )  [static]

Definition at line 86 of file generic_object.cpp.

References as(), as_generic(), get_alias(), and type().

Referenced by define_user_type().

00086                                                    {
00087   nat alias_id= type (x);
00088   return get_alias (as<alias<generic> > (as_generic (x, alias_id))); }

static generic mmx::object_set_alias ( const generic x,
const generic y 
) [static]

Definition at line 89 of file generic_object.cpp.

References as(), as_generic(), set_alias(), and type().

Referenced by define_user_type().

00089                                                                      {
00090   nat alias_id= type (x);
00091   return set_alias (as<alias<generic> > (as_generic (x, alias_id)), y); }

static generic mmx::object_specialize_alias ( const alias< generic > &  x  )  [static]

Definition at line 92 of file generic_object.cpp.

References as_object(), get_alias(), scalar_to_alias(), and type().

Referenced by define_user_type().

00092                                                                  {
00093   nat alias_id= scalar_to_alias (type (get_alias (x)));
00094   return as_object (as<generic> (x), alias_id); }

static bool mmx::object_unequal ( const generic x,
const generic y 
) [static]

Definition at line 76 of file generic_object.cpp.

Referenced by define_user_type().

00076                                                                 {
00077   return x != y; }

C mmx::one_cst (  )  [inline]

Definition at line 890 of file type_props.hpp.

References C, and set_one().

00890 { C r; set_one (r); return r; }

C& mmx::open_alias ( const alias< C > &  a  )  [inline]

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().

00057 { return a->open (); }

generic mmx::operate ( const generic g,
const generic h 
) [inline]

Definition at line 139 of file mmx_printer.cpp.

References gen().

Referenced by mmx_printer::pp_E0().

00139                                                             {
00140   return gen ("$operate", g, h); }

bool mmx::operator!= ( const vector< int, V > &  v,
const int &  c 
) [inline]

Definition at line 1162 of file vector.hpp.

01162                                                 {
01163   return !binary_test_scalar<equal_op> (v, c); }

bool mmx::operator!= ( const vector< C, V > &  x,
const int &  y 
) [inline]

Definition at line 1155 of file vector.hpp.

01159 {

bool mmx::operator!= ( const vector< C, V > &  x,
const vector< C, V > &  y 
) [inline]

Definition at line 1151 of file vector.hpp.

01159 {

bool mmx::operator!= ( const C &  c,
const vector< C, V > &  v 
) [inline]

Definition at line 1145 of file vector.hpp.

01145 { return v != c; }

bool mmx::operator!= ( const vector< C, V > &  v,
const C &  c 
) [inline]

Definition at line 1134 of file vector.hpp.

01134                                                     {
01135   return !binary_test_scalar<equal_op> (v, c); }

bool mmx::operator!= ( const format< C > &  x,
const format< C > &  y 
) [inline]

Definition at line 212 of file type_props.hpp.

00212 { return false; }

bool mmx::operator!= ( const triple< C1, C2, C3 > &  x,
const triple< C1, C2, C3 > &  y 
) [inline]

Definition at line 58 of file triple.hpp.

00063 {

bool mmx::operator!= ( const table< C, T, V > &  x,
const table< C, T, V > &  y 
) [inline]

Definition at line 693 of file table.hpp.

00698 { return unary_map<sqrt_op> (t); }

bool operator!= ( const vector< syntactic > &  v,
const vector< syntactic > &  w 
)

Definition at line 528 of file syntactic.cpp.

00528                                                                           {
00529   return !(v == w);
00530 }

bool mmx::operator!= ( const syntactic &  c1,
const syntactic &  c2 
) [inline]

Definition at line 52 of file syntactic.hpp.

00052                                                                    {
00053   return (*c1) != (*c2); }

bool mmx::operator!= ( const symbol< C, equal_table > &  s1,
const symbol< C, equal_table > &  s2 
) [inline]

Definition at line 124 of file symbol.hpp.

References exact_neq().

00125                                               {
00126   return exact_neq (s1, s2); }

bool operator!= ( const symbol< C, V > &  s1,
const symbol< C, V > &  s2 
) [inline]

Definition at line 107 of file symbol.hpp.

00107                                                                   {
00108   return (*s1) != (*s2); }

bool mmx::operator!= ( const storage x,
const storage y 
) [inline]

Definition at line 56 of file storage.hpp.

00057 { return "storage"; }

bool mmx::operator!= ( const sparse_vector< C, T, V > &  x,
const sparse_vector< C, T, V > &  y 
) [inline]

Definition at line 168 of file sparse_vector.hpp.

00176 {

bool mmx::operator!= ( const port &  x,
const port &  y 
) [inline]

Definition at line 64 of file port.hpp.

00066 { return p->expression (); }

bool mmx::operator!= ( const pair< C1, C2 > &  x,
const pair< C1, C2 > &  y 
) [inline]

Definition at line 53 of file pair.hpp.

00058 {

bool mmx::operator!= ( const new_table< C, T, V > &  x,
const new_table< C, T, V > &  y 
) [inline]

Definition at line 764 of file new_table.hpp.

00769 { return unary_map<sqrt_op> (t); }

bool mmx::operator!= ( const Indirect< R > &  x,
const Indirect< R > &  y 
) [inline]

Definition at line 756 of file mmc_glue.hpp.

References Indirect< R >::rep.

00756                                                                           {
00757   return x.rep != y.rep; }

bool mmx::operator!= ( const literal c1,
const literal c2 
) [inline]

Definition at line 46 of file literal.hpp.

00046                                                                {
00047   return as_symbol (c1) != as_symbol (c2); }

bool mmx::operator!= ( const list< C > &  x,
const list< C > &  y 
) [inline]

Definition at line 228 of file list.hpp.

00236 {

bool mmx::operator!= ( const iterator< C > &  x,
const iterator< C > &  y 
) [inline]

Definition at line 185 of file iterator.hpp.

00195 : public Iterator_rep {

bool mmx::operator!= ( const instance< Cat, Nr > &  x,
const int &  i 
) [inline]

Definition at line 123 of file instance.hpp.

References promote().

00123                                                                {
00124   return x != promote (i, x); }

bool mmx::operator!= ( const heap< C > &  x,
const heap< C > &  y 
) [inline]

Definition at line 243 of file heap.hpp.

00247 {

bool operator!= ( const int &  x1,
const generic x2 
)

Definition at line 583 of file generic.cpp.

00583 { return x2 != x1; }

bool operator!= ( const generic x1,
const int &  x2 
)

Definition at line 581 of file generic.cpp.

00581 { return !(x1 == x2); }

bool operator!= ( const generic x1,
const generic x2 
)

Definition at line 580 of file generic.cpp.

00580 { return !(x1 == x2); }

bool mmx::operator!= ( const function_8< D, S1, S2, S3, S4, S5, S6, S7, S8 > &  x,
const function_8< D, S1, S2, S3, S4, S5, S6, S7, S8 > &  y 
) [inline]

Definition at line 614 of file function.hpp.

00615 {

bool mmx::operator!= ( const function_7< D, S1, S2, S3, S4, S5, S6, S7 > &  x,
const function_7< D, S1, S2, S3, S4, S5, S6, S7 > &  y 
) [inline]

Definition at line 554 of file function.hpp.

00555 {

bool mmx::operator!= ( const function_6< D, S1, S2, S3, S4, S5, S6 > &  x,
const function_6< D, S1, S2, S3, S4, S5, S6 > &  y 
) [inline]

Definition at line 494 of file function.hpp.

00495 {

bool mmx::operator!= ( const function_5< D, S1, S2, S3, S4, S5 > &  x,
const function_5< D, S1, S2, S3, S4, S5 > &  y 
) [inline]

Definition at line 435 of file function.hpp.

00436 {

bool mmx::operator!= ( const function_4< D, S1, S2, S3, S4 > &  x,
const function_4< D, S1, S2, S3, S4 > &  y 
) [inline]

Definition at line 376 of file function.hpp.

00377 {

bool mmx::operator!= ( const function_3< D, S1, S2, S3 > &  x,
const function_3< D, S1, S2, S3 > &  y 
) [inline]

Definition at line 317 of file function.hpp.

00318 {

bool mmx::operator!= ( const function_2< D, S1, S2 > &  x,
const function_2< D, S1, S2 > &  y 
) [inline]

Definition at line 258 of file function.hpp.

00259 {

bool mmx::operator!= ( const function_1< D, S1 > &  x,
const function_1< D, S1 > &  y 
) [inline]

Definition at line 158 of file function.hpp.

00159 {

bool mmx::operator!= ( const function_0< D > &  x,
const function_0< D > &  y 
) [inline]

Definition at line 102 of file function.hpp.

00103 {

bool mmx::operator!= ( const exception &  e1,
const exception &  e2 
) [inline]

Definition at line 41 of file exception.hpp.

00041                                                                    {
00042   return (*e1) != (*e2); }

bool mmx::operator!= ( const dynamic x,
const dynamic y 
) [inline]

Definition at line 96 of file dynamic.hpp.

bool mmx::operator!= ( const observer x,
const observer y 
) [inline]

Definition at line 59 of file dynamic.hpp.

00065 : public rep_struct {

bool mmx::operator!= ( const document c1,
const document c2 
) [inline]

Definition at line 53 of file document.hpp.

00053                                                                  {
00054   return (*c1) != (*c2); }

bool mmx::operator!= ( const compound c1,
const compound c2 
) [inline]

Definition at line 51 of file compound.hpp.

00051                                                                  {
00052   return as_symbol (c1) != as_symbol (c2); }

bool mmx::operator!= ( const cache< C, T > &  c1,
const cache< C, T > &  c2 
) [inline]

Definition at line 44 of file cache.hpp.

References hard_neq().

00044                                                                 {
00045   return hard_neq (*c1, *c2); }

vector<C,V> mmx::operator& ( const vector< C, V > &  v,
const vector< C, V > &  w 
) [inline]

Definition at line 1108 of file vector.hpp.

01108                                                           {
01109   return binary_map<and_op> (v, w); }

table<C,T,V> mmx::operator& ( const table< C, T, V > &  t,
const table< C, T, V > &  u 
) [inline]

Definition at line 637 of file table.hpp.

00637                                                               {
00638   return binary_map<and_op,C,T,V> (t, u); }

new_table<C,T,V> mmx::operator& ( const new_table< C, T, V > &  t,
const new_table< C, T, V > &  u 
) [inline]

Definition at line 708 of file new_table.hpp.

00708                                                               {
00709   return binary_map<and_op,C,T,V> (t, u); }

generic operator& ( const generic x1,
const generic x2 
)

Definition at line 840 of file generic.cpp.

References current_ev, and GEN_AND.

00840                                                           {
00841   return current_ev->apply (GEN_AND, x1, x2); }

table<C,T,V> mmx::operator&= ( table< C, T, V > &  t,
const table< C, T, V > &  u 
) [inline]

Definition at line 671 of file table.hpp.

00671                                                          {
00672   return unary_set<and_op,C,T,V> (t, u); }

new_table<C,T,V> mmx::operator&= ( new_table< C, T, V > &  t,
const new_table< C, T, V > &  u 
) [inline]

Definition at line 742 of file new_table.hpp.

00742                                                          {
00743   return unary_set<and_op,C,T,V> (t, u); }

string mmx::operator* ( const string s1,
const string s2 
)

Definition at line 411 of file string.cpp.

References N(), and string::rep.

00411                                                 {
00412   register nat i, n1=N(s1), n2=N(s2);
00413   string r (n1 + n2);
00414   for (i=0; i<n1; i++) r.rep->a[i   ]= s1.rep->a[i];
00415   for (i=0; i<n2; i++) r.rep->a[i+n1]= s2.rep->a[i];
00416   return r;
00417 }

vector<C,V> mmx::operator* ( const int &  x,
const vector< C, V > &  y 
) [inline]

Definition at line 1154 of file vector.hpp.

01159 {

vector<C,V> mmx::operator* ( const vector< C, V > &  x,
const int &  y 
) [inline]

Definition at line 1154 of file vector.hpp.

01159 {

vector<int,V> mmx::operator* ( const int &  c,
const vector< int, V > &  v 
) [inline]

Definition at line 1090 of file vector.hpp.

01090                                                {
01091   return binary_map_scalar<lmul_op> (v, c); }

vector<C,V> mmx::operator* ( const C &  c,
const vector< C, V > &  v 
) [inline]

Definition at line 1087 of file vector.hpp.

01087                                                      {
01088   return binary_map_scalar<lmul_op> (v, c); }

vector<int,V> mmx::operator* ( const vector< int, V > &  v,
const int &  c 
) [inline]

Definition at line 1085 of file vector.hpp.

01085                                                {
01086   return binary_map_scalar<rmul_op> (v, c); }

vector<C,V> mmx::operator* ( const vector< C, V > &  v,
const C &  c 
) [inline]

Definition at line 1082 of file vector.hpp.

01082                                                      {
01083   return binary_map_scalar<rmul_op> (v, c); }

vector<C,V> mmx::operator* ( const vector< C, V > &  v,
const vector< C, V > &  w 
) [inline]

Definition at line 1074 of file vector.hpp.

01074                                                           {
01075   return binary_map<mul_op> (v, w); }

table<C,T,V> mmx::operator* ( const K &  sc,
const table< C, T, V > &  t 
) [inline]

Definition at line 647 of file table.hpp.

00647                                          {
00648   return binary_map_scalar<lmul_op> (t, sc); }

table<C,T,V> mmx::operator* ( const table< C, T, V > &  t,
const K &  sc 
) [inline]

Definition at line 644 of file table.hpp.

00644                                          {
00645   return binary_map_scalar<rmul_op> (t, sc); }

table<C,T,V> mmx::operator* ( const table< C, T, V > &  t,
const table< C, T, V > &  u 
) [inline]

Definition at line 627 of file table.hpp.

00627                                                               {
00628   return binary_map<mul_op,C,T,V> (t, u); }

syntactic operator* ( const syntactic g1,
const syntactic g2 
)

Definition at line 252 of file syntactic.cpp.

References exact_eq(), frac_flag, GEN_OVER, GEN_TIMES, is_func(), and syn().

00252                                                       {
00253   if (frac_flag && is_func (g1, GEN_OVER, 2)) {
00254     if (is_func (g2, GEN_OVER, 2))
00255       return syn (GEN_OVER, g1[1] * g2[1], g1[2] * g2[2]);
00256     else return syn (GEN_OVER, g1[1] * g2, g1[2]);
00257   }
00258   if (frac_flag && is_func (g2, GEN_OVER, 2))
00259     return syn (GEN_OVER, g1 * g2[1], g2[2]);
00260   if (exact_eq (g1, 0)) return 0;
00261   if (exact_eq (g2, 0)) return 0;
00262   if (exact_eq (g1, 1)) return g2;
00263   if (exact_eq (g2, 1)) return g1;
00264   if (exact_eq (g1, -1)) return -g2;
00265   if (exact_eq (g2, -1)) return -g1;
00266   return syn (GEN_TIMES, g1, g2);
00267 }

sparse_vector<C,T,V> mmx::operator* ( const C &  sc,
const sparse_vector< C, T, V > &  t 
) [inline]

Definition at line 299 of file sparse_vector.hpp.

00299                                                  {
00300   return binary_map_scalar<lmul_op> (t, sc); }

sparse_vector<C,T,V> mmx::operator* ( const sparse_vector< C, T, V > &  t,
const C &  sc 
) [inline]

Definition at line 296 of file sparse_vector.hpp.

00296                                                  {
00297   return binary_map_scalar<rmul_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 268 of file sparse_vector.hpp.

00268                                                             {
00269   return binary_map<mul_op,C,T,V> (t, u); }

pair<C1,C2> mmx::operator* ( const pair< C1, C2 > &  p1,
const pair< C1, C2 > &  p2 
) [inline]

Definition at line 58 of file pair.hpp.

References Pair.

00058                                             {
00059   return Pair (p1.x1 * p2.x1, p1.x2 * p2.x2);
00060 }

new_table<C,T,V> mmx::operator* ( const K &  sc,
const new_table< C, T, V > &  t 
) [inline]

Definition at line 718 of file new_table.hpp.

00718                                          {
00719   return binary_map_scalar<lmul_op> (t, sc); }

new_table<C,T,V> mmx::operator* ( const new_table< C, T, V > &  t,
const K &  sc 
) [inline]

Definition at line 715 of file new_table.hpp.

00715                                          {
00716   return binary_map_scalar<rmul_op> (t, sc); }

new_table<C,T,V> mmx::operator* ( const new_table< C, T, V > &  t,
const new_table< C, T, V > &  u 
) [inline]

Definition at line 698 of file new_table.hpp.

00698                                                               {
00699   return binary_map<mul_op,C,T,V> (t, u); }

list<C> mmx::operator* ( const list< C > &  l1,
const list< C > &  l2 
) [inline]

Definition at line 289 of file list.hpp.

References append().

00289                                             {
00290   return append (l1, l2);
00291 }

iterator<C> mmx::operator* ( const iterator< C > &  it1,
const iterator< C > &  it2 
) [inline]

Definition at line 399 of file iterator.hpp.

References Iterator.

00399                                                       {
00400   return Iterator (new join_iterator_rep<C> (it1, it2));
00401 }

generic operator* ( const int &  x1,
const generic x2 
)

Definition at line 417 of file generic.cpp.

00417                                                       {
00418   return generic (x1) * x2; }

generic operator* ( const generic x1,
const int &  x2 
)

Definition at line 409 of file generic.cpp.

00409                                                       {
00410   return x1 * generic (x2); }

generic operator* ( const generic x1,
const generic x2 
)

Definition at line 394 of file generic.cpp.

References ACC_BINARY, ACC_MUL, current_ev, and GEN_TIMES.

00394                                                   {
00395   ACC_BINARY (ACC_MUL, x1, x2);
00396   return current_ev->apply (GEN_TIMES, x1, x2);
00397 }

chain< C > operator* ( const chain< C > &  l,
const chain< C > &  r 
) [inline]

Definition at line 318 of file chain.hpp.

References balance_left(), balance_right(), cAr(), car(), cDr(), cdr(), Chain, left(), middle(), N(), and right().

00318                                             {
00319   nat nl= N (l), nr= N (r);
00320   if (nl < nr) {
00321     if (nl == 0) return r;
00322     if (nr < 2*nl + 3) return Chain (l, car (r), cdr (r));
00323     Chain br= balance_right (r);
00324     return Chain (l * left (br), middle (br), right (br));
00325   }
00326   else {
00327     if (nr == 0) return l;
00328     if (nl < 2*nr + 3) return Chain (cDr (l), cAr (l), r);
00329     Chain bl= balance_left (l);
00330     return Chain (left (bl), middle (bl), right (bl) * r);
00331   }
00332 }

vector<C,V>& mmx::operator*= ( vector< C, V > &  v,
const C &  c 
) [inline]

Definition at line 1119 of file vector.hpp.

01119                                                  {
01120   return unary_set_scalar<rmul_op> (v, c); }

vector<C,V>& mmx::operator*= ( vector< C, V > &  v,
const vector< C, V > &  w 
) [inline]

Definition at line 1115 of file vector.hpp.

01115                                                       {
01116   return unary_set<mul_op> (v, w); }

table<C,T,V>& mmx::operator*= ( table< C, T, V > &  t,
const K &  sc 
) [inline]

Definition at line 674 of file table.hpp.

00674                                     {
00675   return unary_set_scalar<rmul_op> (t, sc); }

table<C,T,V> mmx::operator*= ( table< C, T, V > &  t,
const table< C, T, V > &  u 
) [inline]

Definition at line 665 of file table.hpp.

00665                                                          {
00666   return unary_set<mul_op,C,T,V> (t, u); }

new_table<C,T,V>& mmx::operator*= ( new_table< C, T, V > &  t,
const K &  sc 
) [inline]

Definition at line 745 of file new_table.hpp.

00745                                     {
00746   return unary_set_scalar<rmul_op> (t, sc); }

new_table<C,T,V> mmx::operator*= ( new_table< C, T, V > &  t,
const new_table< C, T, V > &  u 
) [inline]

Definition at line 736 of file new_table.hpp.

00736                                                          {
00737   return unary_set<mul_op,C,T,V> (t, u); }

C& mmx::operator*= ( C &  x,
const D &  y 
) [inline]

Definition at line 265 of file defaults.hpp.

00265 { return x= x*y; }

vector<C,V> mmx::operator+ ( const int &  x,
const vector< C, V > &  y 
) [inline]

Definition at line 1154 of file vector.hpp.

01159 {

vector<C,V> mmx::operator+ ( const vector< C, V > &  x,
const int &  y 
) [inline]

Definition at line 1154 of file vector.hpp.

01159 {

vector<int,V> mmx::operator+ ( const vector< int, V > &  w,
const int &  v 
) [inline]

Definition at line 1060 of file vector.hpp.

References Vector_int.

01060                                                {
01061   return binary_map<add_op> (w, Vector_int (v)); }

vector<C,V> mmx::operator+ ( const vector< C, V > &  w,
const C &  v 
) [inline]

Definition at line 1057 of file vector.hpp.

References Vector.

01057                                                      {
01058   return binary_map<add_op> (w, Vector (v)); }

vector<int,V> mmx::operator+ ( const int &  v,
const vector< int, V > &  w 
) [inline]

Definition at line 1055 of file vector.hpp.

References Vector_int.

01055                                                {
01056   return binary_map<add_op> (Vector_int (v), w); }

vector<C,V> mmx::operator+ ( const C &  v,
const vector< C, V > &  w 
) [inline]

Definition at line 1052 of file vector.hpp.

References Vector.

01052                                                      {
01053   return binary_map<add_op> (Vector (v), w); }

vector<C,V> mmx::operator+ ( const vector< C, V > &  v,
const vector< C, V > &  w 
) [inline]

Definition at line 1050 of file vector.hpp.

01050                                                           {
01051   return binary_map<add_op> (v, w); }

table<C,T,V> mmx::operator+ ( const int &  x,
const table< C, T, V > &  y 
) [inline]

Definition at line 695 of file table.hpp.

00698 { return unary_map<sqrt_op> (t); }

table<C,T,V> mmx::operator+ ( const table< C, T, V > &  x,
const int &  y 
) [inline]

Definition at line 695 of file table.hpp.

00698 { return unary_map<sqrt_op> (t); }

table<C,T,V> mmx::operator+ ( const C &  t,
const table< C, T, V > &  u 
) [inline]

Definition at line 619 of file table.hpp.

References Table.

00619                                                           {
00620   return binary_map<add_op,C,T,V> (Table (t), u); }

table<C,T,V> mmx::operator+ ( const table< C, T, V > &  t,
const C &  u 
) [inline]

Definition at line 617 of file table.hpp.

References Table.

00617                                                           {
00618   return binary_map<add_op,C,T,V> (t, Table (u)); }

table<C,T,V> mmx::operator+ ( const table< C, T, V > &  t,
const table< C, T, V > &  u 
) [inline]

Definition at line 615 of file table.hpp.

00615                                                               {
00616   return binary_map<add_op,C,T,V> (t, u); }

syntactic operator+ ( const syntactic g1,
const syntactic g2 
)

Definition at line 169 of file syntactic.cpp.

References exact_eq(), GEN_MINUS, GEN_PLUS, is_func(), signed_decompose(), and syn().

00169                                                       {
00170   if (exact_eq (g1, 0)) return g2;
00171   if (exact_eq (g2, 0)) return g1;
00172   if (is_func (g2, GEN_MINUS, 1))
00173     return g1 - g2[1];
00174   if (is_func (g2, GEN_PLUS, 2))
00175     return (g1 + g2[1]) + g2[2];
00176   if (is_func (g2, GEN_MINUS, 2))
00177     return (g1 + g2[1]) - g2[2];
00178   syntactic abs_g2; int sgn_g2;
00179   signed_decompose (g2, abs_g2, sgn_g2);
00180   if (sgn_g2 < 0) return syn (GEN_MINUS, g1, abs_g2);
00181   else return syn (GEN_PLUS, g1, abs_g2);
00182 }

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 262 of file sparse_vector.hpp.

00262                                                             {
00263   return binary_map_optimized<add_op,C,T,V> (t, u); }

new_table<C,T,V> mmx::operator+ ( const int &  x,
const new_table< C, T, V > &  y 
) [inline]

Definition at line 766 of file new_table.hpp.

00769 { return unary_map<sqrt_op> (t); }

new_table<C,T,V> mmx::operator+ ( const new_table< C, T, V > &  x,
const int &  y 
) [inline]

Definition at line 766 of file new_table.hpp.

00769 { return unary_map<sqrt_op> (t); }

new_table<C,T,V> mmx::operator+ ( const C &  t,
const new_table< C, T, V > &  u 
) [inline]

Definition at line 690 of file new_table.hpp.

References Table.

00690                                                           {
00691   return binary_map<add_op,C,T,V> (Table (t), u); }

new_table<C,T,V> mmx::operator+ ( const new_table< C, T, V > &  t,
const C &  u 
) [inline]

Definition at line 688 of file new_table.hpp.

References Table.

00688                                                           {
00689   return binary_map<add_op,C,T,V> (t, Table (u)); }

new_table<C,T,V> mmx::operator+ ( const new_table< C, T, V > &  t,
const new_table< C, T, V > &  u 
) [inline]

Definition at line 686 of file new_table.hpp.

00686                                                               {
00687   return binary_map<add_op,C,T,V> (t, u); }

generic operator+ ( const int &  x1,
const generic x2 
)

Definition at line 413 of file generic.cpp.

00413                                                       {
00414   return generic (x1) + x2; }

generic operator+ ( const generic x1,
const int &  x2 
)

Definition at line 405 of file generic.cpp.

00405                                                       {
00406   return x1 + generic (x2); }

generic operator+ ( const generic x1,
const generic x2 
)

Definition at line 382 of file generic.cpp.

References ACC_ADD, ACC_BINARY, current_ev, and GEN_PLUS.

00382                                                   {
00383   ACC_BINARY (ACC_ADD, x1, x2);
00384   return current_ev->apply (GEN_PLUS, x1, x2);
00385 }

vector<C,V>& mmx::operator+= ( vector< C, V > &  v,
const vector< C, V > &  w 
) [inline]

Definition at line 1111 of file vector.hpp.

01111                                                       {
01112   return unary_set<add_op> (v, w); }

table<C,T,V> mmx::operator+= ( table< C, T, V > &  t,
const table< C, T, V > &  u 
) [inline]

Definition at line 661 of file table.hpp.

00661                                                          {
00662   return unary_set<add_op,C,T,V> (t, u); }

new_table<C,T,V> mmx::operator+= ( new_table< C, T, V > &  t,
const new_table< C, T, V > &  u 
) [inline]

Definition at line 732 of file new_table.hpp.

00732                                                          {
00733   return unary_set<add_op,C,T,V> (t, u); }

C& mmx::operator+= ( C &  x,
const D &  y 
) [inline]

Definition at line 261 of file defaults.hpp.

00261 { return x= x+y; }

vector<C,V> mmx::operator- ( const int &  x,
const vector< C, V > &  y 
) [inline]

Definition at line 1154 of file vector.hpp.

01159 {

vector<C,V> mmx::operator- ( const vector< C, V > &  x,
const int &  y 
) [inline]

Definition at line 1154 of file vector.hpp.

01159 {

vector<int,V> mmx::operator- ( const int &  v,
const vector< int, V > &  w 
) [inline]

Definition at line 1072 of file vector.hpp.

References Vector_int.

01072                                                {
01073   return binary_map<sub_op> (Vector_int (v), w); }

vector<C,V> mmx::operator- ( const C &  v,
const vector< C, V > &  w 
) [inline]

Definition at line 1069 of file vector.hpp.

References Vector.

01069                                                      {
01070   return binary_map<sub_op> (Vector (v), w); }

vector<int,V> mmx::operator- ( const vector< int, V > &  v,
const int &  w 
) [inline]

Definition at line 1067 of file vector.hpp.

References Vector_int.

01067                                                {
01068   return binary_map<sub_op> (v, Vector_int (w)); }

vector<C,V> mmx::operator- ( const vector< C, V > &  v,
const C &  w 
) [inline]

Definition at line 1064 of file vector.hpp.

References Vector.

01064                                                      {
01065   return binary_map<sub_op> (v, Vector (w)); }

vector<C,V> mmx::operator- ( const vector< C, V > &  v,
const vector< C, V > &  w 
) [inline]

Definition at line 1062 of file vector.hpp.

01062                                                           {
01063   return binary_map<sub_op> (v, w); }

vector<C,V> mmx::operator- ( const vector< C, V > &  v  )  [inline]

Definition at line 1048 of file vector.hpp.

01048                                          {
01049   return unary_map<neg_op> (v); }

table<C,T,V> mmx::operator- ( const int &  x,
const table< C, T, V > &  y 
) [inline]

Definition at line 695 of file table.hpp.

00698 { return unary_map<sqrt_op> (t); }

table<C,T,V> mmx::operator- ( const table< C, T, V > &  x,
const int &  y 
) [inline]

Definition at line 695 of file table.hpp.

00698 { return unary_map<sqrt_op> (t); }

table<C,T,V> mmx::operator- ( const C &  t,
const table< C, T, V > &  u 
) [inline]

Definition at line 625 of file table.hpp.

References Table.

00625                                                           {
00626   return binary_map<sub_op,C,T,V> (Table (t), u); }

table<C,T,V> mmx::operator- ( const table< C, T, V > &  t,
const C &  u 
) [inline]

Definition at line 623 of file table.hpp.

References Table.

00623                                                           {
00624   return binary_map<sub_op,C,T,V> (t, Table (u)); }

table<C,T,V> mmx::operator- ( const table< C, T, V > &  t,
const table< C, T, V > &  u 
) [inline]

Definition at line 621 of file table.hpp.

00621                                                               {
00622   return binary_map<sub_op,C,T,V> (t, u); }

table<C,T,V> mmx::operator- ( const table< C, T, V > &  t  )  [inline]

Definition at line 613 of file table.hpp.

00613                                               {
00614   return unary_map<neg_op,C,T,V> (t); }

syntactic operator- ( const syntactic g1,
const syntactic g2 
)

Definition at line 185 of file syntactic.cpp.

References exact_eq(), GEN_MINUS, GEN_PLUS, is_func(), signed_decompose(), and syn().

00185                                                       {
00186   if (exact_eq (g2, 0)) return g1;
00187   if (is_func (g2, GEN_MINUS, 1))
00188     return g1 + g2[1];
00189   if (is_func (g2, GEN_PLUS, 2))
00190     return (g1 - g2[1]) - g2[2];
00191   if (is_func (g2, GEN_MINUS, 2))
00192     return (g1 - g2[1]) + g2[2];
00193   syntactic abs_g2; int sgn_g2;
00194   signed_decompose (g2, abs_g2, sgn_g2);
00195   if (exact_eq (g1, 0)) {
00196     if (sgn_g2 > 0) return syn (GEN_MINUS, abs_g2);
00197     else return abs_g2;    
00198   }
00199   else {
00200     if (sgn_g2 > 0) return syn (GEN_MINUS, g1, abs_g2);
00201     else return syn (GEN_PLUS, g1, abs_g2);
00202   }
00203 }

syntactic operator- ( const syntactic g  ) 

Definition at line 154 of file syntactic.cpp.

References exact_eq(), GEN_MINUS, GEN_PLUS, is_func(), signed_decompose(), and syn().

00154                                 {
00155   if (exact_eq (g, 0)) return g;
00156   if (is_func (g, GEN_MINUS, 1))
00157     return g[1];
00158   if (is_func (g, GEN_PLUS, 2))
00159     return (-g[1]) - g[2];
00160   if (is_func (g, GEN_MINUS, 2))
00161     return (-g[1]) + g[2];
00162   syntactic abs_g; int sgn_g;
00163   signed_decompose (g, abs_g, sgn_g);
00164   if (sgn_g > 0) return syn (GEN_MINUS, abs_g);
00165   else return abs_g;
00166 }

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 265 of file sparse_vector.hpp.

00265                                                             {
00266   return binary_map_optimized<sub_op,C,T,V> (t, u); }

sparse_vector<C,T,V> mmx::operator- ( const sparse_vector< C, T, V > &  t  )  [inline]

Definition at line 189 of file sparse_vector.hpp.

00189                                     {
00190   return unary_map<neg_op,C,T,V> (t); }

new_table<C,T,V> mmx::operator- ( const int &  x,
const new_table< C, T, V > &  y 
) [inline]

Definition at line 766 of file new_table.hpp.

00769 { return unary_map<sqrt_op> (t); }

new_table<C,T,V> mmx::operator- ( const new_table< C, T, V > &  x,
const int &  y 
) [inline]

Definition at line 766 of file new_table.hpp.

00769 { return unary_map<sqrt_op> (t); }

new_table<C,T,V> mmx::operator- ( const C &  t,
const new_table< C, T, V > &  u 
) [inline]

Definition at line 696 of file new_table.hpp.

References Table.

00696                                                           {
00697   return binary_map<sub_op,C,T,V> (Table (t), u); }

new_table<C,T,V> mmx::operator- ( const new_table< C, T, V > &  t,
const C &  u 
) [inline]

Definition at line 694 of file new_table.hpp.

References Table.

00694                                                           {
00695   return binary_map<sub_op,C,T,V> (t, Table (u)); }

new_table<C,T,V> mmx::operator- ( const new_table< C, T, V > &  t,
const new_table< C, T, V > &  u 
) [inline]

Definition at line 692 of file new_table.hpp.

00692                                                               {
00693   return binary_map<sub_op,C,T,V> (t, u); }

new_table<C,T,V> mmx::operator- ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 684 of file new_table.hpp.

00684                                               {
00685   return unary_map<neg_op,C,T,V> (t); }

generic operator- ( const int &  x1,
const generic x2 
)

Definition at line 415 of file generic.cpp.

00415                                                       {
00416   return generic (x1) - x2; }

generic operator- ( const generic x1,
const int &  x2 
)

Definition at line 407 of file generic.cpp.

00407                                                       {
00408   return x1 - generic (x2); }

generic operator- ( const generic x1,
const generic x2 
)

Definition at line 388 of file generic.cpp.

References ACC_BINARY, ACC_SUB, current_ev, and GEN_MINUS.

00388                                                   {
00389   ACC_BINARY (ACC_SUB, x1, x2);
00390   return current_ev->apply (GEN_MINUS, x1, x2);
00391 }

generic operator- ( const generic x1  ) 

Definition at line 364 of file generic.cpp.

References ACC_NEGATE, ACC_UNARY, current_ev, and GEN_MINUS.

00364                                {
00365   ACC_UNARY (ACC_NEGATE, x1);
00366   return current_ev->apply (GEN_MINUS, x1);
00367 }

vector<C,V>& mmx::operator-= ( vector< C, V > &  v,
const vector< C, V > &  w 
) [inline]

Definition at line 1113 of file vector.hpp.

01113                                                       {
01114   return unary_set<sub_op> (v, w); }

table<C,T,V> mmx::operator-= ( table< C, T, V > &  t,
const table< C, T, V > &  u 
) [inline]

Definition at line 663 of file table.hpp.

00663                                                          {
00664   return unary_set<sub_op,C,T,V> (t, u); }

new_table<C,T,V> mmx::operator-= ( new_table< C, T, V > &  t,
const new_table< C, T, V > &  u 
) [inline]

Definition at line 734 of file new_table.hpp.

00734                                                          {
00735   return unary_set<sub_op,C,T,V> (t, u); }

C& mmx::operator-= ( C &  x,
const D &  y 
) [inline]

Definition at line 263 of file defaults.hpp.

00263 { return x= x-y; }

vector<C,V> mmx::operator/ ( const int &  x,
const vector< C, V > &  y 
) [inline]

Definition at line 1154 of file vector.hpp.

01159 {

vector<C,V> mmx::operator/ ( const vector< C, V > &  x,
const int &  y 
) [inline]

Definition at line 1154 of file vector.hpp.

01159 {

vector<int,V> mmx::operator/ ( const int &  c,
const vector< int, V > &  v 
) [inline]

Definition at line 1100 of file vector.hpp.

01100                                                {
01101   return binary_map_scalar<ldiv_op> (v, c); }

vector<C,V> mmx::operator/ ( const C &  c,
const vector< C, V > &  v 
) [inline]

Definition at line 1097 of file vector.hpp.

01097                                                      {
01098   return binary_map_scalar<ldiv_op> (v, c); }

vector<int,V> mmx::operator/ ( const vector< int, V > &  v,
const int &  c 
) [inline]

Definition at line 1095 of file vector.hpp.

01095                                                {
01096   return binary_map_scalar<rdiv_op> (v, c); }

vector<C,V> mmx::operator/ ( const vector< C, V > &  v,
const C &  c 
) [inline]

Definition at line 1092 of file vector.hpp.

01092                                                      {
01093   return binary_map_scalar<rdiv_op> (v, c); }

vector<C,V> mmx::operator/ ( const vector< C, V > &  v,
const vector< C, V > &  w 
) [inline]

Definition at line 1076 of file vector.hpp.

01076                                                           {
01077   return binary_map<div_op> (v, w); }

table<C,T,V> mmx::operator/ ( const K &  sc,
const table< C, T, V > &  t 
) [inline]

Definition at line 653 of file table.hpp.

00653                                          {
00654   return binary_map_scalar<ldiv_op> (t, sc); }

table<C,T,V> mmx::operator/ ( const table< C, T, V > &  t,
const K &  sc 
) [inline]

Definition at line 650 of file table.hpp.

00650                                          {
00651   return binary_map_scalar<rdiv_op> (t, sc); }

table<C,T,V> mmx::operator/ ( const table< C, T, V > &  t,
const table< C, T, V > &  u 
) [inline]

Definition at line 629 of file table.hpp.

00629                                                               {
00630   return binary_map<div_op,C,T,V> (t, u); }

syntactic operator/ ( const syntactic g1,
const syntactic g2 
)

Definition at line 270 of file syntactic.cpp.

References exact_eq(), frac_flag, GEN_OVER, is_func(), and syn().

00270                                                       {
00271   if (frac_flag && is_func (g2, GEN_OVER, 2))
00272     return g1 * syn (GEN_OVER, g2[2], g2[1]);
00273   if (exact_eq (g2, 1)) return g1;
00274   if (exact_eq (g2, -1)) return -g1;
00275   if (frac_flag) return g1 * syn (GEN_OVER, 1, g2);
00276   else return syn (GEN_OVER, g1, g2);
00277 }

sparse_vector<C,T,V> mmx::operator/ ( const C &  sc,
const sparse_vector< C, T, V > &  t 
) [inline]

Definition at line 305 of file sparse_vector.hpp.

00305                                                  {
00306   return binary_map_scalar<ldiv_op> (t, sc); }

sparse_vector<C,T,V> mmx::operator/ ( const sparse_vector< C, T, V > &  t,
const C &  sc 
) [inline]

Definition at line 302 of file sparse_vector.hpp.

00302                                                  {
00303   return binary_map_scalar<rdiv_op> (t, sc); }

new_table<C,T,V> mmx::operator/ ( const K &  sc,
const new_table< C, T, V > &  t 
) [inline]

Definition at line 724 of file new_table.hpp.

00724                                          {
00725   return binary_map_scalar<ldiv_op> (t, sc); }

new_table<C,T,V> mmx::operator/ ( const new_table< C, T, V > &  t,
const K &  sc 
) [inline]

Definition at line 721 of file new_table.hpp.

00721                                          {
00722   return binary_map_scalar<rdiv_op> (t, sc); }

new_table<C,T,V> mmx::operator/ ( const new_table< C, T, V > &  t,
const new_table< C, T, V > &  u 
) [inline]

Definition at line 700 of file new_table.hpp.

00700                                                               {
00701   return binary_map<div_op,C,T,V> (t, u); }

generic operator/ ( const int &  x1,
const generic x2 
)

Definition at line 419 of file generic.cpp.

00419                                                       {
00420   return generic (x1) / x2; }

generic operator/ ( const generic x1,
const int &  x2 
)

Definition at line 411 of file generic.cpp.

00411                                                       {
00412   return x1 / generic (x2); }

generic operator/ ( const generic x1,
const generic x2 
)

Definition at line 400 of file generic.cpp.

References ACC_BINARY, ACC_DIV, current_ev, and GEN_OVER.

00400                                                   {
00401   ACC_BINARY (ACC_DIV, x1, x2);
00402   return current_ev->apply (GEN_OVER, x1, x2);
00403 }

vector<C,V>& mmx::operator/= ( vector< C, V > &  v,
const C &  c 
) [inline]

Definition at line 1121 of file vector.hpp.

01121                                                  {
01122   return unary_set_scalar<rdiv_op> (v, c); }

vector<C,V>& mmx::operator/= ( vector< C, V > &  v,
const vector< C, V > &  w 
) [inline]

Definition at line 1117 of file vector.hpp.

01117                                                       {
01118   return unary_set<div_op> (v, w); }

table<C,T,V>& mmx::operator/= ( table< C, T, V > &  t,
const K &  sc 
) [inline]

Definition at line 677 of file table.hpp.

00677                                     {
00678   return unary_set_scalar<rdiv_op> (t, sc); }

table<C,T,V> mmx::operator/= ( table< C, T, V > &  t,
const table< C, T, V > &  u 
) [inline]

Definition at line 667 of file table.hpp.

00667                                                          {
00668   return unary_set<div_op,C,T,V> (t, u); }

new_table<C,T,V>& mmx::operator/= ( new_table< C, T, V > &  t,
const K &  sc 
) [inline]

Definition at line 748 of file new_table.hpp.

00748                                     {
00749   return unary_set_scalar<rdiv_op> (t, sc); }

new_table<C,T,V> mmx::operator/= ( new_table< C, T, V > &  t,
const new_table< C, T, V > &  u 
) [inline]

Definition at line 738 of file new_table.hpp.

00738                                                          {
00739   return unary_set<div_op,C,T,V> (t, u); }

C& mmx::operator/= ( C &  x,
const D &  y 
) [inline]

Definition at line 267 of file defaults.hpp.

00267 { return x= x/y; }

bool mmx::operator< ( const vector< int, V > &  v,
const int &  c 
) [inline]

Definition at line 1168 of file vector.hpp.

01168                                                {
01169   return v <= c && v != c; }

bool mmx::operator< ( const vector< C, V > &  x,
const int &  y 
) [inline]

Definition at line 1156 of file vector.hpp.

01159 {

bool mmx::operator< ( const vector< C, V > &  x,
const vector< C, V > &  y 
) [inline]

Definition at line 1153 of file vector.hpp.

01159 {

bool mmx::operator< ( const C &  c,
const vector< C, V > &  v 
) [inline]

Definition at line 1146 of file vector.hpp.

01146 { return v >  c; }

bool mmx::operator< ( const vector< C, V > &  v,
const C &  c 
) [inline]

Definition at line 1138 of file vector.hpp.

01138                                                           {
01139   return v <= c && v != c; }

bool mmx::operator< ( const table< C, T, V > &  x,
const table< C, T, V > &  y 
) [inline]

Definition at line 696 of file table.hpp.

00698 { return unary_map<sqrt_op> (t); }

bool operator< ( const syntactic x,
const syntactic y 
)

Definition at line 379 of file syntactic.cpp.

References as_generic(), and small_big_compare().

00379                                                     {
00380   return small_big_compare (as_generic (x), as_generic (y)) < 0;
00381 }

bool operator< ( const string s,
const string t 
)

Definition at line 296 of file string.cpp.

References N().

00296                                                 {
00297   register nat i;
00298   for (i=0; i<N(s1); i++) {
00299     if (i >= N(s2)) return false;
00300     if (s1[i] < s2[i]) return true;
00301     if (s2[i] < s1[i]) return false;
00302   }
00303   return false;
00304 }

bool mmx::operator< ( const new_table< C, T, V > &  x,
const new_table< C, T, V > &  y 
) [inline]

Definition at line 767 of file new_table.hpp.

00769 { return unary_map<sqrt_op> (t); }

bool mmx::operator< ( const instance< Cat, Nr > &  x,
const int &  i 
) [inline]

Definition at line 125 of file instance.hpp.

References promote().

00125                                                               {
00126   return x < promote (i, x); }

bool operator< ( const int &  x1,
const generic x2 
)

Definition at line 656 of file generic.cpp.

00656                                                    {
00657   return generic (x1) < x2; }

bool operator< ( const generic x1,
const int &  x2 
)

Definition at line 648 of file generic.cpp.

00648                                                    {
00649   return x1 < generic (x2); }

bool operator< ( const generic x1,
const generic x2 
)

Definition at line 625 of file generic.cpp.

References ACC_LESS, ACC_TEST, as_bool(), current_ev, and GEN_LESS.

00625                                                   {
00626   ACC_TEST (ACC_LESS, x1, x2);
00627   return as_bool (current_ev->apply (GEN_LESS, x1, x2));
00628 }

static string& mmx::operator<< ( string out,
const generic g 
) [static]

Definition at line 221 of file cpp_printer.cpp.

References mmerr, and type_name().

00221                                             {
00222   if (is<string> (g)) return out << as<string> (g);
00223   if (is<literal> (g)) return out << (*(as<literal> (g)));
00224   mmerr << g << ": " << type_name (g) << "\n";
00225   assert (false);
00226   return out;
00227 }

static string& mmx::operator<< ( string out,
const char *  s 
) [static]

Definition at line 216 of file cpp_printer.cpp.

00216                                          {
00217   return out << string (s);
00218 }

static string& mmx::operator<< ( string out,
print_controls  pc 
) [static]

Definition at line 90 of file mmx_printer.cpp.

References INDENT, indentation_level, inside(), LF, N(), UNINDENT, and VARINDENT.

00090                                              {
00091   switch (pc) {
00092   case LF:
00093     out << "\n";
00094     for (nat i=0; i<indentation_level; i++) out << "  ";
00095     break;
00096   case INDENT:
00097     indentation_level++;
00098     out << "  ";
00099     break;
00100   case VARINDENT:
00101     indentation_level++;
00102     break;
00103   case UNINDENT:
00104     indentation_level--;
00105     if (N(out) >= 2 && out[N(out)-2] == ' ' && out[N(out)-1] == ' ')
00106       inside (out) -> resize (N(out) - 2);
00107     break;
00108   }
00109   return out;
00110 }

table<C,T,V>& mmx::operator<< ( table< C, T, V > &  t,
const table< C, T, V > &  u 
) [inline]

Definition at line 758 of file table.hpp.

References busy(), and entries().

00758                                        {
00759   for (iterator<T> it= entries (u); busy (it); ++it)
00760     t[*it]= u[*it];
00761   return t;
00762 }

syntactic operator<< ( const syntactic x1,
const syntactic x2 
)

Definition at line 467 of file syntactic.cpp.

References GEN_LESSLESS, and syn().

00467                                                                  {
00468   return syn (GEN_LESSLESS, x1, x2); }

port mmx::operator<< ( const port &  out,
const print_format &  fm 
) [inline]

Definition at line 163 of file port.hpp.

References inside().

00163                                                       {
00164   inside (out) -> format (fm);
00165   return out;
00166 }

port mmx::operator<< ( const port &  out,
const char &  c 
) [inline]

Definition at line 157 of file port.hpp.

References string_as_mmx(), and write().

00157                                              {
00158   write (out, string_as_mmx (c));
00159   return out;
00160 }

port mmx::operator<< ( const port &  out,
const const_charp &  s 
) [inline]

Definition at line 151 of file port.hpp.

References string_as_mmx(), and write().

00151                                                     {
00152   write (out, string_as_mmx (s));
00153   return out;
00154 }

port mmx::operator<< ( const port &  out,
const charp &  s 
) [inline]

Definition at line 145 of file port.hpp.

References string_as_mmx(), and write().

00145                                               {
00146   write (out, string_as_mmx (s));
00147   return out;
00148 }

port mmx::operator<< ( const port &  out,
const string &  s 
) [inline]

Definition at line 139 of file port.hpp.

References string_as_mmx(), and write().

00139                                                {
00140   write (out, string_as_mmx (s));
00141   return out;
00142 }

new_table<C,T,V>& mmx::operator<< ( new_table< C, T, V > &  t,
const new_table< C, T, V > &  u 
) [inline]

Definition at line 829 of file new_table.hpp.

References busy(), and entries().

00829                                        {
00830   for (iterator<T> it= entries (u); busy (it); ++it)
00831     t[*it]= u[*it];
00832   return t;
00833 }

heap<C>& mmx::operator<< ( heap< C > &  h,
const C &  x 
) [inline]

Definition at line 196 of file heap.hpp.

References push().

00196                                                     {
00197   push (h, x); return h; }

generic operator<< ( const generic x1,
const generic x2 
)

Definition at line 793 of file generic.cpp.

References current_ev, and GEN_LESSLESS.

00793                                                            {
00794   return current_ev->apply (GEN_LESSLESS, x1, x2); }

port operator<< ( const port &  out,
const C &  x 
) [inline]

Definition at line 133 of file port.hpp.

References output_as_mmx(), and write().

00133                                           {
00134   write (out, output_as_mmx (as<generic> (x)));
00135   return out;
00136 }

bool mmx::operator<= ( const vector< int, V > &  v,
const int &  c 
) [inline]

Definition at line 1165 of file vector.hpp.

01165                                                 {
01166   return binary_test_scalar<lesseq_op> (v, c); }

bool mmx::operator<= ( const vector< C, V > &  x,
const int &  y 
) [inline]

Definition at line 1156 of file vector.hpp.

01159 {

bool mmx::operator<= ( const C &  c,
const vector< C, V > &  v 
) [inline]

Definition at line 1148 of file vector.hpp.

01148 { return v >= c; }

bool mmx::operator<= ( const vector< C, V > &  v,
const C &  c 
) [inline]

Definition at line 1136 of file vector.hpp.

01136                                                     {
01137   return binary_test_scalar<lesseq_op> (v, c); }

bool mmx::operator<= ( const vector< C, V > &  v,
const vector< C, V > &  w 
) [inline]

Definition at line 1128 of file vector.hpp.

01128                                                          {
01129   return binary_test<lesseq_op> (v, w); }

bool mmx::operator<= ( const table< C, T, V > &  t,
const K &  c 
) [inline]

Definition at line 687 of file table.hpp.

00687                                          {
00688   return binary_test_scalar<lesseq_op> (t, c); }

bool mmx::operator<= ( const table< C, T, V > &  t,
const table< C, T, V > &  u 
) [inline]

Definition at line 679 of file table.hpp.

00679                                                               {
00680   return binary_test<lesseq_op> (t, u); }

bool operator<= ( const syntactic x,
const syntactic y 
)

Definition at line 384 of file syntactic.cpp.

References as_generic(), and small_big_compare().

00384                                                      {
00385   return small_big_compare (as_generic (x), as_generic (y)) <= 0;
00386 }

bool operator<= ( const string s,
const string t 
)

Definition at line 307 of file string.cpp.

References N().

00307                                                  {
00308   register nat i;
00309   for (i=0; i<N(s1); i++) {
00310     if (i >= N(s2)) return false;
00311     if (s1[i] < s2[i]) return true;
00312     if (s2[i] < s1[i]) return false;
00313   }
00314   return true;
00315 }

bool mmx::operator<= ( const new_table< C, T, V > &  t,
const K &  c 
) [inline]

Definition at line 758 of file new_table.hpp.

00758                                          {
00759   return binary_test_scalar<lesseq_op> (t, c); }

bool mmx::operator<= ( const new_table< C, T, V > &  t,
const new_table< C, T, V > &  u 
) [inline]

Definition at line 750 of file new_table.hpp.

00750                                                               {
00751   return binary_test<lesseq_op> (t, u); }

bool mmx::operator<= ( const instance< Cat, Nr > &  x,
const int &  i 
) [inline]

Definition at line 129 of file instance.hpp.

References promote().

00129                                                                {
00130   return x <= promote (i, x); }

bool operator<= ( const int &  x1,
const generic x2 
)

Definition at line 658 of file generic.cpp.

00658                                                     {
00659   return generic (x1) <= x2; }

bool operator<= ( const generic x1,
const int &  x2 
)

Definition at line 650 of file generic.cpp.

00650                                                     {
00651   return x1 <= generic (x2); }

bool operator<= ( const generic x1,
const generic x2 
)

Definition at line 631 of file generic.cpp.

References ACC_LESSEQ, ACC_TEST, as_bool(), current_ev, and GEN_LESSEQ.

00631                                                    {
00632   ACC_TEST (ACC_LESSEQ, x1, x2);
00633   return as_bool (current_ev->apply (GEN_LESSEQ, x1, x2));
00634 }

bool mmx::operator== ( const vector< int, V > &  v,
const int &  c 
) [inline]

Definition at line 1159 of file vector.hpp.

01159                                                 {
01160   return binary_test_scalar<equal_op> (v, c); }

bool mmx::operator== ( const vector< C, V > &  x,
const int &  y 
) [inline]

Definition at line 1155 of file vector.hpp.

01159 {

bool mmx::operator== ( const vector< C, V > &  x,
const vector< C, V > &  y 
) [inline]

Definition at line 1151 of file vector.hpp.

01159 {

bool mmx::operator== ( const C &  c,
const vector< C, V > &  v 
) [inline]

Definition at line 1144 of file vector.hpp.

01144 { return v == c; }

bool mmx::operator== ( const vector< C, V > &  v,
const C &  c 
) [inline]

Definition at line 1132 of file vector.hpp.

01132                                                     {
01133   return binary_test_scalar<equal_op> (v, c); }

bool mmx::operator== ( const format< C > &  x,
const format< C > &  y 
) [inline]

Definition at line 209 of file type_props.hpp.

00209 { return true; }

bool mmx::operator== ( const triple< C1, C2, C3 > &  x,
const triple< C1, C2, C3 > &  y 
) [inline]

Definition at line 58 of file triple.hpp.

00063 {

bool mmx::operator== ( const table< C, T, V > &  t,
const K &  c 
) [inline]

Definition at line 684 of file table.hpp.

00684                                          {
00685   return binary_test_scalar<equal_op> (t, c); }

bool operator== ( const table< C, T, V > &  t1,
const table< C, T, V > &  t2 
) [inline]

Definition at line 693 of file table.hpp.

00698 { return unary_map<sqrt_op> (t); }

bool operator== ( const vector< syntactic > &  v,
const vector< syntactic > &  w 
)

Definition at line 520 of file syntactic.cpp.

References is_a_scalar(), N(), and vector< C, V >::scalar().

00520                                                                           {
00521   if (is_a_scalar (v)) return is_a_scalar (w) && v.scalar () == w.scalar ();
00522   if (N(v) != N(w)) return false;
00523   for (nat i=0; i<N(v); i++)
00524     if (v[i] != w[i]) return false;
00525   return true;
00526 }

bool mmx::operator== ( const syntactic &  c1,
const syntactic &  c2 
) [inline]

Definition at line 50 of file syntactic.hpp.

00050                                                                    {
00051   return (*c1) == (*c2); }

bool mmx::operator== ( const symbol< C, equal_table > &  s1,
const symbol< C, equal_table > &  s2 
) [inline]

Definition at line 120 of file symbol.hpp.

References exact_eq().

00121                                               {
00122   return exact_eq (s1, s2); }

bool operator== ( const symbol< C, V > &  s1,
const symbol< C, V > &  s2 
) [inline]

Definition at line 105 of file symbol.hpp.

00105                                                                   {
00106   return (*s1) == (*s2); }

bool mmx::operator== ( const storage x,
const storage y 
) [inline]

Definition at line 56 of file storage.hpp.

00057 { return "storage"; }

bool mmx::operator== ( const sparse_vector< C, T, V > &  x,
const sparse_vector< C, T, V > &  y 
) [inline]

Definition at line 168 of file sparse_vector.hpp.

00176 {

bool mmx::operator== ( const port &  x,
const port &  y 
) [inline]

Definition at line 64 of file port.hpp.

00066 { return p->expression (); }

bool mmx::operator== ( const pair< C1, C2 > &  x,
const pair< C1, C2 > &  y 
) [inline]

Definition at line 53 of file pair.hpp.

00058 {

bool mmx::operator== ( const new_table< C, T, V > &  t,
const K &  c 
) [inline]

Definition at line 755 of file new_table.hpp.

00755                                          {
00756   return binary_test_scalar<equal_op> (t, c); }

bool operator== ( const new_table< C, T, V > &  t1,
const new_table< C, T, V > &  t2 
) [inline]

Definition at line 764 of file new_table.hpp.

00769 { return unary_map<sqrt_op> (t); }

bool mmx::operator== ( const Indirect< R > &  x,
const Indirect< R > &  y 
) [inline]

Definition at line 754 of file mmc_glue.hpp.

References Indirect< R >::rep.

00754                                                                           {
00755   return x.rep == y.rep; }

bool mmx::operator== ( const literal c1,
const literal c2 
) [inline]

Definition at line 44 of file literal.hpp.

00044                                                                {
00045   return as_symbol (c1) == as_symbol (c2); }

bool mmx::operator== ( const list< C > &  x,
const list< C > &  y 
) [inline]

Definition at line 228 of file list.hpp.

00236 {

bool mmx::operator== ( const iterator< C > &  x,
const iterator< C > &  y 
) [inline]

Definition at line 185 of file iterator.hpp.

00195 : public Iterator_rep {

bool mmx::operator== ( const instance< Cat, Nr > &  x,
const int &  i 
) [inline]

Definition at line 121 of file instance.hpp.

References promote().

00121                                                                {
00122   return x == promote (i, x); }

bool mmx::operator== ( const heap< C > &  x,
const heap< C > &  y 
) [inline]

Definition at line 243 of file heap.hpp.

00247 {

bool operator== ( const int &  x1,
const generic x2 
)

Definition at line 582 of file generic.cpp.

00582 { return x2 == x1; }

bool operator== ( const generic x1,
const int &  x2 
)

Definition at line 570 of file generic.cpp.

References is_nil().

00570                                                {
00571   if (is<int> (x1)) return as<int> (x1) == x2;
00572   else {
00573     routine* cv= x1->acc_construct (accelerator<int>::id);
00574     if (cv != NULL && !is_nil (*cv))
00575       return x1 -> is_equal ((*cv) (as<generic> (x2)));
00576   }
00577   return x1 == generic (x2);
00578 }

bool operator== ( const generic x1,
const generic x2 
)

Definition at line 555 of file generic.cpp.

References as_bool(), current_ev, GEN_EQUAL, is_nil(), and same_type().

00555                                                    {
00556   if (same_type (x1, x2))
00557     return x1->is_equal (x2);
00558   else {
00559     routine* cv= x1->acc_construct (x2->acc_id ());
00560     if (cv != NULL && !is_nil (*cv))
00561       return x1 -> is_equal ((*cv) (x2));
00562     cv= x2->acc_construct (x1->acc_id ());
00563     if (cv != NULL && !is_nil (*cv))
00564       return (*cv) (x1) -> is_equal (x2);
00565   }
00566   return as_bool (current_ev->apply (GEN_EQUAL, x1, x2));
00567 }

bool mmx::operator== ( const function_8< D, S1, S2, S3, S4, S5, S6, S7, S8 > &  x,
const function_8< D, S1, S2, S3, S4, S5, S6, S7, S8 > &  y 
) [inline]

Definition at line 614 of file function.hpp.

00615 {

bool mmx::operator== ( const function_7< D, S1, S2, S3, S4, S5, S6, S7 > &  x,
const function_7< D, S1, S2, S3, S4, S5, S6, S7 > &  y 
) [inline]

Definition at line 554 of file function.hpp.

00555 {

bool mmx::operator== ( const function_6< D, S1, S2, S3, S4, S5, S6 > &  x,
const function_6< D, S1, S2, S3, S4, S5, S6 > &  y 
) [inline]

Definition at line 494 of file function.hpp.

00495 {

bool mmx::operator== ( const function_5< D, S1, S2, S3, S4, S5 > &  x,
const function_5< D, S1, S2, S3, S4, S5 > &  y 
) [inline]

Definition at line 435 of file function.hpp.

00436 {

bool mmx::operator== ( const function_4< D, S1, S2, S3, S4 > &  x,
const function_4< D, S1, S2, S3, S4 > &  y 
) [inline]

Definition at line 376 of file function.hpp.

00377 {

bool mmx::operator== ( const function_3< D, S1, S2, S3 > &  x,
const function_3< D, S1, S2, S3 > &  y 
) [inline]

Definition at line 317 of file function.hpp.

00318 {

bool mmx::operator== ( const function_2< D, S1, S2 > &  x,
const function_2< D, S1, S2 > &  y 
) [inline]

Definition at line 258 of file function.hpp.

00259 {

bool mmx::operator== ( const function_1< D, S1 > &  x,
const function_1< D, S1 > &  y 
) [inline]

Definition at line 158 of file function.hpp.

00159 {

bool mmx::operator== ( const function_0< D > &  x,
const function_0< D > &  y 
) [inline]

Definition at line 102 of file function.hpp.

00103 {

bool mmx::operator== ( const exception &  e1,
const exception &  e2 
) [inline]

Definition at line 39 of file exception.hpp.

00039                                                                    {
00040   return (*e1) == (*e2); }

bool mmx::operator== ( const dynamic x,
const dynamic y 
) [inline]

Definition at line 96 of file dynamic.hpp.

bool mmx::operator== ( const observer x,
const observer y 
) [inline]

Definition at line 59 of file dynamic.hpp.

00065 : public rep_struct {

bool mmx::operator== ( const document c1,
const document c2 
) [inline]

Definition at line 51 of file document.hpp.

00051                                                                  {
00052   return (*c1) == (*c2); }

bool mmx::operator== ( const compound c1,
const compound c2 
) [inline]

Definition at line 49 of file compound.hpp.

00049                                                                  {
00050   return as_symbol (c1) == as_symbol (c2); }

bool mmx::operator== ( const cache< C, T > &  c1,
const cache< C, T > &  c2 
) [inline]

Definition at line 42 of file cache.hpp.

References hard_eq().

00042                                                                 {
00043   return hard_eq (*c1, *c2); }

bool mmx::operator> ( const vector< int, V > &  v,
const int &  c 
) [inline]

Definition at line 1174 of file vector.hpp.

01174                                                {
01175   return v >= c && v != c; }

bool mmx::operator> ( const vector< C, V > &  x,
const int &  y 
) [inline]

Definition at line 1156 of file vector.hpp.

01159 {

bool mmx::operator> ( const vector< C, V > &  x,
const vector< C, V > &  y 
) [inline]

Definition at line 1153 of file vector.hpp.

01159 {

bool mmx::operator> ( const C &  c,
const vector< C, V > &  v 
) [inline]

Definition at line 1147 of file vector.hpp.

01147 { return v <  c; }

bool mmx::operator> ( const vector< C, V > &  v,
const C &  c 
) [inline]

Definition at line 1142 of file vector.hpp.

01142                                                           {
01143   return v >= c && v != c; }

bool mmx::operator> ( const table< C, T, V > &  x,
const table< C, T, V > &  y 
) [inline]

Definition at line 696 of file table.hpp.

00698 { return unary_map<sqrt_op> (t); }

bool operator> ( const syntactic x,
const syntactic y 
)

Definition at line 389 of file syntactic.cpp.

References as_generic(), and small_big_compare().

00389                                                     {
00390   return small_big_compare (as_generic (x), as_generic (y)) > 0;
00391 }

bool operator> ( const string s,
const string t 
)

Definition at line 318 of file string.cpp.

References N().

00318                                                 {
00319   register nat i;
00320   for (i=0; i<N(s1); i++) {
00321     if (i >= N(s2)) return true;
00322     if (s1[i] > s2[i]) return true;
00323     if (s2[i] > s1[i]) return false;
00324   }
00325   return false;
00326 }

bool mmx::operator> ( const new_table< C, T, V > &  x,
const new_table< C, T, V > &  y 
) [inline]

Definition at line 767 of file new_table.hpp.

00769 { return unary_map<sqrt_op> (t); }

bool mmx::operator> ( const instance< Cat, Nr > &  x,
const int &  i 
) [inline]

Definition at line 127 of file instance.hpp.

References promote().

00127                                                               {
00128   return x > promote (i, x); }

bool operator> ( const int &  x1,
const generic x2 
)

Definition at line 660 of file generic.cpp.

00660                                                    {
00661   return generic (x1) > x2; }

bool operator> ( const generic x1,
const int &  x2 
)

Definition at line 652 of file generic.cpp.

00652                                                    {
00653   return x1 > generic (x2); }

bool operator> ( const generic x1,
const generic x2 
)

Definition at line 637 of file generic.cpp.

References ACC_GTR, ACC_TEST, as_bool(), current_ev, and GEN_GTR.

00637                                                   {
00638   ACC_TEST (ACC_GTR, x1, x2);
00639   return as_bool (current_ev->apply (GEN_GTR, x1, x2));
00640 }

bool mmx::operator>= ( const vector< int, V > &  v,
const int &  c 
) [inline]

Definition at line 1171 of file vector.hpp.

01171                                                 {
01172   return binary_test_scalar<gtreq_op> (v, c); }

bool mmx::operator>= ( const vector< C, V > &  x,
const int &  y 
) [inline]

Definition at line 1156 of file vector.hpp.

01159 {

bool mmx::operator>= ( const C &  c,
const vector< C, V > &  v 
) [inline]

Definition at line 1149 of file vector.hpp.

01149 { return v <= c; }

bool mmx::operator>= ( const vector< C, V > &  v,
const C &  c 
) [inline]

Definition at line 1140 of file vector.hpp.

01140                                                     {
01141   return binary_test_scalar<gtreq_op> (v, c); }

bool mmx::operator>= ( const vector< C, V > &  v,
const vector< C, V > &  w 
) [inline]

Definition at line 1130 of file vector.hpp.

01130                                                          {
01131   return binary_test<gtreq_op> (v, w); }

bool mmx::operator>= ( const table< C, T, V > &  t,
const K &  c 
) [inline]

Definition at line 690 of file table.hpp.

00690                                          {
00691   return binary_test_scalar<gtreq_op> (t, c); }

bool mmx::operator>= ( const table< C, T, V > &  t,
const table< C, T, V > &  u 
) [inline]

Definition at line 681 of file table.hpp.

00681                                                               {
00682   return binary_test<gtreq_op,C,T,V> (t, u); }

bool operator>= ( const syntactic x,
const syntactic y 
)

Definition at line 394 of file syntactic.cpp.

References as_generic(), and small_big_compare().

00394                                                      {
00395   return small_big_compare (as_generic (x), as_generic (y)) >= 0;
00396 }

bool operator>= ( const string s,
const string t 
)

Definition at line 329 of file string.cpp.

References N().

00329                                                  {
00330   register nat i;
00331   for (i=0; i<N(s1); i++) {
00332     if (i >= N(s2)) return true;
00333     if (s1[i] > s2[i]) return true;
00334     if (s2[i] > s1[i]) return false;
00335   }
00336   return true;
00337 }

bool mmx::operator>= ( const new_table< C, T, V > &  t,
const K &  c 
) [inline]

Definition at line 761 of file new_table.hpp.

00761                                          {
00762   return binary_test_scalar<gtreq_op> (t, c); }

bool mmx::operator>= ( const new_table< C, T, V > &  t,
const new_table< C, T, V > &  u 
) [inline]

Definition at line 752 of file new_table.hpp.

00752                                                               {
00753   return binary_test<gtreq_op,C,T,V> (t, u); }

bool mmx::operator>= ( const instance< Cat, Nr > &  x,
const int &  i 
) [inline]

Definition at line 131 of file instance.hpp.

References promote().

00131                                                                {
00132   return x >= promote (i, x); }

bool operator>= ( const int &  x1,
const generic x2 
)

Definition at line 662 of file generic.cpp.

00662                                                     {
00663   return generic (x1) >= x2; }

bool operator>= ( const generic x1,
const int &  x2 
)

Definition at line 654 of file generic.cpp.

00654                                                     {
00655   return x1 >= generic (x2); }

bool operator>= ( const generic x1,
const generic x2 
)

Definition at line 643 of file generic.cpp.

References ACC_GTREQ, ACC_TEST, as_bool(), current_ev, and GEN_GTREQ.

00643                                                    {
00644   ACC_TEST (ACC_GTREQ, x1, x2);
00645   return as_bool (current_ev->apply (GEN_GTREQ, x1, x2));
00646 }

syntactic operator>> ( const syntactic x1,
const syntactic x2 
)

Definition at line 469 of file syntactic.cpp.

References GEN_GTRGTR, and syn().

00469                                                                  {
00470   return syn (GEN_GTRGTR, x1, x2); }

port mmx::operator>> ( const port &  in,
char &  c 
) [inline]

Definition at line 169 of file port.hpp.

References read().

00169                                       {
00170   read (in, &c, 1);
00171   return in;
00172 }

heap<C>& mmx::operator>> ( heap< C > &  h,
C &  x 
) [inline]

Definition at line 198 of file heap.hpp.

References pull().

00198                                               {
00199   x= pull (h); return h; }

generic operator>> ( const generic x1,
const generic x2 
)

Definition at line 795 of file generic.cpp.

References current_ev, and GEN_GTRGTR.

00795                                                            {
00796   return current_ev->apply (GEN_GTRGTR, x1, x2); }

vector<C,V> mmx::operator| ( const vector< C, V > &  v,
const vector< C, V > &  w 
) [inline]

Definition at line 1106 of file vector.hpp.

01106                                                           {
01107   return binary_map<or_op> (v, w); }

table<C,T,V> mmx::operator| ( const table< C, T, V > &  t,
const table< C, T, V > &  u 
) [inline]

Definition at line 635 of file table.hpp.

00635                                                               {
00636   return binary_map<or_op,C,T,V> (t, u); }

new_table<C,T,V> mmx::operator| ( const new_table< C, T, V > &  t,
const new_table< C, T, V > &  u 
) [inline]

Definition at line 706 of file new_table.hpp.

00706                                                               {
00707   return binary_map<or_op,C,T,V> (t, u); }

generic operator| ( const generic x1,
const generic x2 
)

Definition at line 838 of file generic.cpp.

References current_ev, and GEN_OR.

00838                                                           {
00839   return current_ev->apply (GEN_OR, x1, x2); }

table<C,T,V> mmx::operator|= ( table< C, T, V > &  t,
const table< C, T, V > &  u 
) [inline]

Definition at line 669 of file table.hpp.

00669                                                          {
00670   return unary_set<or_op,C,T,V> (t, u); }

new_table<C,T,V> mmx::operator|= ( new_table< C, T, V > &  t,
const new_table< C, T, V > &  u 
) [inline]

Definition at line 740 of file new_table.hpp.

00740                                                          {
00741   return unary_set<or_op,C,T,V> (t, u); }

static table<string, string> mmx::opname_table (  )  [static]

Definition at line 149 of file cpp_printer.cpp.

References CPP_ACCESS, CPP_AND, CPP_APPLY, 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.

00149                 {
00150   table<string, string> t;
00151   SET_OPNAME (CPP_PLUS, "+")
00152   SET_OPNAME (CPP_MINUS, "-");
00153   SET_OPNAME (CPP_TIMES, "*");
00154   SET_OPNAME (CPP_OVER, "/");
00155   SET_OPNAME (CPP_MOD, "%");
00156   SET_OPNAME (CPP_AND, "&&");
00157   SET_OPNAME (CPP_OR, "||");
00158   SET_OPNAME (CPP_NOT, "!");
00159   SET_OPNAME (CPP_BITWISE_AND, "&");
00160   SET_OPNAME (CPP_BITWISE_OR, "|");
00161   SET_OPNAME (CPP_BITWISE_XOR, "^");
00162   SET_OPNAME (CPP_ASSIGN, "=");
00163   SET_OPNAME (CPP_LESS, "<");
00164   SET_OPNAME (CPP_GTR, ">");
00165   SET_OPNAME (CPP_PLUS_ASSIGN, "+=");
00166   SET_OPNAME (CPP_MINUS_ASSIGN, "-=");
00167   SET_OPNAME (CPP_TIMES_ASSIGN, "*=");
00168   SET_OPNAME (CPP_OVER_ASSIGN, "/=");
00169   SET_OPNAME (CPP_MOD_ASSIGN, "%=");
00170   SET_OPNAME (CPP_LESSLESS, "<<");
00171   SET_OPNAME (CPP_LESSLESSEQ, "<<=");
00172   SET_OPNAME (CPP_GTRGTR, ">>");
00173   SET_OPNAME (CPP_GTRGTREQ, ">>=");
00174   SET_OPNAME (CPP_EQUAL, "==");
00175   SET_OPNAME (CPP_UNEQUAL, "!=");
00176   SET_OPNAME (CPP_LESSEQ, "<=");
00177   SET_OPNAME (CPP_GTREQ, ">=");
00178   SET_OPNAME (CPP_PREINC, "++");
00179   SET_OPNAME (CPP_PREDEC, "--");
00180   SET_OPNAME (CPP_APPLY, "()");
00181   SET_OPNAME (CPP_ACCESS, "[]");
00182   SET_OPNAME (CPP_COMPLEMENT, "~");
00183   SET_OPNAME (CPP_ARROW, "->");
00184   return t;
00185 }

syntactic ordered_product ( const vector< syntactic > &  v  ) 

Definition at line 364 of file syntactic.cpp.

References copy(), N(), and set_frac_flag().

Referenced by GLUE_18().

00364                                              {
00365   vector<syntactic> w= copy (v);
00366   sort_leq<product_less_op> (w);
00367   bool old= set_frac_flag (true);
00368   syntactic r= 1;
00369   for (nat i=0; i<N(w); i++) r= r * w[i];
00370   (void) set_frac_flag (old);
00371   return r;
00372 }

syntactic ordered_sum ( const vector< syntactic > &  v  ) 

Definition at line 337 of file syntactic.cpp.

References copy(), migrate_negate(), and N().

Referenced by GLUE_17().

00337                                          {
00338   vector<syntactic> w= copy (v);
00339   sort_leq<sum_less_op> (w);
00340   syntactic r= 0;
00341   for (nat i=0; i<N(w); i++) r= r + w[i];
00342   return migrate_negate (r, 5);
00343 }

T mmx::outplace_set_as ( const F &  x  )  [inline]

Definition at line 715 of file type_props.hpp.

References set_as(), and T.

00715                              {
00716   T r;
00717   set_as (r, x);
00718   return r;
00719 }

string output_as_mmx ( const generic g  ) 

Definition at line 974 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<<().

00974                                  {
00975   if (math_mode) {
00976     string r;
00977     r << DATA_BEGIN << "scheme:";
00978     r << flatten_as_texmacs_scheme (g);
00979     r << DATA_END;
00980     return r;
00981   }
00982   else {
00983     generic f= as_generic (flatten (g));
00984     return as_mmx (f);
00985   }
00986 }

static void mmx::output_completion ( const string text,
const list< string > &  matches2 
) [static]

Definition at line 28 of file texmacs_interface.cpp.

References car(), cdr(), DATA_BEGIN, DATA_END, flush_now, is_nil(), mmout, and N().

Referenced by complete(), and handle_completion_request().

00028                                                                      {
00029   list<string> matches= matches2;
00030   mmout << DATA_BEGIN << "scheme:(tuple ";
00031   mmout << '\"' << text << '\"';
00032   while (!is_nil (matches)) {
00033     if (N (car (matches)) > 0)
00034       mmout << " \"" << car (matches) << '\"';
00035     matches = cdr (matches);
00036   }
00037   mmout << ')';
00038   mmout << DATA_END << flush_now;
00039 }

static port mmx::output_file_port ( FILE *  f,
bool  close_flag,
bool  lock,
const string name 
) [static]

Definition at line 116 of file file_port.cpp.

00116                                                                            {
00117   return (port_rep*) new file_port_rep (1, f, close_flag, lock, name);
00118 }

port output_file_port ( const string name  ) 

Definition at line 142 of file file_port.cpp.

References as_charp(), decode_name(), error_port(), and free_charp().

Referenced by GLUE_3(), and save().

00142                                       {
00143   string name_s= decode_name (name);
00144   char* temp= as_charp (name_s);
00145 #if defined(__MINGW__) || defined(__MINGW32__)
00146   FILE* f= _fsopen (temp, "w", _SH_DENYRW);
00147 #else
00148   FILE* f= fopen (temp, "w");
00149 #endif
00150   free_charp (temp);
00151   if (f == NULL) return error_port ("file '" * name * "' not writable");
00152   return output_file_port (f, true, true, name);
00153 }

observer mmx::output_observer ( dynamic_rep arg  ) 

Definition at line 85 of file dynamic.cpp.

Referenced by flatten().

00085                                    {
00086   return observer (new output_observer_rep (arg));
00087 }

port mmx::output_string_port ( string &  obj->lex_string  ) 

Definition at line 40 of file string_port.cpp.

00040                                {
00041   return (port_rep*) new output_string_port_rep (s);
00042 }

port mmx::output_string_port ( string &  s  ) 

Referenced by read_line().

static bool mmx::parse_blanks ( const string text,
nat &  obj->lex_pos 
) [static]

Definition at line 68 of file texmacs_interface.cpp.

References N().

Referenced by parse_completion_request().

00068                                             {
00069   nat beg= pos;
00070   while (pos < N(text) &&
00071          (text[pos] == ' ' || text[pos] == '\t' || text[pos] == '\n'))
00072     ++pos;
00073   return (pos > beg);
00074 }

static bool mmx::parse_char ( const string text,
char  c,
nat &  obj->lex_pos 
) [static]

Definition at line 61 of file texmacs_interface.cpp.

References N().

Referenced by parse_completion_request(), and parse_string().

00061                                                   {
00062   if ((pos >= N(text)) || (text[pos]!=c)) return false;
00063   ++pos;
00064   return true;
00065 }

static bool mmx::parse_completion_request ( const string text,
nat &  obj->lex_pos,
string obj->lex_string,
nat &  p 
) [static]

Definition at line 112 of file texmacs_interface.cpp.

References parse_blanks(), parse_char(), parse_identifier(), parse_nat(), and parse_string().

Referenced by handle_completion_request().

00112                                                                            {
00113   nat i=pos;
00114   if (!parse_char(text, '(', i)) return false;
00115   parse_blanks(text, i);
00116   if (!parse_identifier(text, "complete", i)) return false;
00117   parse_blanks(text, i);
00118   if (!parse_string(text, i, s)) return false;
00119   parse_blanks(text, i);
00120   if (!parse_nat(text, i, p)) return false;
00121   parse_blanks(text, i);
00122   if (!parse_char(text, ')', i)) return false;
00123   pos = i;
00124   return true;
00125 }

static bool mmx::parse_identifier ( const string text,
const string id,
nat &  obj->lex_pos 
) [static]

Definition at line 86 of file texmacs_interface.cpp.

References N().

Referenced by parse_completion_request().

00086                                                                   {
00087   nat beg = pos;
00088   for(nat j=0; j < N(id); pos++,j++)
00089     if ((pos >= N(text)) || (text[pos]!=id[j])) {
00090       pos = beg;
00091       return false;
00092     }
00093   return true;
00094 }

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(), s, start, unquote(), and vector_to_compound().

00019                                                                          {
00020   while (pos < N(s) && s[pos] == ' ') pos++;
00021   if (s[pos] == '(') {
00022     vector<generic> v;
00023     pos++;
00024     while (pos < N(s) && s[pos] != ')') {
00025       bool fun= (N(v) == 0);
00026       v << parse_lisp (s, pos, unquote_flag, fun);
00027       while (pos < N(s) && s[pos] == ' ') pos++;
00028     }
00029     if (pos < N(s)) pos++;
00030     return vector_to_compound (v);
00031   }
00032   else if (unquote_flag && !fun_flag && pos < N(s) && s[pos] == '\"') {
00033     nat start= pos;
00034     pos++;
00035     while (pos < N(s) && s[pos] != '\"')
00036       if (s[pos] == '\\') pos += 2;
00037       else pos++;
00038     if (pos < N(s)) pos++;
00039     return generic (unquote (s (start, pos)));
00040   }
00041   else {
00042     nat start= pos;
00043     while (pos < N(s) && s[pos] != ' ' && s[pos] != '(' && s[pos] != ')')
00044       pos++;
00045     return generic (s (start, pos));
00046   }
00047 }

generic parse_lisp ( const string s,
bool  unquote_flag = false 
)

Definition at line 50 of file lisp_parser.cpp.

References pos.

Referenced by flatten_as_tm(), GLUE_4(), and parse_lisp().

00050                                                 {
00051   nat pos= 0;
00052   return parse_lisp (s, pos, unquote_flag, false);
00053 }

static bool mmx::parse_nat ( const string text,
nat &  obj->lex_pos,
nat &  out 
) [static]

Definition at line 77 of file texmacs_interface.cpp.

References as_int(), and N().

Referenced by parse_completion_request().

00077                                                    {
00078   nat beg= pos;
00079   while (pos < N(text) && text[pos] >= '0' && text[pos] <= '9')
00080     ++pos;
00081   out= as_int (text (beg, pos));
00082   return (pos > beg);
00083 }

static bool mmx::parse_string ( const string text,
nat &  obj->lex_pos,
string out 
) [static]

Definition at line 97 of file texmacs_interface.cpp.

References N(), and parse_char().

Referenced by parse_completion_request().

00097                                                          {
00098   bool esc= false;
00099   nat i= pos;
00100   if (!parse_char(text, '\"', i)) return false;
00101   while ((i < N(text)) && (esc || text[i]!='\"')) {
00102     esc = (!esc) && (text[i]=='\\');
00103     ++i;
00104   }
00105   out = text(pos+1,i);
00106   if (!parse_char(text,'\"',i)) return false;
00107   pos = i;
00108   return true;
00109 }

static int mmx::passive_newline ( int  a,
int  b 
) [static]

Definition at line 283 of file terminal_interface.cpp.

References fed.

Referenced by shell_terminal_input().

00283                               {
00284   (void) a;
00285   (void) b;
00286   rl_crlf ();
00287   rl_on_new_line ();
00288   fed = false;
00289   rl_done = 1;
00290   return 0;
00291 }

string path_name ( const string file_path,
const string file_name 
)

Definition at line 375 of file system.cpp.

References _from_dos_to_unix(), canonical_name(), file_exists(), get_env(), init_system(), is_absolute_name(), load_path(), N(), n, path_sep, start, and var_pwd().

Referenced by connect_to_server(), dl_find(), and prefix_dir().

00375                                                              {
00376   //mmout << "path_name: file_path= " << file_path << lf;
00377   //mmout << "           file_name= " << file_name << lf;
00378   if (is_absolute_name (file_name)) {
00379     if (file_exists (file_name)) return canonical_name (file_name);
00380     else return "";
00381   }
00382   else {
00383     nat i, n= N(file_path), start= 0;
00384     for (i=0; i<=n; i++)
00385       if ((i==n) || (file_path[i] == path_sep)) {
00386         string ss= file_path (start, i);
00387         if ((N(ss) > 0) && (ss[0] == '$')) {
00388           init_system ();
00389           if (ss == "$MMX_LOAD_PATH") ss= load_path ();
00390           else if (ss == "$PWD") ss= var_pwd ();
00391           else ss= _from_dos_to_unix (get_env (ss (1, N(ss))));
00392           string r= path_name (ss, file_name);
00393           if (r != "") return r;
00394         }
00395         else {
00396           if (ss == "" || ss == ".") ss= var_pwd ();
00397           if (ss != "" && ss[N(ss)-1] != '/') ss= ss * "/";
00398           if (file_exists (ss * file_name))
00399             return canonical_name (ss * file_name);
00400         }
00401         start= i+1;
00402       }
00403     return "";
00404   }
00405 }

C mmx::pi_cst ( const format< C > &  fm  )  [inline]

Definition at line 924 of file type_props.hpp.

References C, promote(), and set_pi().

00924                              {
00925   C r= promote (0, fm); set_pi (r); return r; }

C mmx::pi_cst (  )  [inline]

Definition at line 894 of file type_props.hpp.

References C, and set_pi().

00894 { C r; set_pi (r); return r; }

port mmx::pipe_port ( nat  kind,
nat  fd,
nat  pid,
const string cmd,
const string role 
)

Definition at line 59 of file pipe_port.cpp.

00059                                                                              {
00060   return (port_rep*) new pipe_port_rep (kind, fd, pid, cmd, role);
00061 }

port pipe_port ( const string cmd  ) 

Definition at line 68 of file pipe_port.cpp.

References composite_port(), IN, lf, mmerr, OUT, STDERR, STDIN, STDOUT, and system().

Referenced by GLUE_6().

00068                               {
00069 #if defined(__MINGW__) || defined(__MINGW32__)
00070   mmerr << "pipe_port not implemented" << lf;
00071   exit (-1);
00072 #else
00073   int pp_in [2];  // for data going to the child
00074   int pp_out[2];  // for data coming from the child
00075   int pp_err[2];  // for error messages coming from the child
00076 
00077   int e1 = pipe (pp_in ); (void) e1;
00078   int e2 = pipe (pp_out); (void) e2;
00079   int e3 = pipe (pp_err); (void) e3;
00080   int pid= fork ();
00081 
00082   if (pid==0) { // the child
00083     setsid();
00084     close (pp_in  [OUT]);
00085     close (pp_out [IN ]);
00086     close (pp_err [IN ]);
00087     dup2  (pp_in  [IN ], STDIN );
00088     close (pp_in  [IN ]);
00089     dup2  (pp_out [OUT], STDOUT);
00090     close (pp_out [OUT]);
00091     dup2  (pp_err [OUT], STDERR);
00092     close (pp_err [OUT]);
00093 
00094     system (cmd);
00095     exit (127);
00096     // exit (system (cmd) != 0);
00097   }
00098 
00099   else { // the main process
00100     int in = pp_in  [OUT];
00101     close (pp_in [IN]);
00102     int out= pp_out [IN ];
00103     close (pp_out [OUT]);
00104     int err= pp_err [IN ];
00105     close (pp_err [OUT]);
00106 
00107     port pin = pipe_port (1, in , pid, cmd, "in" );
00108     port pout= pipe_port (2, out, pid, cmd, "out");
00109     port perr= pipe_port (2, err, pid, cmd, "err");
00110     return composite_port (vec<port> (pin, pout, perr),
00111                            vec<string> ("in", "out", "err"));
00112   }
00113 #endif
00114 }

syntactic polar ( const syntactic g1,
const syntactic g2 
)

Definition at line 457 of file syntactic.cpp.

References exp(), and Imaginary.

00457                                                            {
00458   return g1 * exp (g2 * Imaginary (syntactic)); }

generic polar ( const generic x1,
const generic x2 
)

Definition at line 742 of file generic.cpp.

References exp(), and Imaginary.

Referenced by polar_op::set_op().

00742                                                      {
00743   return x1 * exp (x2 * Imaginary (generic)); }

generic mmx::postfix ( const generic g,
const generic op 
) [inline]

Definition at line 135 of file mmx_printer.cpp.

References gen().

00135                                                              {
00136   return gen ("$postfix", g, op); }

vector<C,V> mmx::pow ( const int &  w,
const vector< C, V > &  v 
) [inline]

Definition at line 1195 of file vector.hpp.

01195                                                 {
01196   return binary_map_scalar<lpow_op> (v, w); }

vector<C,V> mmx::pow ( const vector< C, V > &  v,
const int &  w 
) [inline]

Definition at line 1193 of file vector.hpp.

01193                                                 {
01194   return binary_map_scalar<rpow_op> (v, w); }

vector<C,V> mmx::pow ( const C &  w,
const vector< C, V > &  v 
) [inline]

Definition at line 1191 of file vector.hpp.

01191                                               {
01192   return binary_map_scalar<lpow_op> (v, w); }

vector<C,V> mmx::pow ( const vector< C, V > &  v,
const C &  w 
) [inline]

Definition at line 1189 of file vector.hpp.

01189                                               {
01190   return binary_map_scalar<rpow_op> (v, w); }

vector<C,V> mmx::pow ( const vector< C, V > &  v,
const vector< C, V > &  w 
) [inline]

Definition at line 1187 of file vector.hpp.

01187                                                    {
01188   return binary_map<pow_op> (v, w); }

table<C,T,V> mmx::pow ( const int &  u,
const table< C, T, V > &  t 
) [inline]

Definition at line 712 of file table.hpp.

00712                                               {
00713   return binary_map_scalar<lpow_op> (t, u); }

table<C,T,V> mmx::pow ( const table< C, T, V > &  t,
const int &  u 
) [inline]

Definition at line 710 of file table.hpp.

00710                                               {
00711   return binary_map_scalar<rpow_op> (t, u); }

table<C,T,V> mmx::pow ( const table< C, T, V > &  t,
const table< C, T, V > &  u 
) [inline]

Definition at line 708 of file table.hpp.

00708                                                 {
00709   return binary_map<pow_op> (t, u); }

syntactic pow ( const int &  g1,
const syntactic g2 
)

Definition at line 311 of file syntactic.cpp.

References flatten(), and pow().

00311                                          {
00312   return pow (flatten (g1), g2);
00313 }

syntactic pow ( const syntactic g1,
const int &  g2 
)

Definition at line 306 of file syntactic.cpp.

References flatten(), and pow().

00306                                          {
00307   return pow (g1, flatten (g2));
00308 }

syntactic pow ( const syntactic g1,
const syntactic g2 
)

Definition at line 290 of file syntactic.cpp.

References abs(), exact_eq(), frac_flag, GEN_OVER, GEN_POWER, GEN_SQRT, pow(), signed_decompose(), and syn().

00290                                                {
00291   if (exact_eq (g1, 0)) return 0;
00292   if (exact_eq (g1, 1)) return 1;
00293   if (exact_eq (g2, 0)) return 1;
00294   if (exact_eq (g2, 1)) return g1;
00295   if (exact_eq (g2, syn (GEN_OVER, syntactic (1), syntactic (2))))
00296     return syn (GEN_SQRT, g1);
00297   if (frac_flag) {
00298     syntactic abs; int sgn;
00299     signed_decompose (g2, abs, sgn);
00300     if (sgn < 0) return syn (GEN_OVER, 1, pow (g1, abs));
00301   }
00302   return syn (GEN_POWER, g1, g2);
00303 }

new_table<C,T,V> mmx::pow ( const int &  u,
const new_table< C, T, V > &  t 
) [inline]

Definition at line 783 of file new_table.hpp.

00783                                               {
00784   return binary_map_scalar<lpow_op> (t, u); }

new_table<C,T,V> mmx::pow ( const new_table< C, T, V > &  t,
const int &  u 
) [inline]

Definition at line 781 of file new_table.hpp.

00781                                               {
00782   return binary_map_scalar<rpow_op> (t, u); }

new_table<C,T,V> mmx::pow ( const new_table< C, T, V > &  t,
const new_table< C, T, V > &  u 
) [inline]

Definition at line 779 of file new_table.hpp.

00779                                                 {
00780   return binary_map<pow_op> (t, u); }

generic pow ( const nat &  x1,
const generic x2 
)

Definition at line 545 of file generic.cpp.

References pow().

00545                                                {
00546   return pow (generic (x1), x2); }

generic pow ( const generic x1,
const nat &  x2 
)

Definition at line 543 of file generic.cpp.

References pow().

00543                                                {
00544   return pow (x1, generic (x2)); }

generic pow ( const int &  x1,
const generic x2 
)

Definition at line 541 of file generic.cpp.

References pow().

00541                                                {
00542   return pow (generic (x1), x2); }

generic pow ( const generic x1,
const int &  x2 
)

Definition at line 539 of file generic.cpp.

References pow().

00539                                                {
00540   return pow (x1, generic (x2)); }

generic pow ( const generic x1,
const generic x2 
)

Definition at line 534 of file generic.cpp.

References ACC_BINARY, ACC_POW, current_ev, and GEN_POWER.

00534                                            {
00535   ACC_BINARY (ACC_POW, x1, x2);
00536   return current_ev->apply (GEN_POWER, x1, x2);
00537 }

double pow ( const int &  x,
const double &  y 
) [inline]

Definition at line 66 of file double.hpp.

References pow().

00066                                                   {
00067   return std::pow ((double) x, y); }

double pow ( const double &  x,
const int &  y 
) [inline]

Definition at line 64 of file double.hpp.

References pow().

00064                                                   {
00065   return std::pow (x, (double) y); }

double pow ( const double &  x,
const double &  y 
) [inline]

Definition at line 62 of file double.hpp.

Referenced by apply(), GLUE_15(), lpow_op::op(), pow_op::op(), pow(), lpow_op::set_op(), pow_op::set_op(), and sympow().

00062                                                      {
00063   return std::pow (x, y); }

C mmx::powint ( const C &  i,
const int &  n 
) [inline]

Definition at line 549 of file defaults.hpp.

References binpow(), C, promote(), and square().

00549                                   {
00550   // FIXME: how to merge with pow?
00551   if (n < 0) return promote (1, i) / binpow (i, (nat) (-n));
00552   if (n <= 1) return n==0? promote (1, i): i;
00553   C j= square (binpow (i, (nat) (n >> 1)));
00554   if ((n&1) == 0) return j;
00555   else return i * j;
00556 }

xnat mmx::precision ( const vector< C, V > &  v  )  [inline]

Definition at line 1328 of file vector.hpp.

01328                                              {
01329   return big<min_precision_op> (v); }

xnat precision ( const generic x  ) 

Definition at line 764 of file generic.cpp.

References ASSERT, current_ev, and GEN_PRECISION.

00764                                   {
00765   generic r= current_ev->apply (GEN_PRECISION, x);
00766   ASSERT (is<int> (r), "Int return value expected");
00767   return as<int> (r); }

xnat mmx::precision ( const double &  x  )  [inline]

Definition at line 83 of file double.hpp.

Referenced by GLUE_43(), precision_op::op(), set_accuracy(), min_precision_op::set_op(), and precision_op::set_op().

00083 { (void) x; return 51; }

generic mmx::prefix ( const generic op,
const generic g 
) [inline]

Definition at line 137 of file mmx_printer.cpp.

References gen().

00137                                                             {
00138   return gen ("$prefix", op, g); }

string prefix_dir (  ) 

Definition at line 224 of file system.cpp.

References _from_dos_to_unix(), ASSERT, BASIX_PREFIX, command_dir(), eval_system(), file_exists(), get_directory(), get_env(), is_absolute_name(), and path_name().

Referenced by dl_find(), load_path(), and sysconf_dir().

00224               {
00225   string dir= get_env ("MMX_PREFIX_DIR");
00226 #if defined(__MINGW__) || defined(__MINGW32__)
00227   if (!file_exists (dir)) {
00228     try { dir= eval_system ("basix-config --prefix"); }
00229     catch (const exception&) {
00230       dir= get_directory (command_dir ());
00231       if (!is_absolute_name (dir))
00232         dir= get_directory (get_directory (path_name
00233                                            (_from_dos_to_unix (get_env ("PATH")), "mmx-light.exe")));
00234       ASSERT (is_absolute_name (dir), "Cannot determine installation prefix");
00235     }
00236   }
00237 #else
00238   if (dir == "") dir= string (BASIX_PREFIX);
00239   if (!file_exists (dir)) dir= eval_system ("basix-config --prefix");
00240 #endif
00241   return _from_dos_to_unix (dir);
00242 }

generic prime ( const generic x1  ) 

Definition at line 694 of file generic.cpp.

References current_ev.

00694                                   {
00695   return current_ev->apply ("'", x1); }

generic print_mmx ( const generic g  ) 
format<typename unary_return_type_helper<project_op, C >::RET > mmx::project ( const format< C > &  fm  )  [inline]

Definition at line 853 of file type_props.hpp.

References get_format(), get_sample(), and project().

00853 { return get_format (project (get_sample (fm)));}

unary_return_type_helper<project_op, C >::RET mmx::project ( const C &  x  )  [inline]

Definition at line 847 of file type_props.hpp.

00847 { return project_helper<C>::op (x); }

syntactic project ( const syntactic x,
const syntactic y 
)

Definition at line 513 of file syntactic.cpp.

References syn().

Referenced by project_helper< vector< C, V > >::op(), mv_project_op::op(), project(), and mv_project_op::set_op().

00513                                                            {
00514   return syn ("project", x, y); }

T mmx::promote ( const F &  x,
const format< T > &  fm 
) [inline]

Definition at line 729 of file type_props.hpp.

References get_sample(), and promote().

00729                                           {
00730   return promote (x, get_sample (fm));
00731 }

C mmx::promote ( R *  rep  )  [inline]

Definition at line 51 of file mmc_glue.hpp.

References C.

00051 { return C (rep); }

double mmx::promote ( const F &  x,
const double &   
) [inline]

Definition at line 53 of file defaults.hpp.

00053 { return as<double> (x); }

float mmx::promote ( const F &  x,
const float &   
) [inline]

Definition at line 51 of file defaults.hpp.

00051 { return as<float> (x); }

unsigned long long int mmx::promote ( const F &  x,
const unsigned long long int &   
) [inline]

Definition at line 48 of file defaults.hpp.

00048                                                     {
00049   return as<unsigned long long int> (x); }

long long int mmx::promote ( const F &  x,
const long long int &   
) [inline]

Definition at line 46 of file defaults.hpp.

00046 { return as<long long int> (x); }

unsigned long int mmx::promote ( const F &  x,
const unsigned long int &   
) [inline]

Definition at line 43 of file defaults.hpp.

00043                                                {
00044   return as<unsigned long int> (x); }

long int mmx::promote ( const F &  x,
const long int &   
) [inline]

Definition at line 41 of file defaults.hpp.

00041 { return as<long int> (x); }

unsigned int mmx::promote ( const F &  x,
const unsigned int &   
) [inline]

Definition at line 39 of file defaults.hpp.

00039 { return as<unsigned int> (x); }

int mmx::promote ( const F &  x,
const int &   
) [inline]

Definition at line 37 of file defaults.hpp.

00037 { return as<int> (x); }

unsigned char mmx::promote ( const F &  x,
const unsigned char &   
) [inline]

Definition at line 35 of file defaults.hpp.

00035 { return as<unsigned char> (x); }

signed char mmx::promote ( const F &  x,
const signed char &   
) [inline]

Definition at line 33 of file defaults.hpp.

00033 { return as<signed char> (x); }

char mmx::promote ( const F &  x,
const char &   
) [inline]

Definition at line 31 of file defaults.hpp.

00031 { return as<char> (x); }

bool mmx::promote ( const F &  x,
const bool &   
) [inline]

Definition at line 29 of file defaults.hpp.

00029 { return as<bool> (x); }

T promote ( const F &  x,
const T &  y 
) [inline]
scalar_type_helper< T >::val mmx::promote_scalar ( const F &  x,
const T &  y 
) [inline]

Definition at line 562 of file type_props.hpp.

References T.

Referenced by zero_scalar().

00562                                         {
00563   return promote_scalar_helper<typename format<T>::FT,F,T>::op (x, y);
00564 }

C pull ( heap< C > &  h  )  [inline]

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().

00191                              {
00192   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().

00189                                             {
00190   h.secure(); h.rep->Push (x); }

routine mmx::quaternary_routine ( const generic name,
D(*)(const S1 &, const S2 &, const S3 &, const S4 &)  f 
) [inline]

Definition at line 368 of file routine.hpp.

Referenced by define().

00369                                                                         {
00370   return new quaternary_routine_rep<D,S1,S2,S3,S4> (name, f);
00371 }

routine mmx::quintary_routine ( const generic name,
D(*)(const S1 &, const S2 &, const S3 &, const S4 &, const S5 &)  f 
) [inline]

Definition at line 429 of file routine.hpp.

Referenced by define().

00431                                                  {
00432   return new quintary_routine_rep<D,S1,S2,S3,S4,S5> (name, f);
00433 }

vector<C,V> mmx::quo ( const vector< C, V > &  v,
const C &  c 
) [inline]

Definition at line 1102 of file vector.hpp.

01102                                               {
01103   return binary_map_scalar<rquo_op> (v, c); }

vector<C,V> mmx::quo ( const vector< C, V > &  v,
const vector< C, V > &  w 
) [inline]

Definition at line 1078 of file vector.hpp.

01078                                                    {
01079   return binary_map<quo_op> (v, w); }

table<C,T,V> mmx::quo ( const table< C, T, V > &  t,
const K &  sc 
) [inline]

Definition at line 656 of file table.hpp.

00656                                   {
00657   return binary_map_scalar<rquo_op> (t, sc); }

table<C,T,V> mmx::quo ( const table< C, T, V > &  t,
const table< C, T, V > &  u 
) [inline]

Definition at line 631 of file table.hpp.

00631                                                        {
00632   return binary_map<quo_op,C,T,V> (t, u); }

new_table<C,T,V> mmx::quo ( const new_table< C, T, V > &  t,
const K &  sc 
) [inline]

Definition at line 727 of file new_table.hpp.

00727                                   {
00728   return binary_map_scalar<rquo_op> (t, sc); }

new_table<C,T,V> mmx::quo ( const new_table< C, T, V > &  t,
const new_table< C, T, V > &  u 
) [inline]

Definition at line 702 of file new_table.hpp.

00702                                                        {
00703   return binary_map<quo_op,C,T,V> (t, u); }

unsigned long long int mmx::quo ( const unsigned long long int &  n,
const unsigned long long int &  m 
) [inline]

Definition at line 574 of file int.hpp.

00581 {

unsigned long int mmx::quo ( const unsigned long int &  n,
const unsigned long int &  m 
) [inline]

Definition at line 573 of file int.hpp.

00581 {

unsigned int mmx::quo ( const unsigned int &  n,
const unsigned int &  m 
) [inline]

Definition at line 572 of file int.hpp.

00581 {

unsigned short int mmx::quo ( const unsigned short int &  n,
const unsigned short int &  m 
) [inline]

Definition at line 571 of file int.hpp.

00581 {

unsigned char mmx::quo ( const unsigned char &  n,
const unsigned char &  m 
) [inline]

Definition at line 570 of file int.hpp.

00581 {

long long int mmx::quo ( const long long int &  n,
const long long int &  m 
) [inline]

Definition at line 561 of file int.hpp.

00565 { return (m % n) == 0; } \

long int mmx::quo ( const long int &  n,
const long int &  m 
) [inline]

Definition at line 560 of file int.hpp.

00565 { return (m % n) == 0; } \

int mmx::quo ( const int &  n,
const int &  m 
) [inline]

Definition at line 559 of file int.hpp.

00565 { return (m % n) == 0; } \

short int mmx::quo ( const short int &  n,
const short int &  m 
) [inline]

Definition at line 558 of file int.hpp.

00565 { return (m % n) == 0; } \

signed char mmx::quo ( const signed char &  n,
const signed char &  m 
) [inline]

Definition at line 557 of file int.hpp.

00565 { return (m % n) == 0; } \

generic quo ( const generic x1,
const generic x2 
)

Definition at line 709 of file generic.cpp.

References current_ev, and GEN_DIV.

00709                                                    {
00710   return current_ev->apply (GEN_DIV, x1, x2); }

C mmx::quo ( const C &  x,
const D &  y 
) [inline]

Definition at line 270 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().

00270                              { // NOTE: by default we divide on the right
00271   if (y == promote (0, y)) return promote (0, x); else return x/y; }

string mmx::quote ( const string obj->lex_string  ) 

Definition at line 530 of file string.cpp.

References escape().

00530                         {
00531   return "\"" * escape (s) * "\"";
00532 }

string mmx::quote ( const string &  s  ) 
vector<typename unary_return_type_helper<radius_op, C >::RET,V> mmx::radius ( const vector< C, V > &  v  )  [inline]

Definition at line 1347 of file vector.hpp.

01347                                             {
01348   return unary_map<radius_op> (v); }

unary_return_type_helper<abs_op, C >::RET mmx::radius ( const C &  x  )  [inline]

Definition at line 1093 of file type_props.hpp.

01093 { return 0; }

syntactic radius ( const syntactic g1  ) 

Definition at line 461 of file syntactic.cpp.

References GEN_RADIUS, and syn().

00461 { return syn (GEN_RADIUS, g1); }

generic radius ( const generic x1  ) 

Definition at line 823 of file generic.cpp.

References current_ev.

Referenced by radius_op::Radius_type(), and radius_op::set_op().

00823                                    {
00824   return current_ev->apply ("radius", x1); }

vector<C,V> mmx::range ( const vector< C, V > &  v,
nat  start,
nat  end 
) [inline]

Definition at line 578 of file vector.hpp.

References C, CF(), copy(), is_a_scalar(), n, seg(), Vector, and VERIFY.

00578                                             {
00579   typedef implementation<vector_linear,V> Vec;
00580   VERIFY(end >= start, "bad range");
00581   nat n= end - start;
00582   if (is_a_scalar (v)) return Vector (v.scalar(), n);
00583   nat l= aligned_size<C,V> (n);
00584   C* a= mmx_formatted_new<C> (l, CF(v));
00585   Vec::copy (a, seg (v) + start, n);
00586   return Vector (a, n, l, CF(v));
00587 }

list<C> mmx::range ( const list< C > &  l,
nat  start,
nat  end 
) [inline]

Return a copy of the sublist of l from positions start to end.

Definition at line 306 of file list.hpp.

References ASSERT, car(), cdr(), cons(), is_nil(), List, and range().

00306                                           {
00307   if (start >= end) return List ();
00308   ASSERT (!is_nil (l), "non-empty list expected");
00309   if (start > 0) return range (cdr (l), start-1, end-1);
00310   return cons (car (l), range (cdr (l), 0, end-1));
00311 }

generic range ( const generic g,
nat  start,
nat  end 
)

Definition at line 24 of file generic_utils.cpp.

References compound_to_vector(), range(), and vector_to_compound().

00024                                              {
00025   return vector_to_compound (range (compound_to_vector (g), start, end));
00026 }

chain<C> mmx::range ( const chain< C > &  c,
nat  start,
nat  end 
) [inline]

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(), store_interactive_number(), and vector_range().

00335                                            {
00336   if (start >= end) return Chain ();
00337   ASSERT (!is_nil (c), "non-empty chain expected");
00338   nat n= N (left (c));
00339   if (end <= n) return range (left (c), start, end);
00340   if (start > n) return range (right (c), start-n-1, end-n-1);
00341   Chain l= range (left (c), start, n);
00342   C     m= middle (c);
00343   Chain r= range (right (c), 0, end-n-1);
00344   if (N(l) < 2*(N(r) + 1) && N(r) < 2*(N(l) + 1)) return Chain (l, m, r);
00345   return l * Chain (m) * r;
00346 }

iterator<C> mmx::range_iterator ( const C &  start,
const C &  end,
const C &  step = outplace_set_as<C> (1),
bool  strict = true 
) [inline]

Definition at line 352 of file iterator.hpp.

References Iterator.

Referenced by downwards_range(), iterator_downwards_range(), iterator_natural_range(), iterator_strict_range(), natural_range(), and strict_range().

00354 {
00355   return Iterator (new range_iterator_rep<C> (start, end, step, strict));
00356 }

void mmx::raw_read ( M &  m,
const char *  p,
nat  n 
) [inline]

Definition at line 1001 of file type_props.hpp.

References busy(), and VERIFY.

Referenced by raw_read_length().

01001                                       {
01002   for (nat i=0; i<n; i++) {
01003     VERIFY (busy (m), "read failed");
01004     m >> p[i];
01005   }
01006 }

void mmx::raw_read_length ( M &  m,
nat &  l 
) [inline]

Definition at line 1018 of file type_props.hpp.

References raw_read().

01018                                {
01019   char c;
01020   m >> c;
01021   if (c != ((char) 255)) l= (nat) ((uchar) c);
01022   else raw_read (m, (char*) ((void)* (&l)), sizeof (nat));
01023 }

void mmx::raw_write ( M &  m,
const char *  p,
nat  n 
) [inline]

Definition at line 996 of file type_props.hpp.

Referenced by raw_write_length().

00996                                        {
00997   for (nat i=0; i<n; i++) m << p[i];
00998 }

void mmx::raw_write_length ( M &  m,
nat  l 
) [inline]

Definition at line 1009 of file type_props.hpp.

References raw_write().

01009                                {
01010   if (l < (nat) 255) m << ((char) l);
01011   else {
01012     m << ((char) 255);
01013     raw_write (m, (const char*) ((const void*) (&l)), sizeof (nat));
01014   }
01015 }

vector<typename unary_return_type_helper<Re_op, C >::RET,V> mmx::Re ( const vector< C, V > &  v  )  [inline]

Definition at line 1341 of file vector.hpp.

01341 { return unary_map<Re_op> (v); }

syntactic Re ( const syntactic g1  ) 

Definition at line 450 of file syntactic.cpp.

References GEN_RE, and syn().

00450 { return syn (GEN_RE, g1); }

generic Re ( const generic x1  ) 

Definition at line 734 of file generic.cpp.

References current_ev, and GEN_RE.

00734                                {
00735   return current_ev->apply (GEN_RE, x1); }

C mmx::Re ( const C &  x  )  [inline]

Definition at line 716 of file defaults.hpp.

Referenced by Re_op::op(), Re_op::Real_type(), and Re_op::set_op().

00716 { return x; }

const C& mmx::read ( const vector< C, V > &  v,
nat  i 
) [inline]

Definition at line 214 of file vector.hpp.

00214 { return v[i]; }

const C& mmx::read ( const table< C, T, V > &  t,
const T &  x 
) [inline]

Definition at line 176 of file table.hpp.

00176                                                        {
00177   return t[x]; }

const C& mmx::read ( const table< C, T, V > &  t,
const K &  x 
) [inline]

Definition at line 165 of file table.hpp.

00165                                                         {
00166   return t[as<T> (x)]; }

string mmx::read ( const storage st,
const string var 
) [inline]

Set variable var to val on storage st.

Definition at line 69 of file storage.hpp.

00069                                                           {
00070   return st->read (var); }

string mmx::read ( const port &  p,
nat  n 
) [inline]

Definition at line 113 of file port.hpp.

References inside().

00113                                           {
00114   string r (n); inside (p)->read (inside (r, 0), n); return r; }

void mmx::read ( const port &  p,
char *  s,
nat  n 
) [inline]

Definition at line 111 of file port.hpp.

References inside().

00111                                                  {
00112   inside (p)->read (s, n); }

const C& mmx::read ( const new_table< C, T, V > &  t,
const T &  x 
) [inline]

Definition at line 198 of file new_table.hpp.

00198                                                        {
00199   return t[x]; }

const C& mmx::read ( const new_table< C, T, V > &  t,
const K &  x 
) [inline]

Definition at line 187 of file new_table.hpp.

00187                                                         {
00188   return t[as<T> (x)]; }

const C& mmx::read ( const list< C > &  l,
nat  i 
) [inline]

The same as l[i].

Definition at line 157 of file list.hpp.

00157 { return l[i]; }

C mmx::read ( const cache< C, T > &  c,
const T &  x 
) [inline]
const C& mmx::read_car ( const list< C > &  l  )  [inline]
const list<C>& mmx::read_cdr ( const list< C > &  l  )  [inline]
const C & read_I ( const table< C, T, V > &  t  )  [inline]

Definition at line 221 of file table.hpp.

00221                         {
00222   t->lazy_initialize ();
00223   return *t->init;
00224 }

const C & read_I ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 238 of file new_table.hpp.

Referenced by unary_set().

00238                         {
00239   t->lazy_initialize ();
00240   return *t->init;
00241 }

static bool mmx::read_line ( string  prompt,
string sline 
) [static]

Definition at line 72 of file terminal_interface.cpp.

References as_charp(), blue_foreground, bold, charcode_as_string(), cyan_foreground, flush_now, formatting_port(), free_charp(), line, mmout, output_string_port(), and reset_attributes.

Referenced by shell_terminal_input().

00072                                          {
00073   char* line;
00074   string buf = "";
00075   port p = formatting_port (output_string_port (buf));
00076   p << charcode_as_string (RL_PROMPT_START_IGNORE)
00077     << bold << blue_foreground
00078     << charcode_as_string (RL_PROMPT_END_IGNORE)
00079     << prompt
00080     << charcode_as_string (RL_PROMPT_START_IGNORE)
00081     << reset_attributes
00082     << cyan_foreground
00083     << charcode_as_string (RL_PROMPT_END_IGNORE);
00084   char* _prompt = as_charp (buf);
00085   line = readline (_prompt);
00086   free_charp (_prompt);
00087   mmout << reset_attributes << flush_now;
00088   if (line == NULL) {
00089     sline = "";
00090     return false;
00091   }
00092   sline = string(line);
00093   free (line);
00094   return true;
00095 }

const C& mmx::read_only ( const C &  c  )  [inline]

Definition at line 762 of file defaults.hpp.

Referenced by list< cleaner >::operator[]().

00762                        {
00763   return c;
00764 }

static bool mmx::reads ( const string obj->lex_string,
nat(obj->lex_pos)  ,
const string what 
) [static]

Definition at line 548 of file string.cpp.

References N().

Referenced by replace(), search_backwards(), and search_forwards().

00548                                                      {
00549   nat i, n= N(s), l= N(what);
00550   for (i=0; pos+i<n && i<l; i++)
00551     if (s[pos+i] != what[i]) return false;
00552   return i == l;
00553 }

static generic mmx::rebuild ( const vector< generic > &  v  )  [static]

Definition at line 20 of file glue_vector_map.cpp.

References apply(), eval(), is_a_scalar(), and vector< C, V >::scalar().

00020                                    {
00021   if (is_a_scalar (v)) {
00022     generic make_vector= eval ("scalar_vector");
00023     return as<routine> (make_vector) -> apply (vec<generic> (v.scalar()));
00024   }
00025   else {
00026     generic make_vector= eval ("vector");
00027     return as<routine> (make_vector) -> apply (v);
00028   }
00029 }

static generic mmx::rebuild ( const list< generic > &  l  )  [static]

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().

00030                                  {
00031   generic make_list= eval ("list");
00032   return as<routine> (make_list) -> apply (as_vector<generic> (l));
00033 }

string recompose ( const vector< string > &  v,
const string sep,
bool  last = true 
)

Reconstruct string from pieces in using as a separator.

Definition at line 609 of file string.cpp.

References N().

Referenced by add_indentation(), get_file_source(), get_interactive_source(), shell_terminal_input(), and shell_texmacs_input().

00609                                                                   {
00610   string s;
00611   for (nat i=0; i<N(v); i++) {
00612     s << v[i];
00613     if (i+1 < N(v) || last) s << sep;
00614   }
00615   return s;
00616 }

vector<typename unary_return_type_helper<reconstruct_op, C >::RET> mmx::reconstruct ( const vector< C, V > &  v  )  [inline]

Definition at line 1271 of file vector.hpp.

01271                                                         {
01272   return as<Reconstructed_vector> (unary_map<reconstruct_op> (v)); }

bool mmx::reconstruct ( signed_of_helper< unsigned long long int >::type &  n,
signed_of_helper< unsigned long long int >::type &  d,
const unsigned long long int &  u,
const unsigned long long int &  m 
) [inline]

Definition at line 805 of file int.hpp.

00814 {

bool mmx::reconstruct ( signed_of_helper< unsigned long long int >::type &  n,
signed_of_helper< unsigned long long int >::type &  d,
const unsigned long long int &  u,
const unsigned long long int &  m,
const unsigned long long int &  N,
const unsigned long long int &  D 
) [inline]

Definition at line 805 of file int.hpp.

00814 {

bool mmx::reconstruct ( signed_of_helper< unsigned long int >::type &  n,
signed_of_helper< unsigned long int >::type &  d,
const unsigned long int &  u,
const unsigned long int &  m 
) [inline]

Definition at line 804 of file int.hpp.

00814 {

bool mmx::reconstruct ( signed_of_helper< unsigned long int >::type &  n,
signed_of_helper< unsigned long int >::type &  d,
const unsigned long int &  u,
const unsigned long int &  m,
const unsigned long int &  N,
const unsigned long int &  D 
) [inline]

Definition at line 804 of file int.hpp.

00814 {

bool mmx::reconstruct ( signed_of_helper< unsigned int >::type &  n,
signed_of_helper< unsigned int >::type &  d,
const unsigned int &  u,
const unsigned int &  m 
) [inline]

Definition at line 803 of file int.hpp.

00814 {

bool mmx::reconstruct ( signed_of_helper< unsigned int >::type &  n,
signed_of_helper< unsigned int >::type &  d,
const unsigned int &  u,
const unsigned int &  m,
const unsigned int &  N,
const unsigned int &  D 
) [inline]

Definition at line 803 of file int.hpp.

00814 {

bool mmx::reconstruct ( signed_of_helper< unsigned short int >::type &  n,
signed_of_helper< unsigned short int >::type &  d,
const unsigned short int &  u,
const unsigned short int &  m 
) [inline]

Definition at line 802 of file int.hpp.

00814 {

bool mmx::reconstruct ( signed_of_helper< unsigned short int >::type &  n,
signed_of_helper< unsigned short int >::type &  d,
const unsigned short int &  u,
const unsigned short int &  m,
const unsigned short int &  N,
const unsigned short int &  D 
) [inline]

Definition at line 802 of file int.hpp.

00814 {

bool mmx::reconstruct ( signed_of_helper< unsigned char >::type &  n,
signed_of_helper< unsigned char >::type &  d,
const unsigned char &  u,
const unsigned char &  m 
) [inline]

Definition at line 801 of file int.hpp.

00814 {

bool mmx::reconstruct ( signed_of_helper< unsigned char >::type &  n,
signed_of_helper< unsigned char >::type &  d,
const unsigned char &  u,
const unsigned char &  m,
const unsigned char &  N,
const unsigned char &  D 
) [inline]

Definition at line 801 of file int.hpp.

00814 {

bool mmx::reconstruct ( signed long long int &  n,
signed long long int &  d,
const signed long long int &  u,
const signed long long int &  m 
) [inline]

Definition at line 754 of file int.hpp.

bool mmx::reconstruct ( signed long long int &  n,
signed long long int &  d,
const signed long long int &  u,
const signed long long int &  m,
const signed long long int &  N,
const signed long long int &  D 
) [inline]

Definition at line 754 of file int.hpp.

bool mmx::reconstruct ( signed long int &  n,
signed long int &  d,
const signed long int &  u,
const signed long int &  m 
) [inline]

Definition at line 753 of file int.hpp.

bool mmx::reconstruct ( signed long int &  n,
signed long int &  d,
const signed long int &  u,
const signed long int &  m,
const signed long int &  N,
const signed long int &  D 
) [inline]

Definition at line 753 of file int.hpp.

bool mmx::reconstruct ( signed int &  n,
signed int &  d,
const signed int &  u,
const signed int &  m 
) [inline]

Definition at line 752 of file int.hpp.

bool mmx::reconstruct ( signed int &  n,
signed int &  d,
const signed int &  u,
const signed int &  m,
const signed int &  N,
const signed int &  D 
) [inline]

Definition at line 752 of file int.hpp.

bool mmx::reconstruct ( signed short int &  n,
signed short int &  d,
const signed short int &  u,
const signed short int &  m 
) [inline]

Definition at line 751 of file int.hpp.

bool mmx::reconstruct ( signed short int &  n,
signed short int &  d,
const signed short int &  u,
const signed short int &  m,
const signed short int &  N,
const signed short int &  D 
) [inline]

Definition at line 751 of file int.hpp.

bool mmx::reconstruct ( signed char &  n,
signed char &  d,
const signed char &  u,
const signed char &  m 
) [inline]

Definition at line 750 of file int.hpp.

bool mmx::reconstruct ( signed char &  n,
signed char &  d,
const signed char &  u,
const signed char &  m,
const signed char &  N,
const signed char &  D 
) [inline]

Definition at line 750 of file int.hpp.

Referenced by reconstruct_op::Reconstruct_type(), and reconstruct_op::set_op().

static string mmx::recursive_search_name ( const string dir,
const string name,
bool  is_dir 
) [static]

Definition at line 606 of file system.cpp.

References canonical_name(), file_exists(), file_is_directory(), file_is_file(), get_directory(), load_directory(), N(), starts(), and strip_directory().

Referenced by semi_recursive_search_name().

00606                                                                            {
00607   //mmout << "Recursive search " << dir << ", " << name << "\n";
00608   if (!file_exists (dir) || !file_is_directory (dir)) return "";
00609   if (get_directory (name) != ".") {
00610     string fdir = get_directory (name);
00611     string fname= strip_directory (name);
00612     string sdir = recursive_search_name (dir, fdir, true);
00613     if (sdir == "") return "";
00614     return recursive_search_name (sdir, fname, is_dir);
00615   }
00616   string fname= canonical_name (dir * "/" * name);
00617   if (file_exists (fname)) {
00618     if (is_dir && file_is_directory (fname)) return fname;
00619     if (!is_dir && file_is_file (fname)) return fname;
00620   }
00621   if (file_exists (dir * "/mmx") && file_is_directory (dir * "/mmx")) {
00622     string fdir= canonical_name (dir * "/mmx");
00623     string sname= recursive_search_name (fdir, name, is_dir);
00624     if (sname != "") return sname;
00625   }
00626   vector<string> v;
00627   if (load_directory (dir, v)) return "";
00628   for (nat i=0; i<N(v); i++)
00629     if (!starts (v[i], ".") && v[i] != "mmx") {
00630       string fdir= canonical_name (dir * "/" * v[i]);
00631       if (file_is_directory (fdir)) {
00632         string sname= recursive_search_name (fdir, name, is_dir);
00633         if (sname != "") return sname;
00634       }
00635     }
00636   return "";
00637 }

void mmx::register_glue ( const string s,
void(*)()  f 
)

Definition at line 113 of file glue.cpp.

References glue_table, and inside_set().

00113                                                    {
00114   inside_set (glue_table (), s, f);
00115 }

void mmx::register_glue ( const string ,
void(*)(void)   
)
string relative_name ( const string base,
const string name 
)

Definition at line 472 of file system.cpp.

References canonical_name(), is_absolute_name(), and N().

Referenced by mmc_load_directory(), and resolve_name().

00472                                                        {
00473   //mmout << "relative_name: " << base << lf;
00474   string file_name= name;
00475   if (base != "" && !is_absolute_name (file_name)) {
00476     int i;
00477     for (i= N(base)-1; i>=0; i--)
00478       if (base[i] == '/') break;
00479     file_name= base (0, i+1) * file_name;
00480   }
00481   return canonical_name (file_name);
00482 }

static void mmx::release_lock ( FILE *  f  )  [static]

Definition at line 48 of file file_port.cpp.

Referenced by file_port_rep::~file_port_rep().

00048                        {
00049 #if !(defined(__MINGW__) || defined(__MINGW32__))
00050   struct flock fl;
00051   int fd= fileno (f);
00052   fl.l_type   = F_UNLCK;
00053   fl.l_whence = SEEK_SET;
00054   fl.l_start  = 0;
00055   fl.l_len    = 0;
00056   fl.l_pid    = getpid ();
00057   fcntl (fd, F_SETLK, &fl);
00058   //mmout << "Unlocked " << fd << lf;
00059 #endif
00060 }

vector<C,V> mmx::rem ( const vector< C, V > &  v,
const C &  c 
) [inline]

Definition at line 1104 of file vector.hpp.

01104                                               {
01105   return binary_map_scalar<rrem_op> (v, c); }

vector<C,V> mmx::rem ( const vector< C, V > &  v,
const vector< C, V > &  w 
) [inline]

Definition at line 1080 of file vector.hpp.

01080                                                    {
01081   return binary_map<rem_op> (v, w); }

table<C,T,V> mmx::rem ( const table< C, T, V > &  t,
const K &  sc 
) [inline]

Definition at line 659 of file table.hpp.

00659                                   {
00660   return binary_map_scalar<rrem_op> (t, sc); }

table<C,T,V> mmx::rem ( const table< C, T, V > &  t,
const table< C, T, V > &  u 
) [inline]

Definition at line 633 of file table.hpp.

00633                                                        {
00634   return binary_map<rem_op,C,T,V> (t, u); }

new_table<C,T,V> mmx::rem ( const new_table< C, T, V > &  t,
const K &  sc 
) [inline]

Definition at line 730 of file new_table.hpp.

00730                                   {
00731   return binary_map_scalar<rrem_op> (t, sc); }

new_table<C,T,V> mmx::rem ( const new_table< C, T, V > &  t,
const new_table< C, T, V > &  u 
) [inline]

Definition at line 704 of file new_table.hpp.

00704                                                        {
00705   return binary_map<rem_op,C,T,V> (t, u); }

unsigned long long int mmx::rem ( const unsigned long long int &  n,
const unsigned long long int &  m,
unsigned long long int &  q 
) [inline]

Definition at line 574 of file int.hpp.

00581 {

unsigned long long int mmx::rem ( const unsigned long long int &  n,
const unsigned long long int &  m 
) [inline]

Definition at line 574 of file int.hpp.

00581 {

unsigned long int mmx::rem ( const unsigned long int &  n,
const unsigned long int &  m,
unsigned long int &  q 
) [inline]

Definition at line 573 of file int.hpp.

00581 {

unsigned long int mmx::rem ( const unsigned long int &  n,
const unsigned long int &  m 
) [inline]

Definition at line 573 of file int.hpp.

00581 {

unsigned int mmx::rem ( const unsigned int &  n,
const unsigned int &  m,
unsigned int &  q 
) [inline]

Definition at line 572 of file int.hpp.

00581 {

unsigned int mmx::rem ( const unsigned int &  n,
const unsigned int &  m 
) [inline]

Definition at line 572 of file int.hpp.

00581 {

unsigned short int mmx::rem ( const unsigned short int &  n,
const unsigned short int &  m,
unsigned short int &  q 
) [inline]

Definition at line 571 of file int.hpp.

00581 {

unsigned short int mmx::rem ( const unsigned short int &  n,
const unsigned short int &  m 
) [inline]

Definition at line 571 of file int.hpp.

00581 {

unsigned char mmx::rem ( const unsigned char &  n,
const unsigned char &  m,
unsigned char &  q 
) [inline]

Definition at line 570 of file int.hpp.

00581 {

unsigned char mmx::rem ( const unsigned char &  n,
const unsigned char &  m 
) [inline]

Definition at line 570 of file int.hpp.

00581 {

long long int mmx::rem ( const long long int &  n,
const long long int &  m 
) [inline]

Definition at line 561 of file int.hpp.

00565 { return (m % n) == 0; } \

long long int mmx::rem ( const long long int &  n,
const long long int &  m,
long long int &  q 
) [inline]

Definition at line 561 of file int.hpp.

00565 { return (m % n) == 0; } \

long int mmx::rem ( const long int &  n,
const long int &  m 
) [inline]

Definition at line 560 of file int.hpp.

00565 { return (m % n) == 0; } \

long int mmx::rem ( const long int &  n,
const long int &  m,
long int &  q 
) [inline]

Definition at line 560 of file int.hpp.

00565 { return (m % n) == 0; } \

int mmx::rem ( const int &  n,
const int &  m 
) [inline]

Definition at line 559 of file int.hpp.

00565 { return (m % n) == 0; } \

int mmx::rem ( const int &  n,
const int &  m,
int &  q 
) [inline]

Definition at line 559 of file int.hpp.

00565 { return (m % n) == 0; } \

short int mmx::rem ( const short int &  n,
const short int &  m 
) [inline]

Definition at line 558 of file int.hpp.

00565 { return (m % n) == 0; } \

short int mmx::rem ( const short int &  n,
const short int &  m,
short int &  q 
) [inline]

Definition at line 558 of file int.hpp.

00565 { return (m % n) == 0; } \

signed char mmx::rem ( const signed char &  n,
const signed char &  m 
) [inline]

Definition at line 557 of file int.hpp.

00565 { return (m % n) == 0; } \

signed char mmx::rem ( const signed char &  n,
const signed char &  m,
signed char &  q 
) [inline]

Definition at line 557 of file int.hpp.

00565 { return (m % n) == 0; } \

generic rem ( const generic x1,
const generic x2 
)

Definition at line 711 of file generic.cpp.

References current_ev, and GEN_MOD.

00711                                                    {
00712   return current_ev->apply (GEN_MOD, x1, x2); }

C mmx::rem ( const C &  x,
const D &  y 
) [inline]

Definition at line 273 of file defaults.hpp.

References promote().

Referenced by GLUE_12(), rrem_op::op(), rem_op::op(), unsigned_int_reconstruct_helper< U >::reconstruct(), int_reconstruct_helper< I >::reconstruct(), rrem_op::set_op(), rem_op::set_op(), and skew_rem().

00273                              { // NOTE: by default we divide on the right
00274   if (y == promote (0, y)) return x; else return promote (0, x); }

vector<C,V> mmx::remove ( const vector< C, V > &  v,
vector< nat >  e 
) [inline]

Definition at line 608 of file vector.hpp.

References N(), n, and Vector.

Referenced by var_rm().

00608                                         {
00609   nat n= N(v);
00610   vector<nat> f ((nat) 0, n);
00611   for (nat i= 0; i < n; i++) f[i]= i;
00612   for (nat i= 0; i < N(e); i++) if (e[i] < n) f[e[i]]= n;
00613   Vector r;
00614   for (nat i= 0; i < n; i++) {
00615     if (f[i] == n) continue;
00616     r << v[i];
00617   }
00618   return r;
00619 }

string repeated ( const string obj->lex_string,
nat(obj->lex_length)   
)

Definition at line 623 of file string.cpp.

Referenced by add_indentation(), and source_string_unindented().

00623                                   {
00624   string r;
00625   for (nat i=0; i<n; i++) r << s;
00626   return r;
00627 }

string mmx::replace ( const string obj->lex_string,
const string what,
const string by 
)

Definition at line 556 of file string.cpp.

References N(), and reads().

00556                                                                 {
00557   nat i, n= N(s);
00558   string r;
00559   for (i=0; i<n; )
00560     if (reads (s, i, what)) { r << by; i += N(what); }
00561     else r << s[i++];
00562   return r;
00563 }

string mmx::replace ( const string &  s,
const string &  what,
const string &  by 
)

Replace all the occurences of what by in s.

Referenced by GLUE_13().

generic mmx::replace_lf ( const generic g  ) 

Definition at line 360 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().

00360                               {
00361   if (is<literal> (g)) return g;
00362   else if (is_func (g, "$concat")) {
00363     bool block= false;
00364     vector<generic> d;
00365     vector<generic> c;
00366     for (nat i=1; i<N(g); i++) {
00367       if (is_func (g[i], "$lf", 0)) {
00368         if (N(c) == 0) d << generic ("");
00369         else if (N(c) == 1) d << c;
00370         else if (N(c) > 1) d << gen ("$concat", c);
00371         c= vector<generic> ();
00372       }
00373       else if (is_func (g[i], "$cr", 0)) block= true;
00374       else c << replace_lf (g[i]);
00375     }
00376     if (N(c) == 1) d << c;
00377     else if (N(c) != 0) d << gen ("$concat", c);
00378     if (N(d) != 1 || block) return gen ("$document", d);
00379     return d[0];
00380   }
00381   else if (is<compound> (g)) {
00382     vector<generic> v;
00383     for (nat i=1; i<N(g); i++)
00384       v << replace_lf (g[i]);
00385     return gen (g[0], v);
00386   }
00387   else {
00388     mmout << "g= " << g << ": " << type_name (g) << "\n";
00389     ERROR ("TeXmacs document expected");
00390   }
00391 }

void mmx::reset ( table< C, T, V > &  t,
const T &  x 
) [inline]

Definition at line 178 of file table.hpp.

References inside(), and reset().

00178                                               {
00179   t.secure(); inside (t) -> reset (x); }

void mmx::reset ( table< C, T, V > &  t,
const K &  x 
) [inline]

Definition at line 167 of file table.hpp.

References inside(), and reset().

00167                                                {
00168   t.secure(); inside (t) -> reset (as<T> (x)); }

void mmx::reset ( new_table< C, T, V > &  t,
const T &  x 
) [inline]

Definition at line 200 of file new_table.hpp.

References inside(), and reset().

00200                                               {
00201   t.secure(); inside (t) -> reset (x); }

void mmx::reset ( new_table< C, T, V > &  t,
const K &  x 
) [inline]

Definition at line 189 of file new_table.hpp.

References inside(), and reset().

00189                                                {
00190   t.secure(); inside (t) -> reset (as<T> (x)); }

void mmx::reset ( cache< C, T > &  c,
const T &  x 
) [inline]

Definition at line 70 of file cache.hpp.

Referenced by alias_reset(), reset(), source_delete(), table_reset(), ttable_reset(), unary_set(), and posix_port_rep::~posix_port_rep().

00070                                               {
00071   reset (*c, x); }

string resolve_name ( const string base,
const string name 
)

Definition at line 675 of file system.cpp.

References ancestor_search_name(), file_exists(), get_directory(), load_path(), N(), path_sep, pos, relative_name(), search_backwards(), semi_recursive_search_name(), starts(), and tokenize().

00675                                                       {
00676   //mmout << "Resolve " << base << ", " << name << "\n";
00677   if (name != "" && name[0] == '.')
00678     return resolve_name (base, string ("$PWD") * name (1, N(name)));
00679   string name_bis= name;
00680 #if defined(__MINGW__) || defined(__MINGW32__)
00681   int pos= search_backwards (name, ":", N(name));
00682   if (pos > 1) name_bis= name (pos-1, N(name)); else {
00683     if (name != "" && name[0] == '/') name_bis= "/" * name; }
00684 #else
00685   if (name != "" && name[0] == '/') name_bis= "/" * name;
00686 #endif
00687   string r= relative_name (base, name_bis);
00688   if (file_exists (r) || starts (name_bis, "//")) return r;
00689   r= ancestor_search_name (get_directory (base), name_bis);
00690   if (r != "") return r;
00691   vector<string> v= tokenize (load_path (), string (path_sep), false);
00692   for (nat i=0; i<N(v); i++)
00693     if (v[i] != ".") {
00694       r= semi_recursive_search_name (v[i], name_bis);
00695       if (r != "") return r;
00696     }
00697   return "";
00698 }

void restore_evaluator (  ) 

Definition at line 79 of file evaluator.cpp.

References ASSERT, current_ev, is_nil(), read_car(), read_cdr(), and stack_ev.

00079                      {
00080   //assert (!ev_lock);
00081   //ev_lock= true;
00082   //{
00083   ASSERT (!is_nil (stack_ev), "empty evaluator stack");
00084   /*
00085     if (N(stack_ev) < 6)
00086     mmout << "[" << N (stack_ev)-1
00087     << ":" << inside (current_ev)
00088     << "-" << inside (car (stack_ev))
00089     << "]" << flush_now;
00090   */
00091   evaluator aux_ev= current_ev; // only destroy current_ev on exit
00092   current_ev= read_car (stack_ev);
00093   stack_ev  = read_cdr (stack_ev);
00094   //}
00095   //ev_lock= false;
00096 }

observer mmx::result_observer ( dynamic_rep arg,
const updater u 
)

Definition at line 169 of file dynamic.cpp.

Referenced by dynamic::dynamic().

00169                                                      {
00170   return observer (new result_observer_rep (arg, u));
00171 }

vector<string> mmx::retrieve_branches ( const storage st  )  [inline]

Retrieve all variables for storage st.

Definition at line 95 of file storage.hpp.

00095                                                             {
00096   return st->retrieve_branches (); }

vector<generic> mmx::retrieve_branches_bis ( const storage st  )  [inline]

Retrieve all variables for storage st.

Definition at line 105 of file storage.hpp.

Referenced by GLUE_13().

00105                                                                  {
00106   return as<vector<generic> > (st->retrieve_branches ()); }

vector<string> mmx::retrieve_data ( const storage st  )  [inline]

Check whether the storage admits a shadow for the file orig.

Definition at line 92 of file storage.hpp.

00092                                                         {
00093   return st->retrieve_data (); }

vector<generic> mmx::retrieve_data_bis ( const storage st  )  [inline]

Retrieve all files for storage st.

Definition at line 102 of file storage.hpp.

Referenced by GLUE_12().

00102                                                              {
00103   return as<vector<generic> > (st->retrieve_data ()); }

vector<string> mmx::retrieve_files ( const storage st  )  [inline]

Retrieve all branches for storage st.

Definition at line 98 of file storage.hpp.

00098                                                          {
00099   return st->retrieve_files (); }

vector<generic> mmx::retrieve_files_bis ( const storage st  )  [inline]

Retrieve all branches for storage st.

Definition at line 108 of file storage.hpp.

Referenced by GLUE_14().

00108                                                               {
00109   return as<vector<generic> > (st->retrieve_files ()); }

string mmx::reverse ( const string obj->lex_string  ) 

Definition at line 580 of file string.cpp.

References N().

00580                           {
00581   nat i, n= N(s);
00582   string r (n);
00583   for (i=0; i<n; i++) r[i]= s[n-1-i];
00584   return r;
00585 }

vector<C,V> mmx::reverse ( const vector< C, V > &  v  )  [inline]

Definition at line 694 of file vector.hpp.

References C, CF(), is_a_scalar(), N(), n, seg(), and Vector.

00694                           {
00695   typedef implementation<vector_linear,V> Vec;
00696   if (is_a_scalar (v)) return v;
00697   nat n= N(v);
00698   nat l= aligned_size<C,V> (n);
00699   C* a= mmx_formatted_new<C> (l, CF(v));
00700   Vec::vec_reverse (a, seg (v), n);
00701   return Vector (a, n, l, CF(v));
00702 }

table<T,C,V> mmx::reverse ( const table< C, T, V > &  t  )  [inline]

Definition at line 749 of file table.hpp.

References busy(), CF1(), CF2(), entries(), and simplify().

00749                          {
00750   table<T,C,V> r (CF2 (t), CF1 (t));
00751   for (iterator<T> it= entries (t); busy (it); ++it)
00752     r[t[*it]]= *it;
00753   simplify (r);
00754   return r;
00755 }

string mmx::reverse ( const string &  s  ) 

Reverse the order of the characters in s.

new_table<T,C,V> mmx::reverse ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 820 of file new_table.hpp.

References busy(), CF1(), CF2(), entries(), and simplify().

00820                          {
00821   table<T,C,V> r (CF2 (t), CF1 (t));
00822   for (iterator<T> it= entries (t); busy (it); ++it)
00823     r[t[*it]]= *it;
00824   simplify (r);
00825   return r;
00826 }

list<C> mmx::reverse ( const list< C > &  ll  )  [inline]

Return the reversed list of l.

Definition at line 295 of file list.hpp.

References cons(), is_nil(), List, read_car(), and read_cdr().

00295                          {
00296   List l= ll, r;
00297   while (!is_nil (l)) {
00298     r= cons (read_car (l), r);
00299     l= read_cdr (l);
00300   }
00301   return r;
00302 }

chain<C> mmx::reverse ( const chain< C > &  c  )  [inline]

Definition at line 201 of file chain.hpp.

References Chain, is_nil(), left(), middle(), and right().

Referenced by GLUE_15(), GLUE_8(), GLUE_9(), reverse_op::op(), and reverse_op::set_op().

00201                          {
00202   if (is_nil (c)) return c;
00203   return Chain (reverse (right (c)), middle (c), reverse (left (c)));
00204 }

chain< C > right ( const chain< C > &  c  )  [inline]
generic round ( const generic x  ) 

Definition at line 755 of file generic.cpp.

References current_ev, and GEN_ROUND.

00755                                  {
00756   return current_ev->apply (GEN_ROUND, x); }

double round ( const double &  x  )  [inline]

Definition at line 132 of file double.hpp.

References floor().

Referenced by round_op::op(), and round_op::set_op().

00132 { return std::floor (x + 0.5); }

unary_return_type_helper<abs_op, C >::RET mmx::rounding_error ( const C &  x  )  [inline]

Definition at line 1069 of file type_props.hpp.

References abs(), and promote().

01069                                                                     {
01070   return promote (0, abs (x)); }

generic rounding_error ( const generic x  ) 

Definition at line 772 of file generic.cpp.

References current_ev, and GEN_ROUNDING_ERROR.

00772                                           {
00773   return current_ev->apply (GEN_ROUNDING_ERROR, x); }

double rounding_error ( const double &  x  )  [inline]
generic rres ( const generic x1,
const generic x2 
)

Definition at line 844 of file generic.cpp.

References current_ev.

00844                                                     {
00845   return current_ev->apply ("rres", x1, x2); }

void mmx::rshift2 ( C &  x,
const C &  y,
const S &  z 
) [inline]

Definition at line 304 of file defaults.hpp.

00304 { x= y >> z; }

C mmx::rshift2 ( const C &  x  )  [inline]

Definition at line 300 of file defaults.hpp.

00300 { return rshift2<C,int> (x, 1); }

C mmx::rshift2 ( const C &  x,
const S &  y 
) [inline]

Definition at line 298 of file defaults.hpp.

Referenced by rshift2_op::op(), and rshift2_op::set_op().

00298 { return x >> y; }

void mmx::rshift2_assign ( C &  x,
const S &  y 
) [inline]

Definition at line 302 of file defaults.hpp.

Referenced by rshift2_op::set_op().

00302 { x >>= y; }

syntactic rshiftz ( const syntactic g,
const syntactic sh 
)

Definition at line 473 of file syntactic.cpp.

References syn().

00473                                                             {
00474   return syn ("rshiftz", g, sh); }

generic rshiftz ( const generic x1,
const generic x2 
)

Definition at line 836 of file generic.cpp.

References current_ev.

00836                                                        {
00837   return current_ev->apply ("rshiftz", x1, x2); }

void mmx::rshiftz ( C &  x,
const C &  y,
const S &  z 
) [inline]

Definition at line 321 of file defaults.hpp.

References lshiftz().

00321 { lshiftz (x, y, -z); }

C mmx::rshiftz ( const C &  x  )  [inline]

Definition at line 317 of file defaults.hpp.

00317 { return rshiftz<C,int> (x, 1); }

C mmx::rshiftz ( const C &  x,
const S &  y 
) [inline]

Definition at line 315 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().

00315 { return lshiftz (x, -y); }

void mmx::rshiftz_assign ( C &  x,
const S &  y = 1 
) [inline]

Definition at line 319 of file defaults.hpp.

References lshiftz_assign().

Referenced by rshiftz_op::set_op().

00319 { lshiftz_assign (x, -y); }

void mmx::safe_free ( register void *  ptr  )  [inline]

Definition at line 126 of file fast_new.hpp.

Referenced by mmx_free_thread_unsafe().

00126                                {
00127   //printf ("Free : %p, %p\n", ptr,
00128   //        *((void**) ((void*) (((char*) ptr) - sizeof (void*)))));
00129   free (*((void**) ((void*) (((char*) ptr) - sizeof (void*)))));
00130 }

void * safe_malloc ( register size_t  sz  ) 

Definition at line 34 of file fast_new.cpp.

Referenced by enlarge_malloc(), and mmx_malloc_thread_unsafe().

00034                                  {
00035   // Always guarantees 16 byte alignment
00036   register char* ret;
00037   register char* ptr= (char*) malloc (sz + 16);
00038   if (ptr == NULL) {
00039     fprintf (stderr, "Fatal error: out of memory\n");
00040     assert (false);
00041     exit (1);
00042   }
00043   ret= ptr + (16 - (((nat) ((uintptr_t) ((void*) ptr))) & 15));
00044   //printf ("Alloc: %lx, %lx\n",
00045   //        (uintptr_t) (void*) ret, (uintptr_t) (void*) ptr);
00046   *((void**) ((void*) (ret - sizeof (void*))))= (void*) ptr;
00047   return (void*) ret;
00048 }

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==().

00184                                                              {
00185   return x1->same_type (x2); }

bool mmx::save ( const string orig_file_name,
const string obj->lex_string 
)

Definition at line 755 of file system.cpp.

References decode_name(), error_flag(), and output_file_port().

00755                                                      {
00756   string file_name= decode_name (orig_file_name);
00757   port f= output_file_port (file_name);
00758   if (error_flag (f)) return true;
00759   f << s;
00760   return false;
00761 }

bool mmx::save ( const string file_name,
const string s 
)

Referenced by mmc_save(), and shell_save_session().

nat mmx::scalar_to_alias ( nat  id  )  [inline]

Definition at line 196 of file alias.hpp.

References alias_type_info().

Referenced by object_alias(), and object_specialize_alias().

00196                          {
00197   int mode= 1;
00198   alias_type_info (id, mode);
00199   return id;
00200 }

static void mmx::scheme_to_tm ( string obj->lex_string,
const generic g,
int  indent 
) [static]

Definition at line 520 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().

00520                                                        {
00521   //mmout << "Converting " << g << "\n";
00522   if (is<literal> (g))
00523     write (s, unquote (literal_to_string (g)));
00524   else if (is_func (g, "concat")) {
00525     for (nat i=1; i<N(g); i++)
00526       scheme_to_tm (s, g[i], indent);
00527   }
00528   else if (is_func (g, "document")) {
00529     for (nat i=1; i<N(g); i++) {
00530       if (i>1) {
00531         if (ends (s, "\n")) s << "\\;";
00532         s << "\n\n" << spaces (indent);
00533       }
00534       scheme_to_tm (s, g[i], indent);
00535     }
00536   }
00537   else if (is<compound> (g) && N(g) > 0 && is<literal> (g[0])) {
00538     string func= literal_to_string (g[0]);
00539     vector<generic> args= cdr (compound_to_vector (g));
00540     int i, last, n=N(args);
00541     for (i=n-1; i>=0; i--)
00542       if (is_func (args[i], "document"))
00543         break;
00544     last= i;
00545     if (last >= 0) {
00546       for (i=0; i<=n; i++) {
00547         bool flag= (i<n) && is_func (args[i], "document");
00548         if (i==0) s << "<\\" << func;
00549         else if (i==last+1) s << "</" << func;
00550         else if (is_func (args[i-1], "document")) s << "<|" << func;
00551         if (i==n) { s << ">"; break; }
00552 
00553         if (flag) {
00554           s << ">";
00555           if (!ends (s, "\n")) s << "\n" << spaces (indent + 2);
00556           scheme_to_tm (s, args[i], indent + 2);
00557           if (!ends (s, "\n")) s << "\n" << spaces (indent);
00558         }
00559         else {
00560           s << "|";
00561           scheme_to_tm (s, args[i], indent);
00562         }
00563       }
00564     }
00565     else {
00566       s << "<" << func;
00567       for (i=0; i<n; i++) {
00568         s << "|";
00569         scheme_to_tm (s, args[i], indent);
00570       }
00571       s << ">";
00572     }    
00573   }
00574   else ERROR ("invalid scheme markup");
00575 }

int mmx::search_backwards ( const string obj->lex_string,
const string what,
const int &  obj->lex_pos 
)

Definition at line 573 of file string.cpp.

References N(), and reads().

00573                                                                        {
00574   for (int i= pos - N(what); i >= 0; i--)
00575     if (reads (s, i, what)) return i;
00576   return -1;
00577 }

int mmx::search_backwards ( const string &  s,
const string &  what,
const int &  pos 
)

Search first occurrence of @ in @ before @ or @-1@.

Referenced by GLUE_15(), and resolve_name().

int mmx::search_forwards ( const string obj->lex_string,
const string what,
const int &  obj->lex_pos 
)

Definition at line 566 of file string.cpp.

References N(), and reads().

00566                                                                       {
00567   for (nat i= pos; i + N(what) <= N(s); i++)
00568     if (reads (s, i, what)) return i;
00569   return -1;
00570 }

int mmx::search_forwards ( const string &  s,
const string &  what,
const int &  pos 
)

Search first occurrence of @ in @ after @ or @-1@.

Referenced by GLUE_14().

double mmx::sec ( const double &  x  )  [inline]

Definition at line 69 of file double.hpp.

00077 { return std::isfinite (x); }

double mmx::sech ( const double &  x  )  [inline]

Definition at line 70 of file double.hpp.

00077 { return std::isfinite (x); }

C2 mmx::second ( const triple< C1, C2, C3 > &  t  )  [inline]

Definition at line 41 of file triple.hpp.

00041 { return t.x2; }

const C * seg ( const vector< C, V > &  v  )  [inline]

Definition at line 215 of file vector.hpp.

00215 { return v->a; }

C * seg ( vector< C, V > &  v  )  [inline]
C * seg_inside ( const vector< C, V > &  v  )  [inline]

Definition at line 219 of file vector.hpp.

References inside().

00219 { return inside (v)->a; }

void select_evaluator ( const evaluator ev  ) 

Definition at line 61 of file evaluator.cpp.

References cons(), current_ev, and stack_ev.

00061                                        {
00062   //assert (!ev_lock);
00063   //ev_lock= true;
00064   //{
00065   /*
00066     if (N(stack_ev) < 6)
00067     mmout << "[" << N (stack_ev)
00068     << ":" << inside (current_ev)
00069     << "+" << inside (ev)
00070     << "]" << flush_now;
00071   */
00072   stack_ev  = cons (current_ev, stack_ev);
00073   current_ev= ev;
00074   //}
00075   //ev_lock= false;
00076 }

static string mmx::semi_recursive_search_name ( const string dir,
const string name 
) [static]

Definition at line 640 of file system.cpp.

References canonical_name(), file_exists(), file_is_directory(), file_is_file(), N(), and recursive_search_name().

Referenced by ancestor_search_name(), and resolve_name().

00640                                                                    {
00641   //mmout << "Semi recursive search " << dir << ", " << name << "\n";
00642   if (!file_exists (dir) || !file_is_directory (dir)) return "";
00643   nat i;
00644   for (i=0; i<N(name); i++)
00645     if (name[i] == '/') break;
00646   if (i >= N(name)) {
00647     string sname= canonical_name (dir * "/" * name);
00648     if (file_exists (sname) && file_is_file (sname)) return sname;
00649   }
00650   else {
00651     string sdir= canonical_name (dir * "/" * name (0, i));
00652     if (file_exists (sdir) && file_is_directory (sdir)) {
00653       string sname= recursive_search_name (sdir, name (i+1, N(name)), false);
00654       if (sname != "") return sname;
00655     }
00656   }
00657   return "";
00658 }

iterator<C> mmx::seq ( const C &  c1,
const C &  c2,
const C &  c3,
const C &  c4,
const C &  c5,
const C &  c6 
) [inline]

Definition at line 313 of file iterator.hpp.

References C, get_format(), and Iterator.

00315 {
00316   C* a= mmx_new<C> (6);
00317   a[0]= c1; a[1]= c2; a[2]= c3; a[3]= c4; a[4]= c5; a[5]= c6;
00318   return Iterator (new finite_iterator_rep<C> (a, 6, get_format (c1)));
00319 }

iterator<C> mmx::seq ( const C &  c1,
const C &  c2,
const C &  c3,
const C &  c4,
const C &  c5 
) [inline]

Definition at line 304 of file iterator.hpp.

References C, get_format(), and Iterator.

00306 {
00307   C* a= mmx_new<C> (5);
00308   a[0]= c1; a[1]= c2; a[2]= c3; a[3]= c4; a[4]= c5;
00309   return Iterator (new finite_iterator_rep<C> (a, 5, get_format (c1)));
00310 }

iterator<C> mmx::seq ( const C &  c1,
const C &  c2,
const C &  c3,
const C &  c4 
) [inline]

Definition at line 295 of file iterator.hpp.

References C, get_format(), and Iterator.

00297 {
00298   C* a= mmx_new<C> (4);
00299   a[0]= c1; a[1]= c2; a[2]= c3; a[3]= c4;
00300   return Iterator (new finite_iterator_rep<C> (a, 4, get_format (c1)));
00301 }

iterator<C> mmx::seq ( const C &  c1,
const C &  c2,
const C &  c3 
) [inline]

Definition at line 288 of file iterator.hpp.

References C, get_format(), and Iterator.

00288                                             {
00289   C* a= mmx_new<C> (3);
00290   a[0]= c1; a[1]= c2; a[2]= c3;
00291   return Iterator (new finite_iterator_rep<C> (a, 3, get_format (c1)));
00292 }

iterator<C> mmx::seq ( const C &  c1,
const C &  c2 
) [inline]

Definition at line 281 of file iterator.hpp.

References C, get_format(), and Iterator.

00281                                {
00282   C* a= mmx_new<C> (2);
00283   a[0]= c1; a[1]= c2;
00284   return Iterator (new finite_iterator_rep<C> (a, 2, get_format (c1)));
00285 }

iterator<C> mmx::seq ( const C &  c1  )  [inline]

Definition at line 274 of file iterator.hpp.

References C, get_format(), and Iterator.

00274                   {
00275   C* a= mmx_new<C> (1);
00276   a[0]= c1;
00277   return Iterator (new finite_iterator_rep<C> (a, 1, get_format (c1)));
00278 }

static string mmx::serialize ( const generic g  )  [static]

Definition at line 272 of file mmx_printer.cpp.

References s, and serialize().

00272                              {
00273   string s;
00274   serialize (s, g);
00275   return s;
00276 }

static void mmx::serialize ( string obj->lex_string,
const generic g 
) [static]

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().

00172                                         {
00173   if (is<literal> (g)) {
00174     static table<generic,generic> t= mmx_symbol_table ();
00175     if (contains (t, g)) s << literal_to_string (t[g]);
00176     else if (g == "$spc") s << " ";
00177     else if (g == "$lf") s << LF;
00178     else if (g == "$cr");
00179     else s << literal_to_string (g);
00180   }
00181   else if (is_func (g, "$concat") ||
00182            is_func (g, "$bracket") ||
00183            is_func (g, "$prefix") ||
00184            is_func (g, "$postfix"))
00185     for (nat i=1; i<N(g); i++)
00186       serialize (s, g[i]);
00187   else if (is_func (g, "$infix", 3)) {
00188     serialize (s, g[1]);
00189     if (g[2] != "^" && g[2] != "^^") s << " ";
00190     serialize (s, g[2]);
00191     if (g[2] != "^" && g[2] != "^^") s << " ";
00192     serialize (s, g[3]); 
00193   }
00194   else if (is_func (g, "$bigop") && N(g) >= 3) {
00195     if (g[1] == GEN_PLUS && is_func (g[2], GEN_MINUS, 1)) {
00196       s << "-";
00197       serialize (s, g[2][1]);
00198     }
00199     else serialize (s, g[2]);
00200     for (nat i=3; i<N(g); i++) {
00201       if (g[1] == GEN_PLUS && is_func (g[i], GEN_MINUS, 1)) {
00202         s << " " << "-" << " ";
00203         serialize (s, g[i][1]);
00204       }
00205       else {
00206         s << " ";
00207         serialize (s, g[1]);
00208         s << " ";
00209         serialize (s, g[i]);
00210       }
00211     }
00212   }
00213   else if (is_func (g, "$keyword", 1))
00214     serialize (s, g[1]);
00215   else if (is_func (g, "$operate", 2) ||
00216            is_func (g, "$keyword", 2)) {
00217     serialize (s, g[1]);
00218     s << " ";
00219     serialize (s, g[2]);
00220   }
00221   else if (is_func (g, "$hlist") ||
00222            is_func (g, "$vlist")) {
00223     if (N(g) == 1) return;
00224     serialize (s, g[1]);
00225     for (nat i=2; i<N(g); i++) {
00226       if (g[0] == "$hlist") s << ", ";
00227       else s << "; ";
00228       serialize (s, g[i]);
00229     }
00230   }
00231   else if (is_func (g, "$indent")) {
00232     s << INDENT;
00233     for (nat i=1; i<N(g); i++)
00234       serialize (s, g[i]);
00235     s << UNINDENT;
00236   }
00237   else if (is_func (g, "$varindent")) {
00238     serialize (s, g[1]);
00239     s << VARINDENT;
00240     for (nat i=2; i<N(g); i++)
00241       serialize (s, g[i]);
00242     s << UNINDENT;
00243   }
00244   else if (is_func (g, "$text", 1))
00245     serialize (s, g[1]);
00246   else if (is_func (g, "$math", 1))
00247     serialize (s, g[1]);
00248   else if (is_func (g, "$dynamic", 2)) {
00249     s << "< ";
00250     serialize (s, g[1]);
00251     s << " | ";
00252     serialize (s, g[2]);
00253     s << " >";
00254   }
00255   else if (is<compound> (g) && is<literal> (g[0]) &&
00256            starts (as_string (as<literal> (g[0])), "tm$")) {
00257     generic h= texmacs_expand (g);
00258     serialize (s, h);
00259   }
00260   else {
00261     serialize (s, g[0]);
00262     s << " (";
00263     for (nat i=1; i<N(g); i++) {
00264       if (i != 1) s << ", ";
00265       serialize (s, g[i]);
00266     }
00267     s << ")";
00268   }
00269 }

void mmx::set_accuracy ( vector< C, V > &  v  )  [inline]

Definition at line 1034 of file vector.hpp.

01034 { nullary_set<accuracy_as_op> (v); }

void mmx::set_accuracy ( T &  x  )  [inline]

Definition at line 872 of file type_props.hpp.

References decexp2(), precision(), and promote().

00872                                                      {
00873   x= decexp2 (promote (1, x), precision (x) - 1); }

void set_accuracy ( syntactic x  ) 

Definition at line 104 of file syntactic.cpp.

References as_syntactic(), and GEN_ACCURACY.

00104 { x= as_syntactic (GEN_ACCURACY); }

void set_accuracy ( generic x  ) 

Definition at line 251 of file generic.cpp.

References GEN_ACCURACY.

00251 { x= GEN_ACCURACY; }

void set_accuracy ( double &  x  )  [inline]

Definition at line 34 of file double.hpp.

Referenced by accuracy_cst(), and accuracy_as_op::set_op().

00034 { x= __DBL_EPSILON__; }

generic set_alias ( const generic a,
const generic val 
)

Definition at line 89 of file alias.cpp.

References alias_setter(), and type().

00089                                                  {
00090   routine r;
00091   alias_setter (type (a), r);
00092   return r->apply (a, val);
00093 }

C mmx::set_alias ( const alias< C > &  a,
const C &  c 
) [inline]

Definition at line 59 of file alias.hpp.

Referenced by object_set_alias(), and set_genalias().

00059                                                      {
00060   a->open ()= c; a->close (); return c; }

void mmx::set_as ( vector< C, V > &  r,
const T &  x 
) [inline]

Definition at line 282 of file vector.hpp.

References CF(), and Vector.

00282                                {
00283   r= Vector (x, CF(r));
00284 }

void mmx::set_as ( vector< T, TV > &  r,
const vector< F, FV > &  v 
) [inline]

Definition at line 277 of file vector.hpp.

References CF().

00277                                                 {
00278   r= vector<T,TV> (v, CF(r));
00279 }

void mmx::set_as ( T &  r,
const F &  x 
) [inline]

Definition at line 710 of file type_props.hpp.

00710                           {
00711   r= as_helper<T,F>::cv (x);
00712 }

void mmx::set_as ( list< C > &  r,
const T &  x 
) [inline]

Definition at line 179 of file list.hpp.

References C, and set_as().

00179                              {
00180   C c; set_as (c, x);
00181   r= list<T> (c);
00182 }

void mmx::set_as ( list< T > &  r,
const vector< F > &  l 
) [inline]

Definition at line 169 of file list.hpp.

References car(), cdr(), CF(), cons(), is_nil(), s, set_as(), and T.

00169                                         {
00170   if (is_nil (l)) r= list<T> (CF(r));
00171   else {
00172     T c; set_as (c, car (l));
00173     list<T> s (CF (r)); set_as (s, cdr (l));
00174     r= cons (c, s);
00175   }
00176 }

void mmx::set_as ( iterator< T > &  r,
const iterator< F > &  x 
) [inline]

Definition at line 221 of file iterator.hpp.

References CF().

00221                                               {
00222   r= iterator<T> (new as_iterator_rep<T,F> (x, CF(r)));
00223 }

void mmx::set_as ( generic &  r,
const generic &  x 
) [inline]

Definition at line 583 of file generic.hpp.

00583                                       {
00584  r= x;
00585 }

void mmx::set_as ( C &  r,
const generic &  x 
) [inline]

Definition at line 578 of file generic.hpp.

00578                                 {
00579   r= ((generic_concrete_rep<C>*) inspect(x)) -> rep;
00580 }

void mmx::set_as ( generic &  r,
const C &  x 
) [inline]
void mmx::set_catalan ( vector< C, V > &  v  )  [inline]

Definition at line 1028 of file vector.hpp.

01028 { nullary_set<catalan_as_op> (v); }

void set_catalan ( syntactic x  ) 

Definition at line 108 of file syntactic.cpp.

References as_syntactic(), and GEN_CATALAN.

00108 { x= as_syntactic (GEN_CATALAN); }

void set_catalan ( generic x  ) 

Definition at line 255 of file generic.cpp.

References GEN_CATALAN.

Referenced by catalan_cst(), and catalan_as_op::set_op().

00255 { x= GEN_CATALAN; }

void mmx::set_default ( vector< C, V > &  v  )  [inline]

Definition at line 1024 of file vector.hpp.

01024 { nullary_set<default_as_op> (v); }

void mmx::set_default ( bool &  x  )  [inline]

Definition at line 885 of file type_props.hpp.

00885 { x= false; }

void mmx::set_default ( T &  x  )  [inline]

Definition at line 864 of file type_props.hpp.

References get_format(), and get_sample().

00864                                                     {
00865   x= get_sample (get_format (x)); }

void set_default ( syntactic x  ) 

Definition at line 101 of file syntactic.cpp.

00101 { x= syntactic ("false"); }

void set_default ( generic x  ) 

Definition at line 248 of file generic.cpp.

00248 { x= as<generic> (false); }

void set_default ( double &  x  )  [inline]

Definition at line 26 of file double.hpp.

00026 { x= 0; }

void set_default ( long unsigned int &  x  )  [inline]

Definition at line 42 of file int.hpp.

00042 { x= 0; }

void set_default ( long int &  x  )  [inline]

Definition at line 41 of file int.hpp.

00041 { x= 0; }

void set_default ( nat &  x  )  [inline]

Definition at line 40 of file int.hpp.

00040 { x= 0; }

void set_default ( int &  x  )  [inline]

Definition at line 39 of file int.hpp.

Referenced by default_cst(), and default_as_op::set_op().

00039 { x= 0; }

int set_env ( const string var,
const string value 
)

Definition at line 94 of file system.cpp.

References as_charp(), and free_charp().

00094                                                  {
00095   char* _var= as_charp (var);
00096   char* _value= as_charp (value);
00097   int ret= setenv (_var, _value, 1);
00098   free_charp (_var);
00099   free_charp (_value);
00100   return ret;
00101 }

void mmx::set_euler ( vector< C, V > &  v  )  [inline]

Definition at line 1027 of file vector.hpp.

01027 { nullary_set<euler_as_op> (v); }

void set_euler ( syntactic x  ) 

Definition at line 107 of file syntactic.cpp.

References as_syntactic(), and GEN_EULER.

00107 { x= as_syntactic (GEN_EULER); }

void set_euler ( generic x  ) 

Definition at line 254 of file generic.cpp.

References GEN_EULER.

00254 { x= GEN_EULER; }

void set_euler ( double &  x  )  [inline]

Definition at line 37 of file double.hpp.

Referenced by euler_cst(), and euler_as_op::set_op().

00037 { x= 0.5772156649015328606065120900824024L; }

void mmx::set_false ( T &  x  )  [inline]

Definition at line 862 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().

00862 { set_as (x, false); }

bool set_frac_flag ( bool  new_val  ) 

Definition at line 245 of file syntactic.cpp.

References frac_flag.

Referenced by GLUE_16(), and ordered_product().

00245                              {
00246   bool ret= frac_flag;
00247   frac_flag= new_val;
00248   return ret;
00249 }

void mmx::set_fuzz ( vector< C, V > &  v  )  [inline]

Definition at line 1031 of file vector.hpp.

01031 { nullary_set<fuzz_as_op> (v); }

void set_fuzz ( syntactic x  ) 

Definition at line 111 of file syntactic.cpp.

References as_syntactic(), and GEN_FUZZ.

00111 { x= as_syntactic (GEN_FUZZ); }

void set_fuzz ( generic x  ) 

Definition at line 258 of file generic.cpp.

References GEN_FUZZ.

00258 { x= GEN_FUZZ; }

void set_fuzz ( double &  x  )  [inline]

Definition at line 31 of file double.hpp.

Referenced by fuzz_cst(), and fuzz_as_op::set_op().

00031 { 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().

00136                                                                             {
00137   return set_alias (*a, c); }

void mmx::set_imaginary ( vector< C, V > &  v  )  [inline]

Definition at line 1029 of file vector.hpp.

01029 { nullary_set<imaginary_as_op> (v); }

void mmx::set_imaginary ( T &  x  )  [inline]

Definition at line 870 of file type_props.hpp.

References promote().

00870                                                       {
00871   x= times_i (promote (1, x)); }

void set_imaginary ( syntactic x  ) 

Definition at line 109 of file syntactic.cpp.

References as_syntactic(), and GEN_I.

00109 { x= as_syntactic (GEN_I); }

void set_imaginary ( generic x  ) 

Definition at line 256 of file generic.cpp.

References GEN_I.

Referenced by imaginary_cst(), and imaginary_as_op::set_op().

00256 { x= GEN_I; }

void mmx::set_infinity ( vector< C, V > &  v  )  [inline]

Definition at line 1035 of file vector.hpp.

01035 { nullary_set<infinity_as_op> (v); }

void mmx::set_infinity ( T &  x  )  [inline]

Definition at line 874 of file type_props.hpp.

References promote(), and times_infinity().

00874                                                      {
00875   x= times_infinity (promote (1, x)); }

void set_infinity ( syntactic x  ) 

Definition at line 112 of file syntactic.cpp.

References as_syntactic(), and GEN_INFINITY.

00112 { x= as_syntactic (GEN_INFINITY); }

void set_infinity ( generic x  ) 

Definition at line 259 of file generic.cpp.

References GEN_INFINITY.

00259 { x= GEN_INFINITY; }

void set_infinity ( double &  x  )  [inline]

Definition at line 30 of file double.hpp.

Referenced by infinity_cst(), set_largest(), set_maximal(), and infinity_as_op::set_op().

00030 { x= HUGE_VAL; }

void mmx::set_largest ( vector< C, V > &  v  )  [inline]

Definition at line 1033 of file vector.hpp.

01033 { nullary_set<largest_as_op> (v); }

void mmx::set_largest ( T &  x  )  [inline]

Definition at line 878 of file type_props.hpp.

References next_below(), and set_infinity().

00878                                              {
00879   set_infinity (x); x= next_below (x); }

void set_largest ( syntactic x  ) 

Definition at line 103 of file syntactic.cpp.

References as_syntactic(), and GEN_LARGEST.

00103 { x= as_syntactic (GEN_LARGEST); }

void set_largest ( generic x  ) 

Definition at line 250 of file generic.cpp.

References GEN_LARGEST.

00250 { x= GEN_LARGEST; }

void set_largest ( double &  x  )  [inline]

Definition at line 33 of file double.hpp.

Referenced by largest_cst(), and largest_as_op::set_op().

00033 { x= nextafter (HUGE_VAL, 0.0); }

void mmx::set_lift ( R &  y,
const C &  x 
) [inline]

Definition at line 832 of file type_props.hpp.

Referenced by lift_helper< vector< C, V > >::set_op().

00832 { lift_helper<C>::set_op (y, x); }

void mmx::set_log2 ( vector< C, V > &  v  )  [inline]

Definition at line 1026 of file vector.hpp.

01026 { nullary_set<log2_as_op> (v); }

void set_log2 ( syntactic x  ) 

Definition at line 106 of file syntactic.cpp.

References as_syntactic(), and log().

00106 { x= log (as_syntactic (2)); }

void set_log2 ( generic x  ) 

Definition at line 253 of file generic.cpp.

References log().

00253 { x= log (generic (2)); }

void set_log2 ( double &  x  )  [inline]

Definition at line 35 of file double.hpp.

Referenced by log2_cst(), and log2_as_op::set_op().

00035 { x= 0.6931471805599453094172321214581766L; }

void mmx::set_maximal ( vector< C, V > &  v  )  [inline]

Definition at line 1036 of file vector.hpp.

01036 { nullary_set<maximal_as_op> (v); }

void mmx::set_maximal ( T &  x  )  [inline]

Definition at line 880 of file type_props.hpp.

References set_infinity().

00880                                                     {
00881   set_infinity (x); }

void set_maximal ( syntactic x  ) 

Definition at line 113 of file syntactic.cpp.

References as_syntactic(), and GEN_INFINITY.

00113 { x= as_syntactic (GEN_INFINITY); }

void mmx::set_maximal ( long long unsigned int &  x  )  [inline]

Definition at line 64 of file int.hpp.

00064                                                     {
00065   x= (long long unsigned int) (-1); }

void mmx::set_maximal ( long long int &  x  )  [inline]

Definition at line 60 of file int.hpp.

00060                                            {
00061   x= (long long int) (((long long unsigned int) (-1)) >> 1); }

void set_maximal ( generic x  ) 

Definition at line 260 of file generic.cpp.

References GEN_INFINITY.

00260 { x= GEN_INFINITY; }

void set_maximal ( double &  x  )  [inline]

Definition at line 28 of file double.hpp.

00028 { x= HUGE_VAL; }

void set_maximal ( long unsigned int &  x  )  [inline]

Definition at line 56 of file int.hpp.

00056                                                {
00057   x= (long unsigned int) (-1); }

void set_maximal ( long int &  x  )  [inline]

Definition at line 52 of file int.hpp.

00052                                       {
00053   x= (long int) (((long unsigned int) (-1)) >> 1); }

void set_maximal ( nat &  x  )  [inline]

Definition at line 48 of file int.hpp.

00048                                  {
00049   x= (nat) (-1); }

void set_maximal ( int &  x  )  [inline]

Definition at line 44 of file int.hpp.

Referenced by maximal_cst(), set_minimal(), inf_op::set_neutral(), min_op::set_neutral(), and maximal_as_op::set_op().

00044                                  {
00045   x= (int) (((nat) (-1)) >> 1); }

void mmx::set_minimal ( vector< C, V > &  v  )  [inline]

Definition at line 1037 of file vector.hpp.

01037 { nullary_set<minimal_as_op> (v); }

void mmx::set_minimal ( T &  x  )  [inline]

Definition at line 882 of file type_props.hpp.

References set_maximal().

00882                                                     {
00883   set_maximal (x); x= -x; }

void set_minimal ( syntactic x  ) 

Definition at line 114 of file syntactic.cpp.

References as_syntactic(), and GEN_INFINITY.

00114 { x= -as_syntactic (GEN_INFINITY); }

void mmx::set_minimal ( long long unsigned int &  x  )  [inline]

Definition at line 66 of file int.hpp.

00066                                                     {
00067   x= (long long unsigned int) 0; }

void mmx::set_minimal ( long long int &  x  )  [inline]

Definition at line 62 of file int.hpp.

00062                                            {
00063   x= (long long int) ((((long long unsigned int) (-1)) >> 1) + 1); }

void set_minimal ( generic x  ) 

Definition at line 261 of file generic.cpp.

References GEN_INFINITY.

00261 { x= -GEN_INFINITY; }

void set_minimal ( double &  x  )  [inline]

Definition at line 29 of file double.hpp.

00029 { x= -HUGE_VAL; }

void set_minimal ( long unsigned int &  x  )  [inline]

Definition at line 58 of file int.hpp.

00058                                                {
00059   x= (long unsigned int) 0; }

void set_minimal ( long int &  x  )  [inline]

Definition at line 54 of file int.hpp.

00054                                       {
00055   x= (long int) ((((long unsigned int) (-1)) >> 1) + 1); }

void set_minimal ( nat &  x  )  [inline]

Definition at line 50 of file int.hpp.

00050                                  {
00051   x= (nat) 0; }

void set_minimal ( int &  x  )  [inline]
void mmx::set_nan ( vector< C, V > &  v  )  [inline]

Definition at line 1030 of file vector.hpp.

01030 { nullary_set<nan_as_op> (v); }

void mmx::set_nan ( T &  x  )  [inline]

Definition at line 868 of file type_props.hpp.

References promote().

00868                                                 {
00869   x= promote (1, x) / promote (0, x); }

void set_nan ( syntactic x  ) 

Definition at line 110 of file syntactic.cpp.

References as_syntactic(), and GEN_NAN.

00110 { x= as_syntactic (GEN_NAN); }

void set_nan ( generic x  ) 

Definition at line 257 of file generic.cpp.

References GEN_NAN.

00257 { x= GEN_NAN; }

void set_nan ( double &  x  )  [inline]

Definition at line 27 of file double.hpp.

Referenced by nan_cst(), and nan_as_op::set_op().

00027 { x= NAN; }

void mmx::set_one ( T &  x  )  [inline]

Definition at line 860 of file type_props.hpp.

References set_as().

Referenced by one_cst(), lcm_op::set_neutral(), and mul_op::set_neutral().

00860 { set_as (x, (int) 1); }

void mmx::set_pi ( vector< C, V > &  v  )  [inline]

Definition at line 1025 of file vector.hpp.

01025 { nullary_set<pi_as_op> (v); }

void mmx::set_pi ( T &  x  )  [inline]

Definition at line 866 of file type_props.hpp.

References atan(), and promote().

00866                                                {
00867   x= promote (4, x) * atan (promote (1, x)); }

void set_pi ( syntactic x  ) 

Definition at line 105 of file syntactic.cpp.

References as_syntactic(), and GEN_PI.

00105 { x= as_syntactic (GEN_PI); }

void set_pi ( generic x  ) 

Definition at line 252 of file generic.cpp.

References GEN_PI.

00252 { x= GEN_PI; }

void set_pi ( double &  x  )  [inline]

Definition at line 36 of file double.hpp.

Referenced by pi_cst(), and pi_as_op::set_op().

00036 { x= 3.1415926535897932384626433832795029L; }

void mmx::set_project ( R &  y,
const C &  x 
) [inline]

Definition at line 850 of file type_props.hpp.

Referenced by project_helper< vector< C, V > >::set_op().

00850 { project_helper<C>::set_op (y, x); }

void mmx::set_smallest ( vector< C, V > &  v  )  [inline]

Definition at line 1032 of file vector.hpp.

01032 { nullary_set<smallest_as_op> (v); }

void mmx::set_smallest ( T &  x  )  [inline]

Definition at line 876 of file type_props.hpp.

References next_above(), and promote().

00876                                               {
00877   x= next_above (promote (0, x)); }

void set_smallest ( syntactic x  ) 

Definition at line 102 of file syntactic.cpp.

References as_syntactic(), and GEN_SMALLEST.

00102 { x= as_syntactic (GEN_SMALLEST); }

void set_smallest ( generic x  ) 

Definition at line 249 of file generic.cpp.

References GEN_SMALLEST.

00249 { x= GEN_SMALLEST; }

void set_smallest ( double &  x  )  [inline]

Definition at line 32 of file double.hpp.

Referenced by smallest_as_op::set_op(), and smallest_cst().

00032 { x= nextafter (0.0, HUGE_VAL); }

void set_top ( heap< C > &  h,
const C &  x 
) [inline]

Definition at line 185 of file heap.hpp.

00185                                                {
00186   h.secure(); h.rep->Set_top (x); }

void mmx::set_true ( T &  x  )  [inline]

Definition at line 861 of file type_props.hpp.

References set_as().

Referenced by and_is_finite_op::set_neutral(), and and_op::set_neutral().

00861 { set_as (x, true); }

void mmx::set_zero ( T &  x  )  [inline]
vector<C,V> mmx::sharpen ( const vector< C, V > &  v  )  [inline]

Definition at line 1353 of file vector.hpp.

01353                                              {
01354   return unary_map<sharpen_op> (v); }

table<C,T,V> mmx::sharpen ( const table< C, T, V > &  t  )  [inline]

Definition at line 739 of file table.hpp.

00739                                            {
00740   return unary_map<sharpen_op> (t); }

new_table<C,T,V> mmx::sharpen ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 810 of file new_table.hpp.

00810                                            {
00811   return unary_map<sharpen_op> (t); }

generic sharpen ( const generic x1  ) 

Definition at line 825 of file generic.cpp.

References current_ev.

00825                                     {
00826   return current_ev->apply ("sharpen", x1); }

C mmx::sharpen ( const C &  x  )  [inline]

Definition at line 707 of file defaults.hpp.

Referenced by sharpen_op::op(), and sharpen_op::set_op().

00707                                                    {
00708   return x; }

void shell_load_history (  ) 

Definition at line 109 of file terminal_interface.cpp.

References as_charp(), free_charp(), history_size, and user_dir().

00109                       {
00110   string dir = user_dir ();
00111   if (dir == "") return;
00112   string file_name = dir * "/var/history";
00113   char* _f = as_charp (file_name);
00114   history_truncate_file (_f, history_size);
00115   read_history (_f);
00116   free_charp (_f);
00117 }

vector< string > shell_load_session ( void   ) 

Definition at line 167 of file terminal_interface.cpp.

References load(), N(), store_interactive_number(), store_interactive_source(), tokenize(), and user_dir().

00167                           {
00168   string dir = user_dir ();
00169   string file_name = dir * "/var/session";
00170   string data;
00171   load (file_name, data);
00172   store_interactive_number (0);
00173   string sep= "\n\n"; sep[0]= '\0';
00174   vector<string> inputs= tokenize (data, sep);
00175   vector<string> v;
00176   for (nat i=0; i<N(inputs); i++) {
00177     v << tokenize (inputs[i], "\n", true);
00178     store_interactive_source (inputs[i]);
00179   }
00180   return inputs;
00181 }

void shell_save_history (  ) 

Definition at line 98 of file terminal_interface.cpp.

References as_charp(), free_charp(), history_size, and user_dir().

Referenced by shell_terminal_input().

00098                       {
00099   string dir= user_dir ();
00100   if (dir == "") return;
00101   string file_name = dir * "/var/history";
00102   char* _f = as_charp (file_name);
00103   write_history (_f);
00104   history_truncate_file (_f, history_size);
00105   free_charp (_f);
00106 }

void shell_save_session ( void   ) 

Definition at line 152 of file terminal_interface.cpp.

References contents(), get_interactive_number(), get_interactive_source(), save(), and user_dir().

Referenced by shell_terminal_input().

00152                           {
00153   nat i;
00154   string dir = user_dir ();
00155   string contents = "";
00156   char z = 0;
00157   if (dir == "") return;
00158   string file_name = dir * "/var/session";
00159   for (i = 0; i < get_interactive_number (); ++i) {
00160     contents << get_interactive_source (i);
00161     contents << z << "\n";
00162   }
00163   save (file_name, contents);
00164 }

bool shell_terminal_input ( string in  ) 

Definition at line 309 of file terminal_interface.cpp.

References active_newline(), as_charp(), as_string(), complete(), completion_mode, entries(), fed, free_charp(), get_interactive_number(), N(), passive_newline(), quiet_mode, read_line(), recompose(), s, shell_save_history(), shell_save_session(), size(), and store_interactive_source().

00309                                       {
00310   string prompt, promptc;
00311   string s;
00312   bool b;
00313   nat i, size;
00314   vector<string> v;
00315   char* tmp;
00316   buffer = "";
00317   fed = false;
00318   size = 0;
00319 
00320   HIST_ENTRY* last_entry;
00321   HISTORY_STATE* history = history_get_history_state ();
00322 
00323   if (quiet_mode) {
00324     prompt = "";
00325     promptc= "";
00326   }
00327   else {
00328     string next= as_string (get_interactive_number () + 1);
00329     prompt = next * "] ";
00330     promptc = "";
00331     for (i=0; i < N(next); i++)
00332       promptc << " ";
00333     promptc << "] ";
00334   }
00335 
00336   // entering interactive input
00337   while (true) {
00338     if (completion_mode)
00339       rl_attempted_completion_function = complete;
00340     rl_bind_key (RETURN, active_newline);
00341     rl_bind_key (META(RETURN), passive_newline);
00342 
00343     b = read_line (prompt, s);
00344     v << s;
00345     size += N(s);
00346     buffer << s << "\n";
00347     if (N(s) > 0) {
00348       tmp = as_charp(s);
00349       if (history->length == 0)
00350         last_entry = NULL;
00351       else
00352         last_entry = history -> entries[history->length-1];
00353       if ((last_entry == NULL) ||
00354           ((last_entry != NULL) && (strcmp (tmp, last_entry->line) != 0))) {
00355         add_history (tmp);
00356         shell_save_history ();
00357         shell_save_session ();
00358       }
00359       free_charp (tmp);
00360     }
00361     if (fed || !b) {
00362       if (size > 0)
00363         store_interactive_source (recompose (v, "\n"));
00364       else
00365         buffer = "";
00366       shell_save_history ();
00367       shell_save_session ();
00368       return b;
00369     }
00370     prompt = promptc;
00371   }
00372 }

void shell_texmacs_initialize ( void   ) 

Definition at line 150 of file texmacs_interface.cpp.

References completion_mode, DATA_BEGIN, DATA_END, dynamic_event, mmout, and texmacs_dynamic_event().

00150                             {
00151   dynamic_event= texmacs_dynamic_event;
00152   mmout << DATA_BEGIN << "verbatim:";
00153   if (completion_mode) {
00154     mmout << DATA_BEGIN << "command:";
00155     mmout << "(plugin-configure mathemagix (:tab-completion #t))";
00156     mmout << DATA_END;
00157   }
00158 }

bool mmx::shell_texmacs_input ( string obj->lex_line  ) 

Definition at line 163 of file texmacs_interface.cpp.

References as_string(), busy(), completion_mode, DATA_BEGIN, DATA_COMMAND, DATA_END, flush_now, handle_completion_request(), mmin, mmout, N(), recompose(), shell_mmx_prompt, texmacs_flush_commands(), and tokenize().

00163                                    {
00164   static nat nr= 1;
00165   string next= "\"" * as_string (nr++) * "\"";
00166   mmout << DATA_BEGIN << "channel:prompt" << DATA_END;
00167   mmout << DATA_BEGIN << "scheme:(" << shell_mmx_prompt
00168         << " " << next << ")" << DATA_END;
00169   mmout << texmacs_flush_commands ();
00170   mmout << DATA_END << flush_now;
00171   string in;
00172   string request;
00173   char c;
00174   nat discard=0;
00175   while (busy (mmin)) {
00176     mmin >> c;
00177     if (c==DATA_COMMAND) {
00178       discard++;
00179       continue;
00180     }
00181     if (c=='\n' && discard) {
00182       discard--;
00183       if (discard==0) {
00184         if (completion_mode)
00185           handle_completion_request(request);
00186         request = string("");
00187       }
00188       continue;
00189     }
00190     if (discard) {
00191       request << c;
00192       continue;
00193     }
00194     if (c=='\n' && !discard) break;
00195     in << c;
00196   }
00197   mmout << DATA_BEGIN << "verbatim:";
00198   if (N(in)==0 && c==EOF) {
00199     mmout << DATA_END << flush_now;
00200     return false;
00201   }
00202   line = recompose (tokenize (in, "/{CR}/"), "\n", true);
00203   //store_interactive_source (line); // >> TODO
00204   return true;
00205 }

bool mmx::shell_texmacs_input ( string in  ) 
void shell_texmacs_output ( const generic g,
const generic t 
)

Definition at line 210 of file texmacs_interface.cpp.

References DATA_BEGIN, DATA_END, exact_neq(), flatten_as_texmacs_scheme(), math_mode, mmout, and type_mode.

00210                                                           {
00211   if (math_mode) {
00212     mmout << DATA_BEGIN << "scheme:";
00213     mmout << flatten_as_texmacs_scheme (g);
00214     mmout << DATA_END;
00215   }
00216   else
00217     mmout << g;
00218   if (type_mode && exact_neq (t, "Document"))
00219     mmout << ": " << t;
00220   mmout << "\n";
00221 }

chain<C> chain<C> mmx::shift_left ( const chain< C > &  c  )  [inline]

Definition at line 246 of file chain.hpp.

References Chain, left(), middle(), and right().

Referenced by balance_left().

00246                             {
00247   return Chain (Chain (left (c), middle (c), left (right (c))),
00248                 middle (right (c)),
00249                 right (right (c)));
00250 }

chain<C> mmx::shift_right ( const chain< C > &  c  )  [inline]

Definition at line 253 of file chain.hpp.

References Chain, left(), middle(), and right().

Referenced by balance_right().

00253                              {
00254   return Chain (left (left (c)),
00255                 middle (left (c)),
00256                 Chain (right (left (c)), middle (c), right (c)));
00257 }

void mmx::show_symbol_entries (  )  [inline]

Definition at line 132 of file symbol.hpp.

00132                                  {
00133   Symbol_rep::show_symbol_entries (); }

int mmx::sign ( const long long unsigned int &  x  )  [inline]

Definition at line 412 of file defaults.hpp.

00412 { return (x == 0) ? 0 : 1; }

int mmx::sign ( const long unsigned int &  x  )  [inline]

Definition at line 409 of file defaults.hpp.

00409 { return (x == 0) ? 0 : 1; }     

int mmx::sign ( const unsigned int &  x  )  [inline]

Definition at line 406 of file defaults.hpp.

00406 { return (x == 0) ? 0 : 1; }     

int mmx::sign ( const short unsigned int &  x  )  [inline]

Definition at line 403 of file defaults.hpp.

00403 { return (x == 0) ? 0 : 1; }     

int mmx::sign ( const unsigned char &  x  )  [inline]

Definition at line 400 of file defaults.hpp.

00400 { return (x == 0) ? 0 : 1; }     

int mmx::sign ( const C &  x  )  [inline]

Definition at line 393 of file defaults.hpp.

Referenced by atan2(), compare(), GLUE_19(), GLUE_29(), sign_op::op(), and sign_op::set_op().

00393                   {
00394   if (x>0) return 1;
00395   if (x<0) return -1;
00396   return 0;
00397 }

vector<nat> mmx::signature ( const generic_function fun  )  [inline]

Definition at line 52 of file generic_function.hpp.

00052                                                            {
00053   return fun -> Signature (); }

static void mmx::signed_decompose ( const syntactic g,
syntactic abs_g,
int &  sgn_g 
) [static]

Definition at line 121 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().

00121                                                                     {
00122   if (is_atom (g)) {
00123     const string s= as_string (g);
00124     if (N(s) > 1 && s[0] == '-' &&
00125         (s[1] == '.' || (s[1] >= '0' && s[1] <= '9'))) {
00126       abs_g= syntactic (s (1, N(s)));
00127       sgn_g= -1;
00128     }
00129     else {
00130       abs_g= g;
00131       sgn_g= 1;
00132     }
00133   }
00134   else if (is_func (g, GEN_MINUS, 1)) {
00135     signed_decompose (g[1], abs_g, sgn_g);
00136     sgn_g= -sgn_g;
00137   }
00138   else if (is_func (g, GEN_TIMES, 2) || is_func (g, GEN_OVER, 2)) {
00139     syntactic a1, a2;
00140     int     s1, s2;
00141     signed_decompose (g[1], a1, s1);
00142     signed_decompose (g[2], a2, s2);
00143     if (is_func (g, GEN_TIMES, 2)) abs_g= a1 * a2;
00144     else abs_g= a1 / a2;
00145     sgn_g= s1 * s2;
00146   }
00147   else {
00148     abs_g= g;
00149     sgn_g= 1;
00150   }
00151 }

void simplify ( table< C, T, V > &  t  )  [inline]

Definition at line 174 of file table.hpp.

00174                                      {
00175   t.secure(); t.rep->simplify (); }

void simplify ( new_table< C, T, V > &  t  )  [inline]

Definition at line 196 of file new_table.hpp.

Referenced by binary_combine(), binary_map(), binary_map_scalar(), map(), reverse(), unary_map(), and unary_set_scalar().

00196                                      {
00197   t.secure(); t.rep->simplify (); }

vector<C,V> mmx::sin ( const vector< C, V > &  v  )  [inline]

Definition at line 1181 of file vector.hpp.

01181 { return unary_map<sin_op> (v); }

table<C,T,V> mmx::sin ( const table< C, T, V > &  t  )  [inline]

Definition at line 702 of file table.hpp.

00702 { return unary_map<sin_op> (t); }

syntactic sin ( const syntactic g  ) 

Definition at line 431 of file syntactic.cpp.

References GEN_SIN, and syn().

00431 { return syn (GEN_SIN, g); }

new_table<C,T,V> mmx::sin ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 773 of file new_table.hpp.

00773 { return unary_map<sin_op> (t); }

generic sin ( const generic x1  ) 

Definition at line 451 of file generic.cpp.

References ACC_SIN, ACC_UNARY, current_ev, and GEN_SIN.

00451                         {
00452   ACC_UNARY (ACC_SIN, x1);
00453   return current_ev->apply (GEN_SIN, x1);
00454 }

double sin ( const double &  x  )  [inline]

Definition at line 50 of file double.hpp.

Referenced by cos_sin(), cos_op::diff_op(), sin_op::op(), trig_op::op(), sin_op::op_init(), sin_op::set_op(), and trig().

00050 { return std::sin (x); }

syntactic sinh ( const syntactic g  ) 

Definition at line 437 of file syntactic.cpp.

References GEN_SH, and syn().

00437 { return syn (GEN_SH, g); }

generic sinh ( const generic x1  ) 

Definition at line 487 of file generic.cpp.

References ACC_SINH, ACC_UNARY, and exp().

00487                          {
00488   ACC_UNARY (ACC_SINH, x1);
00489   return (exp (x1) - exp (-x1)) / 2;
00490 }

double sinh ( const double &  x  )  [inline]

Definition at line 53 of file double.hpp.

References sinh().

00053 { return std::sinh (x); }

C mmx::sinh ( const C &  x  )  [inline]

Definition at line 591 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().

00591                                                 {
00592   return (exp (x) - exp (-x)) / promote (2, x); }

nat size ( const generic g  ) 

Definition at line 89 of file generic_utils.cpp.

References N(), n, and var_flatten().

Referenced by binary_size(), compare_sub(), cpp_demangle(), and shell_terminal_input().

00089                         {
00090   if (is<literal> (g)) return 1;
00091   if (is<compound> (g)) {
00092     nat i, n= N (g), sum= 1;
00093     for (i=0; i<n; i++)
00094       sum += size (g[i]);
00095     return sum;
00096   }
00097   return size (var_flatten (g));
00098 }

C mmx::skew_div ( const C &  x,
const C &  y,
bool  left = false 
) [inline]

Definition at line 276 of file defaults.hpp.

References left().

00276                                                     {
00277   (void) left; return x / y; }

C mmx::skew_quo ( const C &  x,
const C &  y,
bool  left = false 
) [inline]

Definition at line 279 of file defaults.hpp.

References left(), and quo().

00279                                                     {
00280   (void) left; return quo (x, y); }

C mmx::skew_rem ( const C &  x,
const C &  y,
bool  left = false 
) [inline]

Definition at line 282 of file defaults.hpp.

References left(), and rem().

00282                                                     {
00283   (void) left; return rem (x, y); }

format<T> mmx::slow ( const format< typename fast_helper< T >::fast_type > &  fm  )  [inline]

Definition at line 802 of file type_props.hpp.

References get_format(), and get_sample().

00802                                        {
00803   return get_format (slow<T> (get_sample (fm)));
00804 }

T mmx::slow ( const typename fast_helper< T >::fast_type &  x  )  [inline]

Definition at line 787 of file type_props.hpp.

Referenced by slow_op::op().

00787                              {
00788   return fast_helper<T>::uu (x);
00789 }

format<T> mmx::slow_as ( const format< F > &  fm  )  [inline]

Definition at line 807 of file type_props.hpp.

References get_format(), and get_sample().

00807                               {
00808   return get_format (slow_as<T,F> (get_sample (fm)));
00809 }

T mmx::slow_as ( const F &  x  )  [inline]

Definition at line 792 of file type_props.hpp.

00792                      {
00793   return fast_helper<T>::uu (x);
00794 }

int small_big_compare ( const generic g1,
const generic g2 
)

Definition at line 181 of file generic_utils.cpp.

References compare().

Referenced by operator<(), operator<=(), operator>(), and operator>=().

00181                                                          {
00182   return compare (g1, g2, 1);
00183 }

C mmx::smallest_cst ( const format< C > &  fm  )  [inline]

Definition at line 945 of file type_props.hpp.

References C, promote(), and set_smallest().

00945                                    {
00946   C r= promote (0, fm); set_smallest (r); return r; }

C mmx::smallest_cst (  )  [inline]

Definition at line 908 of file type_props.hpp.

References C, and set_smallest().

00908 { C r; set_smallest (r); return r; }

port socket_client_port ( const string host,
int  port 
)

Definition at line 159 of file socket_port.cpp.

References as_charp(), as_string(), error_port(), free_charp(), and socket_port().

Referenced by connect_to_server(), and GLUE_5().

00159                                                  {
00160   // getting host
00161   char* _host= as_charp (host);
00162   struct hostent *hp = gethostbyname (_host);
00163   free_charp (_host);
00164   if (hp == NULL) return error_port ("no connection for '" * host * "'");
00165 
00166   // creating socket
00167   int fd= socket (AF_INET, SOCK_STREAM, 0);
00168   if (fd < 0) return error_port ("socket could not be created");
00169 
00170   // connecting to socket
00171   struct sockaddr_in insock;
00172   string where= host * ":" * as_string (pnr);
00173   memset ((char*) &insock, 0, sizeof (insock));
00174   insock.sin_family = AF_INET;
00175   insock.sin_port = htons ((unsigned short) pnr);
00176   memcpy ((char*) &insock.sin_addr, hp->h_addr, hp->h_length);
00177   if (connect (fd, (struct sockaddr*) &insock, sizeof (insock)) < 0)
00178     return error_port ("refused connection to '" * where * "'");
00179 
00180   // testing whether it works
00181 #if defined(__MINGW__) || defined(__MINGW32__)
00182   unsigned long flags = -1;
00183   if (ioctlsocket (fd, FIONBIO, &flags) == SOCKET_ERROR)
00184     return error_port ("non working connection to '" * where * "'");
00185 #else
00186   int flags = O_NONBLOCK;
00187   if (fcntl (fd, F_SETFL, flags) < 0)
00188     return error_port ("non working connection to '" * where * "'");
00189 #endif
00190   return socket_port (host, pnr, 2, fd);
00191 }

port mmx::socket_port ( const string host,
int  pnr,
int  role,
int  fd 
)

Definition at line 88 of file socket_port.cpp.

Referenced by socket_port_rep::accept(), socket_client_port(), and socket_server_port().

00088                                                             {
00089   return (port_rep*) new socket_port_rep (host, pnr, role, fd);
00090 }

port socket_server_port ( const string host,
int  port 
)

Definition at line 97 of file socket_port.cpp.

References error_port(), and socket_port().

Referenced by GLUE_4().

00097                                                  {
00098   // get the server
00099   int fd;
00100   if ((fd = socket (PF_INET, SOCK_STREAM, 0)) == -1)
00101     return error_port ("call to 'socket' failed");
00102 
00103   // lose the pesky "address already in use" error message
00104 #if defined(__MINGW__) || defined(__MINGW32__)
00105   if (setsockopt (fd, SOL_SOCKET, SO_REUSEADDR, NULL, 0) == -1)
00106     return error_port ("call to 'setsockopt' failed");
00107 #else
00108   int yes= 1;
00109   if (setsockopt (fd, SOL_SOCKET, SO_REUSEADDR,
00110                   &yes, sizeof (int)) == -1)
00111     return error_port ("call to 'setsockopt' failed");
00112 #endif
00113 
00114   // bind
00115   struct sockaddr_in local_address;
00116   local_address.sin_family = AF_INET;
00117   local_address.sin_addr.s_addr = INADDR_ANY;
00118   local_address.sin_port = htons (pnr);
00119   memset (local_address.sin_zero, '\0', sizeof local_address.sin_zero);
00120   if (bind (fd, (struct sockaddr *) &local_address,
00121             sizeof (local_address)) == -1)
00122     return error_port ("call to 'bind' failed");
00123 
00124   // listen
00125   if (::listen (fd, 10) == -1)
00126     return error_port ("call to 'listen' failed");
00127   return socket_port (host, pnr, 0, fd);
00128 }

generic solve ( const generic x1,
const generic x2 
)

Definition at line 702 of file generic.cpp.

References current_ev, and GEN_SOLVE.

00702                                                      {
00703   return current_ev->apply (GEN_SOLVE, x1, x2); }

syntactic solve_lde_init ( const syntactic x,
const syntactic c 
)

Definition at line 504 of file syntactic.cpp.

References syn().

00504                                                                   {
00505   return syn ("solve_lde_init", x, c); }

generic solve_lde_init ( const generic x,
const generic c 
)

Definition at line 814 of file generic.cpp.

References current_ev.

Referenced by solve_matrix_lde_op::op_init(), and solve_vector_lde_op::op_init().

00814                                                               {
00815   return current_ev->apply ("solve_lde_init", x1, x2); }

void mmx::sort ( vector< T > &  v,
vector< nat > &  sigma 
) [inline]

Definition at line 79 of file vector_sort.hpp.

00079                                         {
00080   sort_leq<less_op> (v, sigma);
00081 }

void mmx::sort ( vector< T > &  v  )  [inline]

Definition at line 49 of file vector_sort.hpp.

00049                     {
00050   sort_leq<less_op> (v);
00051 }

list<C> mmx::sort ( const list< C > &  l,
int(*)(const C &, const C &)  cmp 
) [inline]

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().

00054                                                       {
00055   nat n= N(l);
00056   if (n <= 1) return l;
00057   List head, tail;
00058   split (l, n>>1, head, tail);
00059   head= sort (head, cmp);
00060   tail= sort (tail, cmp);
00061   return merge (head, tail, cmp);
00062 }

void mmx::sort_leq ( vector< T > &  v,
vector< nat > &  sigma 
) [inline]

Definition at line 68 of file vector_sort.hpp.

References car(), cdr(), CF(), N(), Pair, and T.

00068                                             {
00069   typedef pair<T,nat> Pair;
00070   vector<Pair> tmp_v (Pair(T(),0), N(v)), merge_buf (Pair(T(),0), N(v));
00071   for (nat i= 0; i < N(v); i++) tmp_v[i]= Pair (v[i], i);  
00072   sort_sub<sort_op_pair_wrapper<Op> > (tmp_v, 0, N(v), merge_buf);
00073   sigma= fill<nat> (N(v), CF(v));
00074   for (nat i= 0; i < N(v); i++) sigma[i]= cdr (tmp_v[i]);
00075   for (nat i= 0; i < N(v); i++) v[i]    = car (tmp_v[i]);
00076 }

void mmx::sort_leq ( vector< T > &  v  )  [inline]

Definition at line 43 of file vector_sort.hpp.

References CF(), and N().

00043                         {
00044   vector<T> merge_buf= fill<T> (N(v), CF(v)); 
00045   sort_sub<Op> (v, 0, N(v), merge_buf);
00046 }

static void mmx::sort_sub ( vector< T > &  a,
int  start,
int  end,
vector< T > &  merge_buf 
) [inline, static]

Definition at line 20 of file vector_sort.hpp.

References middle().

00020                                                                   {
00021   if (end-start <= 1) return;
00022   if (end-start == 2) {
00023     if (!Op::op (a[start], a[start+1])) {
00024       merge_buf[start]= a[start];
00025       a[start]= a[start+1];
00026       a[start+1]= merge_buf[start];
00027     }
00028     return;
00029   }
00030   int middle= (start+end)>>1; 
00031   sort_sub<Op> (a, start, middle, merge_buf);
00032   sort_sub<Op> (a, middle, end, merge_buf);
00033   int i,j,k;
00034   for (i=start, j=middle, k=start; (i<middle) && (j<end); )
00035     if (Op::op (a[i], a[j])) merge_buf[k++]= a[i++];
00036     else                     merge_buf[k++]= a[j++];
00037   j=k;
00038   while (i!=middle) a[k++]= a[i++];
00039   for (i=start; i<j; i++) a[i]= merge_buf[i];
00040 }

generic source_assign ( const generic g1,
const generic g2 
)

Definition at line 142 of file source_track.cpp.

References is_nil(), source_insert(), and source_locate().

00142                                                      {
00143   source_location l= source_locate (g2);
00144   if (!is_nil (l)) source_insert (g1, l);
00145   return g1;
00146 }

string source_begin ( const generic g  ) 

Definition at line 237 of file source_track.cpp.

References as_string(), source_column(), source_exists(), source_file(), and source_line().

00237                                 {
00238   if (!source_exists (g)) return "Unknown location";
00239   return source_file (g) * ":" *
00240          as_string (source_line (g, false)) * ":" *
00241          as_string (source_column (g, false));
00242 }

int source_column ( const generic g,
const bool &  last 
)

Definition at line 229 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().

00229                                                    {
00230   source_location l= source_locate (g);
00231   if (is_nil (l)) return 0;
00232   else if (last) return l.end.column;
00233   else return l.begin.column;
00234 }

void source_delete ( const generic g  ) 

Definition at line 129 of file source_track.cpp.

References reset(), and source_locs().

Referenced by source_extend().

00129                                  {
00130   reset (source_locs (), g);
00131 }

string source_end ( const generic g  ) 

Definition at line 245 of file source_track.cpp.

References as_string(), source_column(), source_exists(), source_file(), and source_line().

00245                               {
00246   if (!source_exists (g)) return "Unknown location";
00247   return source_file (g) * ":" *
00248          as_string (source_line (g, true)) * ":" *
00249          as_string (source_column (g, true));
00250 }

string source_error ( const string msg,
const generic where 
)

Definition at line 336 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().

00336                                                    {
00337   mmerr << ">>> g= " << g << "\n";
00338   string s;
00339   source_location l= source_locate (g);
00340   if (is_nil (l) && is<literal> (g))
00341     s << "Inside " << literal_to_string (g) << ": ";
00342   else if (is_nil (l))
00343     s << "Unknown location: ";
00344   else
00345     s << strip_directory (source_file (g)) << ":"
00346       << as_string (l.begin.line + 1) << ":" 
00347       << as_string (l.begin.column + 1) << ": ";
00348   s << msg << "\n"
00349     << source_underlined (g);
00350   return s;
00351 }

string source_exception ( const exception e  ) 

Definition at line 361 of file source_track.cpp.

References backtrace(), backtrace_depth, has_trace(), literal_to_string(), N(), source_error(), and trace_bottom().

Referenced by as_string(), and backtrace().

00361                                       {
00362   generic g= as<generic> (e);
00363   if (has_trace (g))
00364     return backtrace (trace_bottom (g, backtrace_depth));
00365   else {
00366     generic err= *e;
00367     if (is<literal> (err[1]))
00368       return source_error (literal_to_string (err[1]), err[N(err)-1]);
00369     else return source_error ("unknown", err[N(err)-1]);
00370   }
00371 }

bool source_exists ( const generic g  ) 

Definition at line 207 of file source_track.cpp.

References is_nil(), and source_locate().

Referenced by source_begin(), and source_end().

00207                                  {
00208   return !is_nil (source_locate (g));
00209 }

generic mmx::source_extend ( const generic &  g1,
const generic &  g2,
const generic &  g3 
) [inline]

Definition at line 155 of file source_track.hpp.

References source_extend().

00155                                                                         {
00156   return source_extend (source_extend (g1, g2), g3);
00157 }

generic source_extend ( const generic g1,
const generic g2 
)

Definition at line 149 of file source_track.cpp.

References source_location::obj, source_delete(), source_insert(), and source_locate().

Referenced by source_extend().

00149                                                      {
00150   //mmout << "source extending " << g1 << " with " << g2 <<"\n";
00151   source_location l;
00152   source_locate (g1, l);
00153   source_locate (g2, l);
00154   source_delete (g1);
00155   source_delete (g2);
00156   l.obj = g1;
00157   source_insert (g1, l);
00158   return g1;
00159 }

string source_file ( const generic g  ) 

Definition at line 212 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().

00212                                {
00213   source_location l= source_locate (g);
00214   if (is_nil (l)) return "";
00215   else if (l.file_name == "")
00216     return "input[" * as_string (l.input_number + 1) * "]";
00217   else return l.file_name;
00218 }

bool source_has_exact ( const generic g  ) 

Definition at line 202 of file source_track.cpp.

References contains(), and source_locs().

00202                                     {
00203   return (source_locs () -> contains (g));
00204 }

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_assign(), and source_extend().

00124                                                            {
00125   source_locs () [g] = l;
00126 }

int source_line ( const generic g,
const bool &  last 
)

Definition at line 221 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().

00221                                                  {
00222   source_location l= source_locate (g);
00223   if (is_nil (l)) return 0;
00224   else if (last) return l.end.line;
00225   else return l.begin.line;
00226 }

generic source_link ( const generic g,
const generic h,
const generic kind 
)

Definition at line 134 of file source_track.cpp.

References contains(), and source_locs().

00134                                                                         {
00135   (void) kind;
00136   table<source_location, generic, gen_eq_table>& t= source_locs ();
00137   if (!contains (t, g1) && contains (t, g2)) t[g1] = t[g2];
00138   return g1;
00139 }

source_location source_locate ( const generic g  ) 

Definition at line 191 of file source_track.cpp.

References source_locate().

00191                                  {
00192   source_location l;
00193   source_locate (g, l);
00194   return l;
00195 }

void source_locate ( const generic g,
source_location l 
)

Definition at line 166 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_assign(), source_column(), source_error(), source_exists(), source_extend(), source_file(), source_line(), source_locate(), source_string(), source_string_unindented(), and source_underlined().

00166                                                      {
00167   // mmout << "source_locate: " << g << " @ " << inside (g) << "\n";
00168   source_location arg_l = l;
00169   if (source_locs () -> contains (g)) {
00170     source_location l1 = read (source_locs (), g);
00171     if (is_nil (l))
00172       l = l1;
00173     else 
00174       if (!is_nil (l1)) {
00175         l.obj = l1.obj;
00176         if (l.file_name == l1.file_name && l.input_number == l1.input_number) {
00177           l.begin = min (l.begin, l1.begin);
00178           l.end = max (l.end, l1.end);
00179         }
00180         // If the location is not 'connected', we leave l unchanged. 
00181       }
00182     return;
00183   }
00184   if (is<compound> (g))
00185     for (nat i=0; i<N(g); i++)
00186       source_locate (g[i], l);
00187   l.obj = g;
00188 }

table<source_location, generic, gen_eq_table>& mmx::source_locs (  ) 
string source_string ( const generic g  ) 

Definition at line 253 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().

00253                                  {
00254   source_location l= source_locate (g);
00255   if (is_nil (l)) return "";
00256   else {
00257     string src= get_source (l.file_name, l.input_number);
00258     return src (l.begin.position, l.end.position);
00259   }
00260 }

string source_string_unindented ( const generic g  ) 

Definition at line 263 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().

00263                                             {
00264   source_location l= source_locate (g);
00265   if (is_nil (l)) return "";
00266   else {
00267     string src= get_source (l.file_name, l.input_number);
00268     string sub= src (l.begin.position, l.end.position);
00269     string bis= repeated (" ", l.begin.column) * sub;
00270     return add_indentation (bis, -((int) get_indentation (bis)));
00271   }
00272 }

string source_underlined ( const generic g  ) 

Definition at line 329 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().

00329                                      {
00330   source_location l= source_locate (g);
00331   if (is_nil (l)) return "";
00332   else return underlined (l.file_name, l.input_number, l.begin, l.end);
00333 }

static string mmx::spaces ( nat  indent  )  [static]

Definition at line 493 of file mmx_texmacs.cpp.

References s.

Referenced by scheme_to_tm().

00493                     {
00494   string s;
00495   for (nat i=0; i<indent; i++)
00496     s << " ";
00497   return s;
00498 }

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 343 of file sparse_vector.hpp.

00343                                                                               {
00344   return _mul_add<mul_op> (v1, v2, x); }

generic specialize ( const generic x1,
const generic x2 
)

Definition at line 848 of file generic.cpp.

References current_ev.

00848                                                           {
00849   return current_ev->apply ("specialize", x1, x2); }

generic specialize_alias ( const generic a  ) 

Definition at line 60 of file alias.cpp.

References alias_specializer(), as(), get_alias(), and type().

00060                                     {
00061   generic val= get_alias (as<alias<generic> > (a));
00062   routine r;
00063   alias_specializer (type (val), r);
00064   return r->apply (a);
00065 }

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().

00154                                            {
00155   return g->get_species_type (); }

void mmx::split ( const list< C > &  l,
nat  n,
list< C > &  head,
list< C > &  tail 
) [inline]

head := copy (l[0..n-1]), tail := copy (l[n..N (l)-1]).

Definition at line 27 of file list_sort.hpp.

References car(), cdr(), cons(), and List.

Referenced by sort().

00027                                                      {
00028   if (n == 0) {
00029     head= List ();
00030     tail= l;
00031   }
00032   else {
00033     split (cdr (l), n-1, head, tail);
00034     head= cons (car (l), head);
00035   }
00036 }

vector<C,V> mmx::sqrt ( const vector< C, V > &  v  )  [inline]

Definition at line 1177 of file vector.hpp.

01177 { return unary_map<sqrt_op> (v); }

table<C,T,V> mmx::sqrt ( const table< C, T, V > &  t  )  [inline]

Definition at line 698 of file table.hpp.

00698 { return unary_map<sqrt_op> (t); }

syntactic sqrt ( const syntactic g  ) 

Definition at line 427 of file syntactic.cpp.

References GEN_SQRT, and syn().

00427 { return syn (GEN_SQRT, g); }

new_table<C,T,V> mmx::sqrt ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 769 of file new_table.hpp.

00769 { return unary_map<sqrt_op> (t); }

generic sqrt ( const generic x1  ) 

Definition at line 427 of file generic.cpp.

References ACC_SQRT, ACC_UNARY, current_ev, and GEN_SQRT.

00427                          {
00428   ACC_UNARY (ACC_SQRT, x1);
00429   return current_ev->apply (GEN_SQRT, x1);
00430 }

double sqrt ( const double &  x  )  [inline]
syntactic sqrt_init ( const syntactic x,
const syntactic c 
)

Definition at line 489 of file syntactic.cpp.

References syn().

00489                                                              {
00490   return syn ("sqrt_init", x, c); }

generic sqrt_init ( const generic x,
const generic c 
)

Definition at line 802 of file generic.cpp.

References current_ev.

Referenced by sqrt_op::op_init().

00802                                                          {
00803   return current_ev->apply ("sqrt_init", x1, x2); }

syntactic square ( const syntactic g  ) 

Definition at line 280 of file syntactic.cpp.

References GEN_POWER, and syn().

00280                             {
00281   return syn (GEN_POWER, g, syntactic (2));
00282 }

generic square ( const generic x1  ) 

Definition at line 370 of file generic.cpp.

References ACC_SQUARE, ACC_UNARY, current_ev, and GEN_TIMES.

00370                            {
00371   ACC_UNARY (ACC_SQUARE, x1);
00372   return current_ev->apply (GEN_TIMES, x1, x1);
00373 }

double square ( const double &  x  )  [inline]

Definition at line 126 of file double.hpp.

00126 { return x * x; }

C mmx::square ( const C &  x  )  [inline]
bool mmx::starts ( const string obj->lex_string,
const string what 
)

Definition at line 344 of file string.cpp.

References N(), and s.

00344                                              {
00345   return N(s) >= N(what) && s (0, N(what)) == what;
00346 }

bool mmx::starts ( const string &  s,
const string &  what 
)
generic std_exception ( const string msg,
const generic a,
const generic w 
)

Definition at line 25 of file exception.cpp.

References flatten_as_mmx(), gen(), and GEN_EXCEPTION.

00025                                                                           {
00026   exception exc (gen (GEN_EXCEPTION, msg * flatten_as_mmx (a), where));
00027   return as<generic> (exc);
00028 }

generic std_exception ( const string msg,
const generic where 
)

Definition at line 20 of file exception.cpp.

References gen(), and GEN_EXCEPTION.

Referenced by type_mismatch(), and wrong_nr_args().

00020                                                         {
00021   return as<generic> (exception (gen (GEN_EXCEPTION, msg, where)));
00022 }

void store_file_source ( const string file_name,
const string data 
)

Definition at line 66 of file source_track.cpp.

References file_sources, and tokenize().

Referenced by mmc_parse().

00066                                                                 {
00067   file_sources [file_name] = tokenize (data, "\n");
00068 }

void mmx::store_interactive_number ( nat(obj->lex_length)   ) 

Definition at line 34 of file source_track.cpp.

References ASSERT, interactive_sources, N(), and range().

00034                                  {
00035   ASSERT (n <= N(interactive_sources), "input number out of range");
00036   interactive_sources= range (interactive_sources, 0, n);
00037 }

void mmx::store_interactive_number ( nat  n  ) 

Referenced by shell_load_session().

void mmx::store_interactive_source ( const string data,
nat(obj->lex_length)   
)

Definition at line 45 of file source_track.cpp.

References ASSERT, get_interactive_number(), interactive_sources, and tokenize().

00045                                                      {
00046   ASSERT (n <= get_interactive_number (), "input number out of range");
00047   vector<string> v= tokenize (data, "\n");
00048   if (n == get_interactive_number ()) interactive_sources << v;
00049   else interactive_sources[n]= v;
00050 }

void mmx::store_interactive_source ( const string &  data,
nat  n = get_interactive_number() 
)
iterator<S> mmx::strict_range ( const S &  start,
const T &  end 
) [inline]

Definition at line 359 of file iterator.hpp.

References range_iterator().

00359                                             {
00360   return range_iterator (start, outplace_set_as<S> (end),
00361                          outplace_set_as<S> (1), true);
00362 }

int mmx::string_as_charcode ( const string &  s  )  [inline]

Definition at line 146 of file string.hpp.

References ASSERT, and N().

Referenced by GLUE_23().

00146                                                 {
00147   ASSERT (N(s) == 1, "single character expected");
00148   return (int) s[0]; }

literal mmx::string_as_literal ( const string s  )  [inline]

Definition at line 60 of file mmc_glue.hpp.

00060                                     {
00061   return literal (s);
00062 }

string mmx::string_as_mmx ( const string obj->lex_string  ) 

Definition at line 989 of file mmx_printer.cpp.

00989                                 {
00990   //if (math_mode) { ... }
00991   return s;
00992 }

string string_as_mmx ( const string &  s  ) 

Referenced by operator<<().

C mmx::string_as_numeric ( const string &  s  )  [inline]

Definition at line 214 of file string.hpp.

References C.

00214                                     {
00215   C val;
00216   (void) string_to_numeric<C> (s, val);
00217   return val;
00218 }

void mmx::string_to_floating ( const string obj->lex_string,
C &  val,
const char *  fm 
) [inline]

Definition at line 227 of file string.cpp.

References inside(), max(), and N().

Referenced by string_to_numeric().

00227                                                              {
00228   nat n= max (N(s), (nat) 39);
00229   char buffer[40];
00230   strncpy (buffer, inside (s, 0), n);
00231   buffer [n]= '\0';
00232   sscanf (buffer, fm, &val);
00233 }

bool mmx::string_to_numeric ( const string obj->lex_string,
long double &  x 
) [inline]

Definition at line 247 of file string.cpp.

References is_floating_string(), and string_to_floating().

00247                                                                {
00248   string_to_floating (s, x, "%Lf");
00249   return is_floating_string (s); }

bool mmx::string_to_numeric ( const string obj->lex_string,
double &  x 
) [inline]

Definition at line 244 of file string.cpp.

References is_floating_string(), and string_to_floating().

00244                                                           {
00245   string_to_floating (s, x, "%lf");
00246   return is_floating_string (s); }

bool mmx::string_to_numeric ( const string obj->lex_string,
float &  x 
) [inline]

Definition at line 241 of file string.cpp.

References is_floating_string(), and string_to_floating().

00241                                                          {
00242   string_to_floating (s, x, "%f");
00243   return is_floating_string (s); }

bool mmx::string_to_numeric ( const string &  s,
long double &  val 
) [inline]
bool mmx::string_to_numeric ( const string &  s,
double &  val 
) [inline]
bool mmx::string_to_numeric ( const string &  s,
float &  val 
) [inline]
bool mmx::string_to_numeric ( const string &  s,
C &  val 
) [inline]

Definition at line 171 of file string.hpp.

References C, N(), and n.

00171                                             {
00172   nat i= 0, n= N(s);
00173   val= 0;
00174   if (n == 0) return false;
00175   C eps= 1;
00176   bool ok= true;
00177   if (s[0] == '-') {
00178     i++;
00179     eps= -1;
00180     if (eps > 0) ok= false;
00181   }
00182   if (i == n) return false;
00183   while (i < n) {
00184     if (s[i] < '0' || s[i] > '9') return false;
00185     C c= (C) (s[i] - '0');
00186     C r= 10 * val + (eps * c);
00187     if (val != (r / 10)) ok= false;
00188     val= r;
00189   }
00190   return ok;
00191 }

string strip_directory ( const string name  ) 

Definition at line 443 of file system.cpp.

References N().

Referenced by recursive_search_name(), and source_error().

00443                                      {
00444   if (N(name) == 1 && name[0] == '/') return name;
00445   for (int i= N(name)-1; i>=0; i--)
00446     if (name[i]=='/')
00447       return name (i+1, N(name));
00448   return name;
00449 }

string strip_extension ( const string name  ) 

Definition at line 452 of file system.cpp.

References N().

00452                                      {
00453   for (int i= N(name)-1; i>=0; i--)
00454     if (name[i]=='.')
00455       return name (0, i);
00456     else if (name[i]=='/')
00457       return name;
00458   return name;
00459 }

static string mmx::strip_preamble ( const string s  )  [static]

Definition at line 73 of file mmc_glue.cpp.

References N(), and s.

Referenced by mmc_parse().

00073                                  {
00074   string preamble= "#!/usr/bin/env mmx-light\n";
00075   if (N(s) >= N(preamble) && s (0, N(preamble)) == preamble)
00076     return s (N(preamble)-1, N(s));
00077   return s;
00078 }

void mmx::sub ( R &  x,
const C1 &  y1,
const C2 &  y2 
) [inline]

Definition at line 56 of file operators.hpp.

Referenced by lsub_op::set_op(), rsub_op::set_op(), sub_op::set_op(), and source_string_unindented().

00056 { x= y1 - y2; }

T mmx::sub_operator ( const T &  x,
const T &  y 
) [inline]

Definition at line 32 of file operators.hpp.

00032 { return x-y; }

generic substitute ( const generic x1,
const generic x2 
)

Definition at line 696 of file generic.cpp.

References current_ev, and GEN_SUBSTITUTE.

00696                                                           {
00697   return current_ev->apply (GEN_SUBSTITUTE, x1, x2); }

vector<C,V> mmx::sup ( const vector< C, V > &  v,
const vector< C, V > &  w 
) [inline]

Definition at line 1126 of file vector.hpp.

01126                                                    {
01127   return binary_map<sup_op> (v, w); }

table<C,T,V> mmx::sup ( const table< C, T, V > &  t,
const table< C, T, V > &  u 
) [inline]

Definition at line 641 of file table.hpp.

00641                                                        {
00642   return binary_map<sup_op,C,T,V> (t, u); }

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 271 of file sparse_vector.hpp.

00271                                                      {
00272   return binary_map<sup_op,C,T,V> (t, u); }

new_table<C,T,V> mmx::sup ( const new_table< C, T, V > &  t,
const new_table< C, T, V > &  u 
) [inline]

Definition at line 712 of file new_table.hpp.

00712                                                        {
00713   return binary_map<sup_op,C,T,V> (t, u); }

C mmx::sup ( const C &  x,
const C &  y 
) [inline]

Definition at line 480 of file defaults.hpp.

References max().

Referenced by sup_op::op(), and sup_op::set_op().

00480 { return max (x, y); }

bool mmx::supports_color (  ) 

Definition at line 25 of file formatting_port.cpp.

References color_mode, get_env(), and texmacs_mode.

Referenced by formatting_port_rep::format().

00025                   {
00026   static bool terminal_supports_color=
00027     get_env ("TERM") == string ("xterm") ||
00028     get_env ("TERM") == string ("xterm-color") ||
00029     get_env ("TERM") == string ("xterm-256color");
00030   return terminal_supports_color && !texmacs_mode && color_mode;
00031 }

void mmx::swap ( C &  x,
C &  y 
) [inline]

Definition at line 755 of file defaults.hpp.

References C.

Referenced by heap_rep< C >::correct_downwards(), and heap_rep< C >::correct_upwards().

00755                   {
00756   C temp= x;
00757   x= y;
00758   y= temp;
00759 }

nat mmx::symbolic_type ( const generic &  g  )  [inline]

Definition at line 152 of file generic.hpp.

00152                                             {
00153   return g->get_symbolic_type (); }

C mmx::sympow ( const C &  c,
const ZZ &  i 
) [inline]

Definition at line 559 of file defaults.hpp.

References invert(), pow(), promote(), and square().

00559                                  {
00560   switch (i) {
00561   case -2: return invert (square (c));
00562   case -1: return invert (c);
00563   case  0: return promote (1, c);
00564   case  1: return c;
00565   case  2: return square (c);
00566   case  3: return c * square (c);
00567   case  4: return square (square (c));
00568   default: return pow (c, i);
00569   }
00570 }

syntactic mmx::syn ( const generic &  f,
const vector< syntactic > &  a 
) [inline]

Definition at line 134 of file syntactic.hpp.

References as_syntactic(), and gen().

00134                                                                     {
00135   const vector<generic>* ptr= (vector<generic>*) ((void*) (&a));
00136   return as_syntactic (gen (f, *ptr)); }

syntactic mmx::syn ( const generic &  f,
const syntactic &  a1,
const syntactic &  a2,
const syntactic &  a3,
const syntactic &  a4 
) [inline]

Definition at line 130 of file syntactic.hpp.

References as_syntactic(), and gen().

00132                                                                 {
00133   return as_syntactic (gen (f, *a1, *a2, *a3, *a4)); }

syntactic mmx::syn ( const generic &  f,
const syntactic &  a1,
const syntactic &  a2,
const syntactic &  a3 
) [inline]

Definition at line 127 of file syntactic.hpp.

References as_syntactic(), and gen().

00128                                                                 {
00129   return as_syntactic (gen (f, *a1, *a2, *a3)); }

syntactic mmx::syn ( const generic &  f,
const syntactic &  a1,
const syntactic &  a2 
) [inline]

Definition at line 124 of file syntactic.hpp.

References as_syntactic(), and gen().

00125                                            {
00126   return as_syntactic (gen (f, *a1, *a2)); }

syntactic mmx::syn ( const generic &  f,
const syntactic &  a1 
) [inline]

Definition at line 122 of file syntactic.hpp.

References as_syntactic(), and gen().

00122                                                              {
00123   return as_syntactic (gen (f, *a1)); }

syntactic mmx::syn ( const generic &  f  )  [inline]

Definition at line 120 of file syntactic.hpp.

References as_syntactic(), and gen().

00120                                         {
00121   return as_syntactic (gen (f)); }

syntactic mmx::syn ( const char *  f,
const vector< syntactic > &  a 
) [inline]

Definition at line 116 of file syntactic.hpp.

References as_syntactic(), and gen().

00116                                                                  {
00117   const vector<generic>* ptr= (vector<generic>*) ((void*) (&a));
00118   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 112 of file syntactic.hpp.

References as_syntactic(), and gen().

00114                                                                 {
00115   return as_syntactic (gen (generic (f), *a1, *a2, *a3, *a4)); }

syntactic mmx::syn ( const char *  f,
const syntactic &  a1,
const syntactic &  a2,
const syntactic &  a3 
) [inline]

Definition at line 109 of file syntactic.hpp.

References as_syntactic(), and gen().

00110                                                                 {
00111   return as_syntactic (gen (generic (f), *a1, *a2, *a3)); }

syntactic mmx::syn ( const char *  f,
const syntactic &  a1,
const syntactic &  a2 
) [inline]

Definition at line 106 of file syntactic.hpp.

References as_syntactic(), and gen().

00107                                            {
00108   return as_syntactic (gen (generic (f), *a1, *a2)); }

syntactic mmx::syn ( const char *  f,
const syntactic &  a1 
) [inline]

Definition at line 104 of file syntactic.hpp.

References as_syntactic(), and gen().

00104                                                           {
00105   return as_syntactic (gen (generic (f), *a1)); }

syntactic mmx::syn ( const char *  f  )  [inline]

Definition at line 102 of file syntactic.hpp.

References as_syntactic(), and gen().

00102                                      {
00103   return as_syntactic (gen (generic (f))); }

syntactic mmx::syn ( const syntactic &  f,
const vector< syntactic > &  a 
) [inline]

Definition at line 98 of file syntactic.hpp.

References as_syntactic(), and gen().

00098                                                                       {
00099   const vector<generic>* ptr= (vector<generic>*) ((void*) (&a));
00100   return as_syntactic (gen (*f, *ptr)); }

syntactic mmx::syn ( const syntactic &  f,
const syntactic &  a1,
const syntactic &  a2,
const syntactic &  a3,
const syntactic &  a4 
) [inline]

Definition at line 94 of file syntactic.hpp.

References as_syntactic(), and gen().

00096                                                                 {
00097   return as_syntactic (gen (*f, *a1, *a2, *a3, *a4)); }

syntactic mmx::syn ( const syntactic &  f,
const syntactic &  a1,
const syntactic &  a2,
const syntactic &  a3 
) [inline]

Definition at line 91 of file syntactic.hpp.

References as_syntactic(), and gen().

00092                                                                 {
00093   return as_syntactic (gen (*f, *a1, *a2, *a3)); }

syntactic mmx::syn ( const syntactic &  f,
const syntactic &  a1,
const syntactic &  a2 
) [inline]

Definition at line 88 of file syntactic.hpp.

References as_syntactic(), and gen().

00089                                            {
00090   return as_syntactic (gen (*f, *a1, *a2)); }

syntactic mmx::syn ( const syntactic &  f,
const syntactic &  a1 
) [inline]

Definition at line 86 of file syntactic.hpp.

References as_syntactic(), and gen().

00086                                                                {
00087   return as_syntactic (gen (*f, *a1)); }

syntactic mmx::syn ( const syntactic &  f  )  [inline]
string sysconf_dir (  ) 

Definition at line 245 of file system.cpp.

References _from_dos_to_unix(), eval_system(), get_env(), and prefix_dir().

00245                {
00246   string dir= get_env ("MMX_SYSCONF_DIR");
00247 #if defined(__MINGW__) || defined(__MINGW32__)
00248   if (dir == "") {
00249     try { dir= eval_system ("basix-config --sysconfdir"); }
00250     catch (const exception&) { dir= prefix_dir () * "/etc"; } 
00251   }
00252 #else
00253   if (dir == "") dir= eval_system ("basix-config --sysconfdir");
00254 #endif
00255   return _from_dos_to_unix (dir);
00256 }

int mmx::system ( const string obj->lex_string  ) 

Definition at line 156 of file system.cpp.

References as_charp(), free_charp(), and system().

00156                          {
00157   //mmout << "system: " << s << "\n";
00158   char* _s= as_charp (s);
00159   int r= ::system (_s);
00160   free_charp (_s);
00161   return r;
00162 }

int mmx::system ( const string s  ) 
bool mmx::table_contains ( const table< D, generic > &  t,
const generic x,
const generic y 
) [inline]

Definition at line 370 of file mmc_glue.hpp.

References gen(), and GEN_TUPLE.

00371                                                     {
00372   return t->contains (gen (GEN_TUPLE, x, y));
00373 }

bool mmx::table_contains ( const table< D, generic > &  t,
const generic x 
) [inline]

Definition at line 345 of file mmc_glue.hpp.

00345                                                              {
00346   return t->contains (x);
00347 }

iterator<generic> mmx::table_explode ( const table< D, generic > &  t  )  [inline]

Definition at line 340 of file mmc_glue.hpp.

References entries().

00340                                           {
00341   return entries (t);
00342 }

table<D,generic> mmx::table_new ( const D &  x  )  [inline]

Definition at line 330 of file mmc_glue.hpp.

00330                        {
00331   return table<D,generic> (x, 1);
00332 }

D mmx::table_read ( const table< D, generic > &  t,
const generic x,
const generic y 
) [inline]

Definition at line 381 of file mmc_glue.hpp.

References gen(), and GEN_TUPLE.

00381                                                                            {
00382   return t[gen (GEN_TUPLE, x, y)];
00383 }

D mmx::table_read ( const table< D, generic > &  t,
const generic x 
) [inline]

Definition at line 355 of file mmc_glue.hpp.

00355                                                          {
00356   return t[x];
00357 }

void mmx::table_reset ( const table< D, generic > &  t,
const generic x,
const generic y 
) [inline]

Definition at line 376 of file mmc_glue.hpp.

References gen(), GEN_TUPLE, inside(), and reset().

00376                                                                             {
00377   return inside (t) -> reset (gen (GEN_TUPLE, x, y));
00378 }

void mmx::table_reset ( table< D, generic > &  t,
const generic x 
) [inline]

Definition at line 350 of file mmc_glue.hpp.

References reset().

00350                                                     {
00351   reset (t, x);
00352 }

void mmx::table_set ( const table< D, generic > &  t,
const generic x,
const generic y,
const D &  v 
) [inline]

Definition at line 391 of file mmc_glue.hpp.

References gen(), GEN_TUPLE, and inside().

00392                        {
00393   inside (t) -> set (gen (GEN_TUPLE, x, y)) = v;
00394 }

void mmx::table_set ( const table< D, generic > &  t,
const generic x,
const D &  v 
) [inline]

Definition at line 365 of file mmc_glue.hpp.

References inside().

00365                                                                     {
00366   inside (t) -> set (x) = v;
00367 }

int mmx::table_size ( const table< D, generic > &  t  )  [inline]

Definition at line 335 of file mmc_glue.hpp.

References N().

00335                                        {
00336   return (int) N(t);
00337 }

D& mmx::table_write ( table< D, generic > &  t,
const generic x,
const generic y 
) [inline]

Definition at line 386 of file mmc_glue.hpp.

References gen(), and GEN_TUPLE.

00386                                                                       {
00387   return t[gen (GEN_TUPLE, x, y)];
00388 }

D& mmx::table_write ( table< D, generic > &  t,
const generic x 
) [inline]

Definition at line 360 of file mmc_glue.hpp.

00360                                                     {
00361   return t[x];
00362 }

vector<C,V> mmx::tan ( const vector< C, V > &  v  )  [inline]

Definition at line 1182 of file vector.hpp.

01182 { return unary_map<tan_op> (v); }

table<C,T,V> mmx::tan ( const table< C, T, V > &  t  )  [inline]

Definition at line 703 of file table.hpp.

00703 { return unary_map<tan_op> (t); }

syntactic tan ( const syntactic g  ) 

Definition at line 432 of file syntactic.cpp.

References GEN_TAN, and syn().

00432 { return syn (GEN_TAN, g); }

new_table<C,T,V> mmx::tan ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 774 of file new_table.hpp.

00774 { return unary_map<tan_op> (t); }

generic tan ( const generic x1  ) 

Definition at line 457 of file generic.cpp.

References ACC_TAN, ACC_UNARY, current_ev, and GEN_TAN.

00457                         {
00458   ACC_UNARY (ACC_TAN, x1);
00459   return current_ev->apply (GEN_TAN, x1);
00460 }

double tan ( const double &  x  )  [inline]

Definition at line 51 of file double.hpp.

Referenced by tan_op::op(), tan_op::op_init(), and tan_op::set_op().

00051 { return std::tan (x); }

syntactic tanh ( const syntactic g  ) 

Definition at line 438 of file syntactic.cpp.

References GEN_TH, and syn().

00438 { return syn (GEN_TH, g); }

generic tanh ( const generic x1  ) 

Definition at line 493 of file generic.cpp.

References ACC_TANH, ACC_UNARY, and exp().

00493                          {
00494   ACC_UNARY (ACC_TANH, x1);
00495   return (exp (x1) - exp (-x1)) / (exp (x1) + exp (-x1));
00496 }

double tanh ( const double &  x  )  [inline]

Definition at line 54 of file double.hpp.

References tanh().

00054 { return std::tanh (x); }

C mmx::tanh ( const C &  x  )  [inline]

Definition at line 593 of file defaults.hpp.

References exp().

Referenced by tanh_op::op(), tanh_op::op_init(), tanh_op::set_op(), and tanh().

00593                                                 {
00594   return (exp (x) - exp (-x)) / (exp (x) + exp (-x)); }

void mmx::term_threads (  ) 

Definition at line 223 of file threads.cpp.

00223 {}

routine mmx::ternary_routine ( const generic name,
D(*)(const S1 &, const S2 &, const S3 &)  f 
) [inline]

Definition at line 315 of file routine.hpp.

Referenced by define().

00316                                                            {
00317   return new ternary_routine_rep<D,S1,S2,S3> (name, f);
00318 }

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.

00065                                                   {
00066   RESTORE_START;
00067   while ((*k)!='\0') {
00068     if (pos>=n) return false;
00069     if (s[pos]!=(*k)) return false;
00070     INC_POS;
00071     k++;
00072   }
00073   if (pos>=n) return true;
00074   if (is_alpha (s[pos])) return false;
00075   return true;
00076 }

void texmacs_command ( const string cmd  ) 

Definition at line 36 of file mmx_texmacs.cpp.

References texmacs_pending.

Referenced by texmacs_dynamic_event().

00036                                     {
00037   texmacs_pending << " " << cmd << "\n";
00038 }

void texmacs_dynamic_event ( const string id,
const generic val 
)

Definition at line 52 of file mmx_texmacs.cpp.

References as_generic(), as_texmacs_snippet(), flatten(), mmout, texmacs_command(), and texmacs_flush_commands().

Referenced by shell_texmacs_initialize().

00052                                                              {
00053   string v= as_texmacs_snippet (as_generic (flatten (val)));
00054   texmacs_command ("(locus-set \"" * id * "\" '" * v * ")");
00055   mmout << texmacs_flush_commands ();
00056 }

generic texmacs_expand ( const generic g  ) 

Definition at line 398 of file mmx_texmacs.cpp.

References gen(), is_func(), literal_to_string(), N(), and starts().

Referenced by serialize().

00398                                   {
00399   if (is_func (g, "tm$with"))
00400     return texmacs_expand (g[N(g)-1]);
00401   else if (is_func (g, "tm$itemize", 1) || is_func (g, "tm$enumerate", 1))
00402     return gen ("$indent", texmacs_expand (g[1]));
00403   else if (is_func (g, "tm$item", 0))
00404     return generic ("* ");
00405   else if (is_func (g, "tm$folded", 2))
00406     return gen ("$varindent",
00407                 gen ("$concat",
00408                      generic ("o "), texmacs_expand (g[1])));
00409   else if (is_func (g, "tm$unfolded", 2))
00410     return gen ("$varindent",
00411                 gen ("$concat",
00412                      generic ("* "), texmacs_expand (g[1]),
00413                      generic ("$lf"), texmacs_expand (g[2])));
00414   else if (is_func (g, "tm$folded-explain", 2))
00415     return texmacs_expand (g[1]);
00416   else if (is_func (g, "tm$unfolded-explain", 2))
00417     return gen ("$concat", texmacs_expand (g[1]),
00418                 generic ("$lf"), generic ("$lf"), texmacs_expand (g[2]));
00419   else if (is_func (g, "tm$explain", 2))
00420     return gen ("$concat", texmacs_expand (g[1]), generic ("$lf"),
00421                 gen ("$indent", texmacs_expand (g[2])));
00422   else if (is_func (g, "tm$explain-synopsis", 1))
00423     return gen ("$concat", generic (" --- "), texmacs_expand (g[1]));
00424   else if (is<compound> (g)) {
00425     vector<generic> v;
00426     for (nat i=1; i<N(g); i++) v << texmacs_expand (g[i]);
00427     if (is<literal> (g[0]) && starts (literal_to_string (g[0]), "tm$")) {
00428       if (N(v) == 1) return v[0];
00429       else return gen ("$concat", v);
00430     }
00431     else return gen (g[0], v);
00432   }
00433   else return g;
00434 }

string texmacs_flush_commands (  ) 

Definition at line 41 of file mmx_texmacs.cpp.

References DATA_BEGIN, DATA_END, s, and texmacs_pending.

Referenced by shell_texmacs_input(), and texmacs_dynamic_event().

00041                           {
00042   if (texmacs_pending == "") return "";
00043   string s=
00044     string (DATA_BEGIN) *
00045     "command:(begin" * texmacs_pending * ")" *
00046     string (DATA_END);
00047   texmacs_pending= "";
00048   return s;
00049 }

static table<generic,generic> mmx::texmacs_symbol_table (  )  [static]

Definition at line 100 of file mmx_texmacs.cpp.

References init().

Referenced by as_texmacs().

00100                         {
00101   table<generic,generic> t;
00102 
00103   init (t, "/\\", "tm$wedge");
00104   init (t, "mathcatalan", "tm$mathcatalan");
00105   init (t, "@", "tm$circ");
00106   init (t, "><", "tm$join");
00107   init (t, "derivative", "D");
00108   init (t, "mathe", "tm$mathe");
00109   init (t, "<=>", "tm$Leftrightarrow");
00110   init (t, "matheuler", "tm$matheuler");
00111   init (t, ">", "tm$gtr");
00112   init (t, ">=", "tm$geqslant");
00113   init (t, ">>", "tm$gg");
00114   init (t, "mathi", "tm$mathi");
00115   init (t, "=>", "tm$Rightarrow");
00116   init (t, "Infty", "tm$infty");
00117   init (t, "->", "tm$rightarrow");
00118   init (t, "<", "tm$less");
00119   init (t, "<=", "tm$leqslant");
00120   init (t, "<<", "tm$ll");
00121   init (t, ":->", "tm$mapsto");
00122   init (t, ".!", "!");
00123   init (t, "!", "tm$neg");
00124   init (t, "\\/", "tm$vee");
00125   init (t, "partial", "tm$partial");
00126   init (t, "mathpi", "tm$mathpi");
00127   init (t, ".'", "'");
00128   init (t, ".`", "`");
00129   init (t, "..", "tm$ldots");
00130   init (t, "::", "tm$colons");
00131   init (t, ":>", "tm$transtype");
00132   init (t, "!=", "tm$neq");
00133   init (t, "|", "|");
00134   init (t, "||", "tm$||");
00135   init (t, "xor", "tm$veebar");
00136   init (t, ":=", "tm$assign");
00137   init (t, "+=", "tm$plusassign");
00138   init (t, "-=", "tm$minusassign");
00139   init (t, "*=", "tm$astassign");
00140   init (t, "/=", "tm$overassign");
00141 
00142   init (t, "alpha", "tm$alpha");
00143   init (t, "beta", "tm$beta");
00144   init (t, "gamma", "tm$gamma");
00145   init (t, "delta", "tm$delta");
00146   init (t, "epsilon", "tm$varepsilon");
00147   init (t, "zeta", "tm$zeta");
00148   init (t, "eta", "tm$eta");
00149   init (t, "theta", "tm$theta");
00150   init (t, "iota", "tm$iota");
00151   init (t, "kappa", "tm$kappa");
00152   init (t, "lambda", "tm$lambda");
00153   init (t, "mu", "tm$mu");
00154   init (t, "nu", "tm$nu");
00155   init (t, "xi", "tm$xi");
00156   init (t, "omicron", "tm$omicron");
00157   init (t, "pi", "tm$pi");
00158   init (t, "rho", "tm$rho");
00159   init (t, "sigma", "tm$sigma");
00160   init (t, "tau", "tm$tau");
00161   init (t, "upsilon", "tm$upsilon");
00162   init (t, "phi", "tm$varphi");
00163   init (t, "chi", "tm$chi");
00164   init (t, "psi", "tm$psi");
00165   init (t, "omega", "tm$omega");
00166 
00167   init (t, "Alpha", "tm$Alpha");
00168   init (t, "Beta", "tm$Beta");
00169   init (t, "Gamma", "tm$Gamma");
00170   init (t, "Delta", "tm$Delta");
00171   init (t, "Epsilon", "tm$Epsilon");
00172   init (t, "Zeta", "tm$Zeta");
00173   init (t, "Eta", "tm$Eta");
00174   init (t, "Theta", "tm$Theta");
00175   init (t, "Iota", "tm$Iota");
00176   init (t, "Kappa", "tm$Kappa");
00177   init (t, "Lambda", "tm$Lambda");
00178   init (t, "Mu", "tm$Mu");
00179   init (t, "Nu", "tm$Nu");
00180   init (t, "Xi", "tm$Xi");
00181   init (t, "Omicron", "tm$Omicron");
00182   init (t, "Pi", "tm$Pi");
00183   init (t, "Rho", "tm$Rho");
00184   init (t, "Sigma", "tm$Sigma");
00185   init (t, "Tau", "tm$Tau");
00186   init (t, "Upsilon", "tm$Upsilon");
00187   init (t, "Phi", "tm$Phi");
00188   init (t, "Chi", "tm$Chi");
00189   init (t, "Psi", "tm$Psi");
00190   init (t, "Omega", "tm$Omega");
00191 
00192   return t;
00193 }

static void mmx::texmacs_to_scheme ( string obj->lex_string,
const generic g 
) [static]

Definition at line 441 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().

00441                                                 {
00442   //mmerr << "g= " << as_lisp (g) << "\n";
00443   if (is<literal> (g)) s << quote (literal_to_string (g));
00444   else if (is<compound> (g) && is<literal> (g[0]) &&
00445            literal_to_string (g[0]) == " ")
00446     s << "\" \"";
00447   else if (is<compound> (g) && is<literal> (g[0])) {
00448     string op= literal_to_string (g[0]);
00449     if (starts (op, "tm$")) op= op (2, N(op));
00450     if (!starts (op, "$")) {
00451       mmerr << "op  = " << op << "\n";
00452       mmerr << "args= " << compound_to_vector (g) << "\n";
00453     }
00454     ASSERT (starts (op, "$"), "invalid TeXmacs markup");
00455     s << "(" << op (1, N(op));
00456     for (nat i=1; i<N(g); i++) {
00457       s << " ";
00458       texmacs_to_scheme (s, g[i]);
00459     }
00460     s << ")";
00461   }
00462   else ERROR ("invalid TeXmacs markup");
00463 }

syntactic& mmx::the_polynomial_var (  ) 

Definition at line 560 of file syntactic.cpp.

00560                       {
00561   static syntactic v ("x");
00562   return v;
00563 }

syntactic& mmx::the_series_var (  ) 

Definition at line 554 of file syntactic.cpp.

00554                   {
00555   static syntactic v ("z");
00556   return v;
00557 }

C3 mmx::third ( const triple< C1, C2, C3 > &  t  )  [inline]

Definition at line 42 of file triple.hpp.

00042 { return t.x3; }

void mmx::threads_execute ( task *  ts,
nat(obj->lex_length)   
)

Definition at line 224 of file threads.cpp.

References inside().

00224                                        {
00225   for (nat i=0; i<n; i++) inside (ts[i]) -> execute (); }

void mmx::threads_execute ( task *  ts,
nat  n 
)

Referenced by threads_simple_loop().

int threads_get_number (  ) 

Definition at line 219 of file threads.cpp.

00219 { return 1; }

void mmx::threads_initialize ( nat(obj->lex_length)   ) 

Definition at line 217 of file threads.cpp.

00217 { (void) n; }

void mmx::threads_initialize ( nat  n  ) 
void mmx::threads_set_number ( const int &  obj->lex_length  ) 

Definition at line 220 of file threads.cpp.

References ASSERT.

00220                                        {
00221   ASSERT (n == 1, "multithreading disabled"); }

void mmx::threads_set_number ( const int &  n  ) 
void threads_simple_loop ( nat  nr_instances,
nat  nr_iterations 
)

Definition at line 282 of file threads.cpp.

References threads_execute().

00282                                                           {
00283   task ts[nr_instances];
00284   for (nat id=0; id<nr_instances; id++)
00285     ts[id]= new loop_task_rep (nr_iterations);
00286   threads_execute (ts, nr_instances);
00287 }

void threads_terminate (  ) 

Definition at line 218 of file threads.cpp.

00218 {}

double times_infinity ( const double &  x  )  [inline]

Definition at line 38 of file double.hpp.

Referenced by GLUE_42(), and set_infinity().

00038 { return x * HUGE_VAL; }

vector<string> mmx::tokenize ( const string obj->lex_string,
const string sep,
bool  keep 
)

Definition at line 592 of file string.cpp.

References ASSERT, min(), N(), s, and start.

00592                                                          {
00593   ASSERT (N(sep) != 0, "separator should be non-empty");
00594   vector<string> v;
00595   nat start= 0;
00596   while (start < N(s)) {
00597     nat end= start;
00598     while (end < N(s) &&
00599            (s[end] != sep[0] || s (end, min (N(s), end + N(sep))) != sep))
00600       end++;
00601     if (keep) v << (s (start, end) * sep);
00602     else v << s (start, end);
00603     start= end + N(sep);
00604   }
00605   return v;
00606 }

vector<string> mmx::tokenize ( const string &  s,
const string &  sep,
bool  keep = false 
)
generic trace_bottom ( const generic exc,
nat  n = 1 
)

Definition at line 76 of file exception.cpp.

References trace_depth(), and trace_pull().

Referenced by source_exception().

00076                                          {
00077   generic g= exc;
00078   nat d= trace_depth (exc);
00079   for (nat i=n; i<d; i++) g= trace_pull (g);
00080   return g;
00081 }

nat mmx::trace_depth ( const generic exc  ) 

Definition at line 70 of file exception.cpp.

References has_trace(), and trace_pull().

Referenced by trace_bottom().

00070                                  {
00071   if (has_trace (exc)) return trace_depth (trace_pull (exc)) + 1;
00072   else return 1;
00073 }

generic trace_pull ( const generic exc  ) 

Definition at line 54 of file exception.cpp.

References ASSERT, gen(), GEN_BACKTRACE, GEN_EXCEPTION, and is_func().

Referenced by backtrace(), trace_bottom(), and trace_depth().

00054                                 {
00055   generic msg= *as<exception> (exc);
00056   ASSERT (is_func (msg, GEN_EXCEPTION, 2), "invalid exception");
00057   ASSERT (is_func (msg[2], GEN_BACKTRACE, 2), "backtrace expected");
00058   return as<generic> (exception (gen (msg[0], msg[1], msg[2][2])));
00059 }

generic trace_push ( const generic exc,
const generic where 
)

Definition at line 46 of file exception.cpp.

References ASSERT, gen(), GEN_BACKTRACE, GEN_EXCEPTION, and is_func().

00046                                                       {
00047   generic msg= *as<exception> (exc);
00048   ASSERT (is_func (msg, GEN_EXCEPTION, 2), "invalid exception");
00049   generic w= gen (GEN_BACKTRACE, where, msg[2]);
00050   return as<generic> (exception (gen (msg[0], msg[1], w)));
00051 }

generic trace_top ( const generic exc  ) 

Definition at line 62 of file exception.cpp.

References ASSERT, gen(), GEN_BACKTRACE, GEN_EXCEPTION, and is_func().

Referenced by backtrace().

00062                                {
00063   generic msg= *as<exception> (exc);
00064   ASSERT (is_func (msg, GEN_EXCEPTION, 2), "invalid exception");
00065   ASSERT (is_func (msg[2], GEN_BACKTRACE, 2), "backtrace expected");
00066   return as<generic> (exception (gen (msg[0], "backtrace", msg[2][1])));
00067 }

vector<C> mmx::trig ( const vector< C > &  v  )  [inline]

Definition at line 1409 of file vector.hpp.

References cos(), sin(), and vec().

01409                                                          {
01410   return vec (cos (v[0]), sin (v[0])); }

syntactic trig ( const syntactic g  ) 

Definition at line 443 of file syntactic.cpp.

References cos(), GEN_SQTUPLE, sin(), and syn().

00443                                     {
00444   return syn (GEN_SQTUPLE, cos (g), sin (g)); }

generic trig ( const generic x1  ) 

Definition at line 547 of file generic.cpp.

References comma(), cos(), sin(), and xsqtuple().

Referenced by trig_op::op(), trig_op::op_init(), and trig_op::set_op().

00547                                  {
00548   return xsqtuple (comma (cos (x1), sin (x1))); }

mmx::TRUE_IDENTITY_OP_SUGAR ( template< typename C >  ,
chain< C >   
)
generic trunc ( const generic x  ) 

Definition at line 751 of file generic.cpp.

References current_ev, and GEN_TRUNC.

00751                                  {
00752   return current_ev->apply (GEN_TRUNC, x); }

double trunc ( const double &  x  )  [inline]

Definition at line 130 of file double.hpp.

Referenced by trunc_op::op(), and trunc_op::set_op().

00130 { return ::trunc (x); }

vector<typename binary_return_type_helper<truncate_op, C ,nat>::RET> mmx::truncate ( const vector< C, V > &  v,
nat  n 
) [inline]

Definition at line 1300 of file vector.hpp.

Referenced by truncate_op::set_op().

01300                                                         {
01301   return as<Truncated_vector> (binary_map_scalar<truncate_op> (v, n)); }

C& mmx::ttable_access ( table< C, generic > &  t,
const generic a,
const generic b,
const vector< generic > &  c 
) [inline]

Definition at line 835 of file table.hpp.

References cons().

00835                                                                   {
00836   return t[cons (a, cons (b, c))];
00837 }

C mmx::ttable_access ( const table< C, generic > &  t,
const generic a,
const generic b,
const vector< generic > &  c 
) [inline]

Definition at line 830 of file table.hpp.

References cons().

00830                                                                         {
00831   return t[cons (a, cons (b, c))];
00832 }

C& mmx::ttable_access ( new_table< C, generic > &  t,
const generic a,
const generic b,
const vector< generic > &  c 
) [inline]

Definition at line 908 of file new_table.hpp.

References cons().

00908                                                                   {
00909   return t[cons (a, cons (b, c))];
00910 }

C mmx::ttable_access ( const new_table< C, generic > &  t,
const generic a,
const generic b,
const vector< generic > &  c 
) [inline]

Definition at line 903 of file new_table.hpp.

References cons().

Referenced by GLUE_19().

00903                                                                         {
00904   return t[cons (a, cons (b, c))];
00905 }

bool mmx::ttable_contains ( const table< C, generic > &  t,
const generic a,
const generic b,
const vector< generic > &  c 
) [inline]

Definition at line 825 of file table.hpp.

References cons(), and contains().

00825                                                                           {
00826   return contains (t, cons (a, cons (b, c)));
00827 }

bool mmx::ttable_contains ( const new_table< C, generic > &  t,
const generic a,
const generic b,
const vector< generic > &  c 
) [inline]

Definition at line 898 of file new_table.hpp.

References cons(), and contains().

Referenced by GLUE_18().

00898                                                                           {
00899   return contains (t, cons (a, cons (b, c)));
00900 }

void mmx::ttable_reset ( table< C, generic > &  t,
const generic a,
const generic b,
const vector< generic > &  c 
) [inline]

Definition at line 840 of file table.hpp.

References cons(), and reset().

00840                                                                  {
00841   reset (t, cons (a, cons (b, c)));
00842 }

void mmx::ttable_reset ( new_table< C, generic > &  t,
const generic a,
const generic b,
const vector< generic > &  c 
) [inline]

Definition at line 913 of file new_table.hpp.

References cons(), and reset().

00913                                                                  {
00914   reset (t, cons (a, cons (b, c)));
00915 }

nat mmx::tuple_to_scalar ( nat  id  )  [inline]

Definition at line 107 of file tuple.hpp.

References tuple_type_info().

00107                          {
00108   bool mode= false;
00109   tuple_type_info (id, mode);
00110   return id;
00111 }

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().

00017                                       {
00018   static table<nat,nat> t (0);
00019   static table<nat,nat> u (0);
00020   if (mode == false) {
00021     mode= t->contains (id);
00022     id= read (t, id);
00023   }
00024   else {
00025     if (u->contains (id)) id= u[id];
00026     else {
00027       nat new_id= new_type_id ();
00028       t[new_id]= id;
00029       u[id]= new_id;
00030       id= new_id;
00031     }
00032   }
00033 }

nat mmx::type ( const generic &  g  )  [inline]
nat mmx::type_id (  )  [inline]

Definition at line 191 of file generic.hpp.

00191                                            {
00192   return type_information<C>::id; }

nat type_id ( const generic name  ) 

Definition at line 78 of file glue.cpp.

References current_ev, gen(), and GEN_TYPE_ID.

Referenced by define_type_helper< C >::def_type(), and get_user_type().

00078                               {
00079   generic id;
00080   if (current_ev->get (gen (GEN_TYPE_ID, name), id) && is<nat> (id))
00081     return as<nat> (id);
00082   else return 1;
00083 }

generic type_mismatch ( const generic expect,
const generic where 
)

Definition at line 41 of file exception.cpp.

References std_exception().

00041                                                             {
00042   return std_exception ("expected ", expect, where);
00043 }

vector<generic> mmx::type_name ( const vector< nat > &  ids  ) 

Definition at line 24 of file routine.cpp.

References N(), n, and type_name().

00024                                    {
00025   nat i, n= N(ids);
00026   vector<generic> ret= fill<generic> (n);
00027   for (i=0; i<n; i++)
00028     ret[i]= type_name (ids[i]);
00029   return ret;
00030 }

generic type_name (  )  [inline]
generic type_name ( const generic g  ) 

Definition at line 94 of file glue.cpp.

References type(), and type_name().

00094                              {
00095   return type_name (type (g));
00096 }

generic type_name ( nat  id  ) 

Definition at line 86 of file glue.cpp.

References current_ev, gen(), GEN_TYPE_NAME, and GEN_UNSPECIFIED_TYPE.

Referenced by convert(), verbose_as_helper< T, F >::cv(), flatten_type(), routine_rep::function_type(), object_flatten(), operator<<(), replace_lf(), and type_name().

00086                    {
00087   generic name;
00088   if (current_ev->get (gen (GEN_TYPE_NAME, as<generic> (id)), name))
00089     return name;
00090   else return GEN_UNSPECIFIED_TYPE;
00091 }

static generic mmx::un_try_catch ( const generic g  )  [static]

Definition at line 382 of file mmx_printer.cpp.

References cdr(), compound_to_vector(), gen(), GEN_BEGIN, is_func(), and N().

00382                                 {
00383   vector<generic> v;
00384   if (is_func (g[1], GEN_BEGIN)) v << cdr (compound_to_vector (g[1]));
00385   else v << g[1];
00386   for (nat i=2; i<N(g); i++) v << g[i];
00387   return gen (g[0], gen (GEN_BEGIN, v));
00388 }

table<C,T,V> mmx::unary_filter ( const table< C, T, V > &  t  )  [inline]

Definition at line 583 of file table.hpp.

References busy(), entries(), I(), and Table.

00583                               {
00584   Table r (I(t));
00585   for (iterator<T> it= entries (t); busy (it); ++it)
00586     if (Op::op (*it)) r[*it]= t[*it];
00587   return r;
00588 }

new_table<C,T,V> mmx::unary_filter ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 654 of file new_table.hpp.

References busy(), entries(), I(), and Table.

00654                               {
00655   Table r (I(t));
00656   for (iterator<T> it= entries (t); busy (it); ++it)
00657     if (Op::op (*it)) r[*it]= t[*it];
00658   return r;
00659 }

nat mmx::unary_hash ( const vector< C, V > &  v  )  [inline]

Definition at line 757 of file vector.hpp.

References N(), and n.

00757                                   {
00758   register nat i, h= 12345, n= N(v);
00759   for (i=0; i<n; i++)
00760     h= (h<<1) ^ (h<<5) ^ (h>>27) ^ Op::op (v[i]);
00761   return h;
00762 }

nat mmx::unary_hash ( const triple< C1, C2, C3 > &  t  )  [inline]

Definition at line 48 of file triple.hpp.

00048                              {
00049   nat h1= Op::op (t.x1), h2= Op::op (t.x2);
00050   return h1 ^ h2 ^ (h1<<3) ^ (h2<<5) ^ Op::op (t.x3);
00051 }

nat mmx::unary_hash ( const table< C, T, V > &  t  )  [inline]

Definition at line 474 of file table.hpp.

References busy(), iterate(), pair< C1, C2 >::x1, and pair< C1, C2 >::x2.

00474                             {
00475   // we add all hash codes of the element pairs; don't "cycle",
00476   // because the order of the element pairs is not uniquely determined
00477   nat h=54321;
00478   for (iterator<pair<T,C> > it= iterate (t); busy (it); ++it) {
00479     pair<T,C> p= *it;
00480     nat key_h= V::key_op::hash_op (p.x1);
00481     nat val_h= Op::op (p.x2);
00482     h += (key_h << 5) ^ (key_h >> 27) ^ val_h;
00483   }
00484   return h;
00485 }

nat mmx::unary_hash ( const sparse_vector< C, T, V > &  v  )  [inline]

Definition at line 151 of file sparse_vector.hpp.

References N().

00151                                     {
00152   nat h=1236321;
00153   for (nat i=0; i<N(v); i++)
00154     h = (h << 5) ^ (h >> 27) ^ Op::op (v[i]);
00155   return h;
00156 }

nat mmx::unary_hash ( const pair< C1, C2 > &  p  )  [inline]

Definition at line 43 of file pair.hpp.

00043                            {
00044   nat h= Op::op (p.x1);
00045   return (h<<1) ^ (h<<3) ^ (h<<9) ^ (h>>29) ^ Op::op (p.x2);
00046 }

nat mmx::unary_hash ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 545 of file new_table.hpp.

References busy(), iterate(), pair< C1, C2 >::x1, and pair< C1, C2 >::x2.

00545                             {
00546   // we add all hash codes of the element pairs; don't "cycle",
00547   // because the order of the element pairs is not uniquely determined
00548   nat h=54321;
00549   for (iterator<pair<T,C> > it= iterate (t); busy (it); ++it) {
00550     pair<T,C> p= *it;
00551     nat key_h= V::key_op::hash_op (p.x1);
00552     nat val_h= Op::op (p.x2);
00553     h += (key_h << 5) ^ (key_h >> 27) ^ val_h;
00554   }
00555   return h;
00556 }

nat mmx::unary_hash ( const list< C > &  ll  )  [inline]

Definition at line 211 of file list.hpp.

References is_nil(), List, read_car(), and read_cdr().

00211                             {
00212   List l= ll;
00213   register nat h= 253648;
00214   while (!is_nil (l)) {
00215     h= (h<<1) ^ (h<<5) ^ (h>>27) ^ Op::op (read_car (l));
00216     l= read_cdr (l);
00217   }
00218   return h;
00219 }

nat mmx::unary_hash ( const iterator< C > &  it  )  [inline]

Definition at line 156 of file iterator.hpp.

00156                                 {
00157   (void) it; return 20077002;
00158   /*
00159   Iterator it1= copy (it);
00160   register nat h= 20077002;
00161   while (busy (it1)) {
00162     h= (h<<3) ^ (h>>29) ^ Op::op (*it1);
00163     ++it1;
00164   }
00165   return h;
00166   */
00167 }

nat mmx::unary_hash ( const heap< C > &  HH  )  [inline]

Definition at line 226 of file heap.hpp.

References copy(), Heap, N(), and pull().

00226                             {
00227   Heap H= copy (HH);
00228   register nat h= 2531648;
00229   while (N(H) > 0)
00230     h= (h<<1) ^ (h<<5) ^ (h>>27) ^ Op::op (pull (H));
00231   return h;
00232 }

nat mmx::unary_hash ( const chain< C > &  c  )  [inline]

Definition at line 221 of file chain.hpp.

References is_nil(), left(), middle(), and right().

00221                             {
00222   if (is_nil (c)) return 1928;
00223   nat h1= Op::op (left (c));
00224   nat h2= Op::op (middle (c));
00225   nat h3= Op::op (right (c));
00226   return h1 ^ (h2>>1) ^ (h2<<31) ^ (h3>>3) ^ (h3>>29);
00227 }

vector<typename unary_return_type_helper< Op , C >::RET,V> mmx::unary_map ( const vector< C, V > &  v  )  [inline]

Definition at line 766 of file vector.hpp.

References C, CF(), is_a_scalar(), N(), n, vector< C, V >::scalar(), seg(), T, and Unary_return_type.

00766                                  {
00767   typedef implementation<vector_linear,V> Vec;
00768   typedef Unary_return_type(Op,C) T;
00769   format<T> fm= unary_map<Op> (CF(v));
00770   if (is_a_scalar (v)) return vector<T,V> (Op::op (v.scalar()));
00771   nat n= N(v);
00772   nat l= aligned_size<T,V> (n);
00773   T* r= mmx_formatted_new<T> (l, fm);
00774   Vec::template vec_unary<Op> (r, seg (v), n);
00775   return vector<T,V> (r, n, l, fm);
00776 }

format<typename unary_return_type_helper< Op , C >::RET > mmx::unary_map ( const format< C > &  fm  )  [inline]

Definition at line 622 of file type_props.hpp.

References C, and Unary_return_type.

00622                                 {
00623   typedef Unary_return_type(Op,C) R;
00624   typedef typename format<R>::FT FT;
00625   return format_unary_map_helper<Op,FT,R,C>::op (fm);
00626 }

table<C,T,V> mmx::unary_map ( const table< C, T, V > &  t  )  [inline]

Definition at line 496 of file table.hpp.

References busy(), CF2(), entries(), I(), simplify(), and Table.

00496                            {
00497   Table r (Op::op (I(t)), CF2(t));
00498   for (iterator<T> it= entries (t); busy (it); ++it)
00499     r[*it]= Op::op (t[*it]);
00500   simplify (r);
00501   return r;
00502 }

sparse_vector<C,T,V> mmx::unary_map ( const sparse_vector< C, T, V > &  v  )  [inline]

Definition at line 176 of file sparse_vector.hpp.

References N(), n, Pair, set_zero(), and Sparse_vector.

00176                                    {
00177   typedef typename V::val_op Eq;
00178   static C zero; set_zero (zero);
00179   nat i, j, n= N(v);
00180   Pair* r= mmx_new<Pair > (n);
00181   for (i= j= 0; i < n; i++) {
00182     Pair e (v[i].x1, Op::op (v[i].x2));
00183     if (Eq::not_op (e.x2, zero)) r[j++]= e;
00184   }
00185   return Sparse_vector (r, j, n);
00186 }

new_table<C,T,V> mmx::unary_map ( const new_table< C, T, V > &  t  )  [inline]

Definition at line 567 of file new_table.hpp.

References busy(), CF2(), entries(), I(), simplify(), and Table.

00567                            {
00568   Table r (Op::op (I(t)), CF2(t));
00569   for (iterator<T> it= entries (t); busy (it); ++it)
00570     r[*it]= Op::op (t[*it]);
00571   simplify (r);
00572   return r;
00573 }

routine mmx::unary_routine ( const generic name,
D(*)(const S1 &)  fun 
) [inline]
vector<T,V>& mmx::unary_set ( vector< T, V > &  v,
const vector< C, V > &  w 
) [inline]

Definition at line 820 of file vector.hpp.

References ASSERT, extend(), is_a_scalar(), is_non_scalar(), N(), n, vector< C, V >::scalar(), and seg().

00820                                                  {
00821   typedef implementation<vector_linear,V> Vec;
00822   if (is_a_scalar (v) || is_a_scalar (w)) {
00823     if (is_non_scalar (v))
00824       return unary_set<Op> (v, extend (w, v));
00825     else if (is_non_scalar (w))
00826       v= extend (v, w);
00827     else {
00828       Op::set_op (v.scalar(), w.scalar());
00829       return v;
00830     }
00831   }
00832   nat n= N(v);
00833   ASSERT (N(w) == n, "lengths don't match");
00834   Vec::template vec_unary<Op> (seg (v), seg (w), n);
00835   return v;
00836 }

table<C,T,V>& mmx::unary_set ( table< C, T, V > &  t,
const table< C, T, V > &  u 
) [inline]

Definition at line 526 of file table.hpp.

References busy(), entries(), I(), read(), read_I(), and reset().

00526                                      {
00527   Op::set_op (I(t), I(u));
00528   for (iterator<T> it= entries (u); busy (it); ++it) {
00529     Op::set_op (t[*it], u[*it]);
00530     if (V::val_op::op (read (t, *it), read_I (t))) reset (t, *it);
00531   }
00532   return t;
00533 }

new_table<C,T,V>& mmx::unary_set ( new_table< C, T, V > &  t,
const new_table< C, T, V > &  u 
) [inline]

Definition at line 597 of file new_table.hpp.

References busy(), entries(), I(), read(), read_I(), and reset().

00597                                      {
00598   Op::set_op (I(t), I(u));
00599   for (iterator<T> it= entries (u); busy (it); ++it) {
00600     Op::set_op (t[*it], u[*it]);
00601     if (V::val_op::op (read (t, *it), read_I (t))) reset (t, *it);
00602   }
00603   return t;
00604 }

vector<T,V>& mmx::unary_set_scalar ( vector< T, V > &  v,
const X &  x 
) [inline]

Definition at line 839 of file vector.hpp.

References is_a_scalar(), N(), n, vector< C, V >::scalar(), and seg().

00839                                               {
00840   typedef implementation<vector_linear,V> Vec;
00841   if (is_a_scalar (v)) {
00842     Op::set_op (v.scalar(), x);
00843     return v;
00844   }
00845   nat n= N(v);
00846   Vec::template vec_unary_scalar<Op> (seg (v), x, n);
00847   return v;
00848 }

table<C,T,V>& mmx::unary_set_scalar ( table< C, T, V > &  t,
const X &  x 
) [inline]

Definition at line 536 of file table.hpp.

References busy(), entries(), I(), and simplify().

00536                                         {
00537   Op::set_op (I (t), x);
00538   for (iterator<T> it= entries (t); busy (it); ++it)
00539     Op::set_op (t[*it], x);
00540   simplify (t);
00541   return t;
00542 }

new_table<C,T,V>& mmx::unary_set_scalar ( new_table< C, T, V > &  t,
const X &  x 
) [inline]

Definition at line 607 of file new_table.hpp.

References busy(), entries(), I(), and simplify().

00607                                         {
00608   Op::set_op (I (t), x);
00609   for (iterator<T> it= entries (t); busy (it); ++it)
00610     Op::set_op (t[*it], x);
00611   simplify (t);
00612   return t;
00613 }

generic mmx::unbracket ( const generic g  ) 

Definition at line 205 of file mmx_texmacs.cpp.

References is_func().

Referenced by as_texmacs().

00205                              {
00206   if (is_func (g, "$bracket", 3)) return g[2];
00207   else return g;
00208 }

static string mmx::underlined ( const string file_name,
const nat &  obj->lex_length,
const source_position b,
const source_position e 
) [static]

Definition at line 279 of file source_track.cpp.

References source_position::column, get_source(), source_position::line, line, and N().

Referenced by source_underlined().

00281 {
00282   // empty file_name means interactive input. In this only situation
00283   // n means the input number. n is not used for a regular file.
00284   nat j;
00285   string line;
00286   string sout;
00287 
00288   line = get_source (file_name, n, b.line);
00289 
00290   sout << line << "\n";
00291   for (j=0; j < b.column; ++j)
00292     sout << " ";
00293   if (b.line == e.line) {
00294     for (; j < e.column; ++j)
00295       sout << "~";
00296   }
00297   else {
00298     if (e.line == b.line+1 && e.column == 0)
00299       sout << "^";
00300     else {
00301       for (; j < N(line); ++j)
00302         sout << "~";
00303       sout << "\n";
00304       if (e.column == 0) {
00305         if (e.line - 1 > b.line + 1)
00306           sout << "...\n";
00307         line = get_source (file_name, n, e.line-1);
00308         sout << line << "\n";
00309         for (j=0; j < N(line); ++j)
00310           sout << "~";
00311         if (N(line) == 0)
00312           sout << "^";
00313       }
00314       else {
00315         if (e.line > b.line + 1)
00316           sout << "...\n";
00317         line = get_source (file_name, n, e.line);
00318         sout << line << "\n";
00319         for (j=0; j < e.column; ++j)
00320           sout << "~";
00321       }
00322     }
00323   }
00324   sout << "\n";
00325   return sout;
00326 }

bool mmx::unequal_operator ( const T &  x,
const T &  y 
) [inline]

Definition at line 37 of file operators.hpp.

00037 { return x!=y; }

string mmx::unescape ( const string obj->lex_string  ) 

Definition at line 492 of file string.cpp.

References N(), string::rep, and string_rep::resize().

00492                            {
00493   int i, n= N(s);
00494   string r;
00495   for (i=0; i<n; i++)
00496     if ((i+1<n) && (s[i] == '\\')) {
00497       i++;
00498       if (s[i] == 't') r << '\t';
00499       else if (s[i] == 'n') r << '\n';
00500       else if (s[i] == 'r') r << '\r';
00501       else if (s[i] == 'b') {
00502         if (N(r)>0)
00503           r.rep->resize (N(r)-1);
00504       }
00505       else r << s[i];
00506     }
00507     else r << s[i];
00508   return r;
00509 }

string mmx::unescape ( const string &  s  ) 

Replace "\\n", "\\t", and "\\b" respectively by "\n", "\t", and "\b".

Referenced by unquote().

generic uniform ( const generic x1,
const generic x2 
)

Definition at line 846 of file generic.cpp.

References current_ev.

00846                                                        {
00847   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().

00017                                                      {
00018   double x= ((double) rand ()) / RAND_MAX;
00019   return lo + (hi - lo) * x;
00020 }

string mmx::unique_identifier ( const dynamic g  ) 

Definition at line 69 of file dynamic.cpp.

References as_string(), and hard_hash().

Referenced by flatten(), and output_observer_rep::modify().

00069                                      {
00070   return "mmx-" * as_string (hard_hash (g));
00071 }

void mmx::unlock ( const storage st,
const string var 
) [inline]

Lock variable var on storage st.

Definition at line 75 of file storage.hpp.

Referenced by GLUE_7().

00075                                                           {
00076   st->unlock (var); }

string mmx::unquote ( const string obj->lex_string  ) 

Definition at line 535 of file string.cpp.

References ends(), N(), s, starts(), and unescape().

00535                           {
00536   if ((N(s) >= 2) && (s[0] == '\"') && (s[N(s)-1] == '\"'))
00537     return unescape (s (1, N(s)-1));
00538   else if (starts (s, "/\"") && ends (s, "\"/"))
00539     return s (2, N(s)-2);
00540   else return unescape (s);
00541 }

string mmx::unquote ( const string &  s  ) 

Remove all the "..." and /"..."/ around s.

Referenced by as_literal_string(), GLUE_21(), mmc_unliteral(), parse_lisp(), and scheme_to_tm().

string mmx::upcase ( const string obj->lex_string  ) 

Definition at line 442 of file string.cpp.

References is_locase(), and N().

00442                          {
00443   nat i, n= N(s);
00444   string r (n);
00445   for (i=0; i<n; i++)
00446     if (!is_locase (s[i])) r[i]= s[i];
00447     else r[i]= (char) (((int) ((unsigned char) s[i]))-32);
00448   return r;
00449 }

string mmx::upcase ( const string &  s  ) 

Replace locases by upcases.

Referenced by GLUE_16().

string mmx::upcase_first ( const string obj->lex_string  ) 

Definition at line 462 of file string.cpp.

References copy(), is_locase(), and N().

00462                                {
00463   string r= copy (s);
00464   if (N(r) != 0 && is_locase (s[0]))
00465     r[0]= (char) (((int) ((unsigned char) s[0]))-32);
00466   return r;
00467 }

string mmx::upcase_first ( const string &  s  ) 

Replace locase by upcase for first letter.

Referenced by GLUE_18().

vector<typename unary_return_type_helper<center_op, C >::RET,V> mmx::upper ( const vector< C, V > &  v  )  [inline]

Definition at line 1351 of file vector.hpp.

01351                                            {
01352   return unary_map<upper_op> (v); }

C mmx::upper ( const C &  x  )  [inline]

Definition at line 1115 of file type_props.hpp.

Referenced by upper_op::Center_type(), and upper_op::set_op().

01115 { return x; }

string user_dir (  ) 

Definition at line 207 of file system.cpp.

References _from_dos_to_unix(), ASSERT, and get_env().

Referenced by disk_storage(), eval_system(), init_system(), load_path(), shell_load_history(), shell_load_session(), shell_save_history(), and shell_save_session().

00207             {
00208   string dir= get_env ("MMX_USER_DIR");
00209   if (dir == "") {
00210 #if defined(__MINGW__) || defined(__MINGW32__)
00211     string home = get_env ("USERPROFILE");
00212     ASSERT (home != "", "Can not determine user's directory.\n Please set MMX_USER_DIR or USERPROFILE.\n");
00213     dir= home * "/AppData/Local/Mathemagix";
00214 #else
00215     string home = get_env ("HOME");
00216     ASSERT (home != "", "Can not determine user's directory.\n Please set $MMX_USER_DIR or $HOME.\n");
00217     dir= home * "/.mathemagix";
00218 #endif
00219   }
00220   return _from_dos_to_unix (dir);
00221 }

generic user_exception ( const vector< generic > &  msg,
const generic where 
)

Definition at line 31 of file exception.cpp.

References gen(), and GEN_EXCEPTION.

00031                                                               {
00032   return as<generic> (exception (gen (GEN_EXCEPTION, as<generic> (msg), w)));
00033 }

generic mmx::var_flatten ( const generic g  ) 

Definition at line 84 of file generic_utils.cpp.

References as_generic(), and flatten().

Referenced by compare_sub(), and size().

00084                                {
00085   return as_generic (flatten (g));
00086 }

bool var_load ( const string file_path,
const string file_name,
string obj->lex_string 
)

Definition at line 723 of file system.cpp.

References _from_dos_to_unix(), get_env(), init_system(), is_absolute_name(), load_path(), N(), n, path_sep, start, var_load(), and var_pwd().

00723                                                                        {
00724   //mmout << "var_load: " << file_path << ", " << file_name << lf;
00725   if (is_absolute_name (file_name))
00726     return var_load (file_name, s);
00727   nat i, n= N(file_path), start= 0;
00728   for (i=0; i<=n; i++)
00729     if ((i==n) || (file_path[i] == path_sep)) {
00730       string ss= file_path (start, i);
00731       if ((N(ss) > 0) && (ss[0] == '$')) {
00732         init_system ();
00733         if (ss == "$MMX_LOAD_PATH") ss= load_path ();
00734         else if (ss == "$PWD") ss= var_pwd ();
00735         else ss= _from_dos_to_unix (get_env (ss (1, N(ss))));
00736         if (!var_load (ss, file_name, s)) return false;
00737       }
00738       else {
00739         if (ss == "") ss= ".";
00740         if (ss[N(ss)-1] != '/') ss= ss * "/";
00741         if (!var_load (ss * file_name, s)) return false;
00742       }
00743       start= i+1;
00744     }
00745   return true;
00746 }

bool var_load ( const string file_name,
string obj->lex_string 
)

Definition at line 705 of file system.cpp.

References can_read(), error_flag(), and input_file_port().

Referenced by eval_system(), load(), and var_load().

00705                                               {
00706   //mmout << "var_load: " << file_name << lf;
00707   port f= input_file_port (file_name);
00708   if (error_flag (f)) return true;
00709   char c;
00710   while (can_read (f) > 0) {
00711     f >> c;
00712     s << c;
00713   }
00714   return false;
00715 }

bool var_mkdir ( const string name  ) 

Definition at line 789 of file system.cpp.

References as_charp(), file_exists(), free_charp(), mkdir(), and system().

Referenced by init_system(), and mkdir().

00789                                {
00790 #if defined (BASIX_HAVE_SYS_TYPES_H) && defined (BASIX_HAVE_SYS_STAT_H)
00791   if (file_exists (name)) return false;
00792   char* _name= as_charp (name);
00793 #if defined(__MINGW__) || defined(__MINGW32__)
00794   int r= ::mkdir (_name);
00795   ::chmod (_name, 744);
00796 #else
00797   int r= ::mkdir (_name, S_IRWXU + S_IRGRP + S_IROTH);
00798 #endif
00799   free_charp (_name);
00800   return r != 0;
00801 #else  
00802   return system ("mkdir -m 744 -p " * orig_name) != 0;
00803 #endif
00804 }

string var_pwd (  ) 

Definition at line 825 of file system.cpp.

References _from_dos_to_unix(), and get_env().

Referenced by ancestor_search_name(), get_env(), path_name(), and var_load().

00825            {
00826 #if defined(__MINGW__) || defined(__MINGW32__)
00827   char* ret= getcwd (NULL, 4096);
00828   if (ret == NULL) return "";
00829   string aux (ret);
00830   free (ret);
00831   return _from_dos_to_unix (aux);
00832 #else
00833   return _from_dos_to_unix (get_env ("PWD"));
00834 #endif
00835 }

bool var_rm ( const string name  ) 

Definition at line 812 of file system.cpp.

References as_charp(), file_exists(), free_charp(), remove(), and system().

Referenced by eval_system().

00812                             {
00813 #if defined (BASIX_HAVE_SYS_TYPES_H) && defined (BASIX_HAVE_SYS_STAT_H)
00814   if (!file_exists (name)) return false;
00815   char* _name= as_charp (name);
00816   int r= ::remove (_name);
00817   free_charp (_name);
00818   return r != 0;
00819 #else  
00820   return system ("rm " * orig_name) != 0;
00821 #endif
00822 }

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 
) [inline]

Definition at line 462 of file vector.hpp.

References C, Format, and get_format().

00463                                                          {
00464   Format fm= get_format (c1);
00465   nat l= default_aligned_size<C> ((nat) 8);
00466   C* a= mmx_formatted_new<C> (l, fm);
00467   a[0]= c1; a[1]= c2; a[2]= c3; a[3]= c4;
00468   a[4]= c5; a[5]= c6; a[6]= c7; a[7]= c8;
00469   return vector<C> (a, 8, l, fm);
00470 }

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 
) [inline]

Definition at line 452 of file vector.hpp.

References C, Format, and get_format().

00453                                             {
00454   Format fm= get_format (c1);
00455   nat l= default_aligned_size<C> ((nat) 7);
00456   C* a= mmx_formatted_new<C> (l, fm);
00457   a[0]= c1; a[1]= c2; a[2]= c3; a[3]= c4; a[4]= c5; a[5]= c6; a[6]= c7;
00458   return vector<C> (a, 7, l, fm);
00459 }

vector<C> mmx::vec ( const C &  c1,
const C &  c2,
const C &  c3,
const C &  c4,
const C &  c5,
const C &  c6 
) [inline]

Definition at line 442 of file vector.hpp.

References C, Format, and get_format().

00443                                             {
00444   Format fm= get_format (c1);
00445   nat l= default_aligned_size<C> ((nat) 6);
00446   C* a= mmx_formatted_new<C> (l, fm);
00447   a[0]= c1; a[1]= c2; a[2]= c3; a[3]= c4; a[4]= c5; a[5]= c6;
00448   return vector<C> (a, 6, l, fm);
00449 }

vector<C> mmx::vec ( const C &  c1,
const C &  c2,
const C &  c3,
const C &  c4,
const C &  c5 
) [inline]

Definition at line 433 of file vector.hpp.

References C, Format, and get_format().

00433                                                                       {
00434   Format fm= get_format (c1);
00435   nat l= default_aligned_size<C> ((nat) 5);
00436   C* a= mmx_formatted_new<C> (l, fm);
00437   a[0]= c1; a[1]= c2; a[2]= c3; a[3]= c4; a[4]= c5;
00438   return vector<C> (a, 5, l, fm);
00439 }

vector<C> mmx::vec ( const C &  c1,
const C &  c2,
const C &  c3,
const C &  c4 
) [inline]

Definition at line 424 of file vector.hpp.

References C, Format, and get_format().

00424                                                          {
00425   Format fm= get_format (c1);
00426   nat l= default_aligned_size<C> ((nat) 4);
00427   C* a= mmx_formatted_new<C> (l, fm);
00428   a[0]= c1; a[1]= c2; a[2]= c3; a[3]= c4;
00429   return vector<C> (a, 4, l, fm);
00430 }

vector<C> mmx::vec ( const C &  c1,
const C &  c2,
const C &  c3 
) [inline]

Definition at line 415 of file vector.hpp.

References C, Format, and get_format().

00415                                             {
00416   Format fm= get_format (c1);
00417   nat l= default_aligned_size<C> ((nat) 3);
00418   C* a= mmx_formatted_new<C> (l, fm);
00419   a[0]= c1; a[1]= c2; a[2]= c3;
00420   return vector<C> (a, 3, l, fm);
00421 }

vector<C> mmx::vec ( const C &  c1,
const C &  c2 
) [inline]

Definition at line 406 of file vector.hpp.

References C, Format, and get_format().

00406                                {
00407   Format fm= get_format (c1);
00408   nat l= default_aligned_size<C> ((nat) 2);
00409   C* a= mmx_formatted_new<C> (l, fm);
00410   a[0]= c1; a[1]= c2;
00411   return vector<C> (a, 2, l, fm);
00412 }

vector<C> mmx::vec ( const C &  c1  )  [inline]

Definition at line 397 of file vector.hpp.

References C, Format, and get_format().

00397                   {
00398   Format fm= get_format (c1);
00399   nat l= default_aligned_size<C> ((nat) 1);
00400   C* a= mmx_formatted_new<C> (l, fm);
00401   a[0]= c1;
00402   return vector<C> (a, 1, l, fm);
00403 }

vector<C> mmx::vec ( const format< C > &  fm  )  [inline]

Definition at line 390 of file vector.hpp.

References C.

00390                        {
00391   nat l= default_aligned_size<C> ((nat) 0);
00392   C* a= mmx_formatted_new<C> (l, fm);
00393   return vector<C> (a, 0, l, fm);
00394 }

vector<C> mmx::vec (  )  [inline]

Definition at line 382 of file vector.hpp.

References C, and Format.

Referenced by apply(), as_texmacs(), compose(), cos_sin(), trig_op::diff_op(), and trig().

00382        {
00383   Format fm;
00384   nat l= default_aligned_size<C> ((nat) 0);
00385   C* a= mmx_formatted_new<C> (l, fm);
00386   return vector<C> (a, 0, l, fm);
00387 }

generic vector_access ( const generic g,
nat  i 
)
vector<T> mmx::vector_append ( const vector< T > &  v,
const T &  x 
) [inline]

Definition at line 231 of file mmc_glue.hpp.

References append().

00231                                                {
00232   return append (v, x);
00233 }

vector<T> mmx::vector_append ( const vector< T > &  v1,
const vector< T > &  v2 
) [inline]

Definition at line 226 of file mmc_glue.hpp.

References append().

Referenced by vector_insert().

00226                                                          {
00227   return append (v1, v2);
00228 }

generic mmx::vector_append_several ( const tuple< vector< generic > > &  t  ) 

Definition at line 123 of file glue_vector_map.cpp.

References N(), and rebuild().

Referenced by glue_vector_map().

00123                                                          {
00124   vector<generic> r;
00125   for (nat i=0; i<N(t); i++)
00126     r << t[i];
00127   return rebuild (r);
00128 }

generic mmx::vector_apply ( const generic f,
const vector< generic > &  a 
)

Definition at line 131 of file glue_vector_map.cpp.

References default_routine().

Referenced by glue_vector_map().

00131                                                           {
00132   routine fun= is<routine> (f)? as<routine> (f): default_routine (f);
00133   return fun->apply (a);
00134 }

compound mmx::vector_as_compound ( const vector< generic > &  l  )  [inline]

Definition at line 65 of file mmc_glue.hpp.

00065                                               {
00066   return compound (l);
00067 }

vector<T> mmx::vector_cons ( const T &  x,
const vector< T > &  v 
) [inline]

Definition at line 221 of file mmc_glue.hpp.

References cons().

00221                                              {
00222   return cons (x, v);
00223 }

bool mmx::vector_contains ( const vector< T > &  v,
const T &  x 
) [inline]

Definition at line 283 of file mmc_glue.hpp.

References N(), and vector_find().

Referenced by vector_insert().

00283                                                  {
00284   return vector_find (v, x) < ((int) N(v));
00285 }

int mmx::vector_find ( const vector< T > &  v,
const T &  x 
) [inline]

Definition at line 275 of file mmc_glue.hpp.

References N(), and n.

Referenced by vector_contains().

00275                                              {
00276   nat i, n=N(v);
00277   for (i=0; i<n; i++)
00278     if (v[i] == x) return (int) i;
00279   return (int) i;
00280 }

generic mmx::vector_foreach ( const generic f,
const tuple< vector< generic > > &  t 
)

Definition at line 117 of file glue_vector_map.cpp.

References gen(), GEN_TUPLE, and vector_map().

Referenced by glue_vector_map().

00117                                                                     {
00118   generic r= vector_map (f, t);
00119   return as<generic> (tuple<generic> (gen (GEN_TUPLE)));
00120 }

vector<T> mmx::vector_insert ( const vector< T > &  v,
const T &  x 
) [inline]

Definition at line 288 of file mmc_glue.hpp.

References vector_append(), and vector_contains().

00288                                                {
00289   if (vector_contains (v, x)) return v;
00290   else return vector_append (v, x);
00291 }

bool mmx::vector_is_atom ( const vector< T > &  v  )  [inline]

Definition at line 261 of file mmc_glue.hpp.

References is_non_scalar(), and N().

00261                                     {
00262   return is_non_scalar (v) && N(v) == 1;
00263 }

bool mmx::vector_is_nil ( const vector< T > &  v  )  [inline]

Definition at line 256 of file mmc_glue.hpp.

References N().

00256                                    {
00257   return N(v) == 0;
00258 }

int mmx::vector_length ( const vector< T > &  v  )  [inline]

Definition at line 206 of file mmc_glue.hpp.

References N().

00206                                    {
00207   return (int) N(v);
00208 }

vector<T>& mmx::vector_lessless ( vector< T > &  v1,
const vector< T > &  v2 
) [inline]

Definition at line 236 of file mmc_glue.hpp.

00236                                                      {
00237   return v1 << v2;
00238 }

vector<D> mmx::vector_lift ( D(*)(const S1 &)  fun,
const vector< S1 > &  v1,
const format< D > &  fm 
) [inline]

Definition at line 320 of file mmc_glue.hpp.

00321                                   {
00322   return map<S1,D> (fun, v1, fm);
00323 }

vector<D> mmx::vector_lift ( const function_1< D, typename argument_helper< S1 >::arg_type > &  fun,
const vector< S1 > &  v1,
const format< D > &  fm 
) [inline]

Definition at line 314 of file mmc_glue.hpp.

00315                                   {
00316   return map<S1,D> (fun, v1, fm);
00317 }

vector<D> mmx::vector_lift ( D(*)(const S1 &)  fun,
const vector< S1 > &  v1 
) [inline]

Definition at line 309 of file mmc_glue.hpp.

00309                                                          {
00310   return map<S1,D> (fun, v1);
00311 }

vector<D> mmx::vector_lift ( const function_1< D, typename argument_helper< S1 >::arg_type > &  fun,
const vector< S1 > &  v1 
) [inline]

Definition at line 304 of file mmc_glue.hpp.

00304                                                                            {
00305   return map<S1,D> (fun, v1);
00306 }

vector<U> mmx::vector_lift ( const vector< T > &  v  )  [inline]

Definition at line 294 of file mmc_glue.hpp.

Referenced by iterator_lift_vector(), and vector_lift_iterator().

00294                                  {
00295   return as<vector<U> > (v);
00296 }

iterator<U> mmx::vector_lift_iterator ( const function_1< U, typename argument_helper< T >::arg_type > &  fun,
const vector< T > &  v,
const format< U > &  fm 
) [inline]

Definition at line 552 of file mmc_glue.hpp.

References iterate(), and vector_lift().

00554 {
00555   return iterate (vector_lift (fun, v, fm));
00556 }

iterator<U> mmx::vector_lift_iterator ( const function_1< U, typename argument_helper< T >::arg_type > &  fun,
const vector< T > &  v 
) [inline]

Definition at line 545 of file mmc_glue.hpp.

References iterate(), and vector_lift().

00547 {
00548   return iterate (vector_lift (fun, v));
00549 }

vector<generic> mmx::vector_lift_to_generic ( const vector< T > &  v  )  [inline]

Definition at line 299 of file mmc_glue.hpp.

00299                                             {
00300   return vector_lift<T,generic> (v);
00301 }

generic mmx::vector_map ( const generic f,
const tuple< vector< generic > > &  t 
)

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().

00099                                                                 {
00100   routine fun= is<routine> (f)? as<routine> (f): default_routine (f);
00101   switch (N(t)) {
00102   case 0: ASSERT (N(t)>0, "wrong number of arguments");
00103   case 1: return rebuild (vector_map_1 (fun, t[0]));
00104   case 2: return rebuild (vector_map_2 (fun, t[0], t[1]));
00105   default:
00106     {
00107       const vector<generic> a= compound_to_vector (*t);
00108       nat i, n= N(a)-1;
00109       vector<vector<generic> > b= fill<vector<generic> > (n);
00110       for (i=0; i<n; i++) b[i]= as<vector<generic> > (a[i+1]);
00111       return rebuild (vector_map_n (fun, b));
00112     }
00113   }
00114 }

vector<generic> mmx::vector_map_1 ( const routine fun,
const vector< generic > &  v 
)

Definition at line 32 of file glue_vector_map.cpp.

References is_a_scalar(), mmout, N(), and n.

Referenced by vector_map().

00032                                                             {
00033   if (is_a_scalar (v)) mmout << fun << ", " << v << "\n";
00034   //mmout << fun << ", " << v << ", " << is_a_scalar (v) << "\n";
00035   if (is_a_scalar (v)) return vector<generic> (fun->apply (v.scalar()));
00036   nat n= N(v);
00037   generic* r= mmx_new<generic> (n);
00038   for (nat i=0; i<n; i++)
00039     r[i]= fun->apply (v[i]);
00040   //mmout << "  -> " << vector<generic> (r, n) << "\n";
00041   return vector<generic> (r, n, format<generic> ());
00042 }

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().

00047 {
00048   if (is_a_scalar (v1) || is_a_scalar (v2)) {
00049     if (is_non_scalar (v1)) return vector_map_2 (fun, v1, extend (v2, v1));
00050     if (is_non_scalar (v2)) return vector_map_2 (fun, extend (v1, v2), v2);
00051     return vector<generic> (fun->apply (v1.scalar(), v2.scalar()));
00052   }
00053   ASSERT (N (v1) == N (v2), "vectors of unequal lengths");
00054   nat n= N(v1);
00055   generic* r= mmx_new<generic> (n);
00056   for (nat i=0; i<n; i++)
00057     r[i]= fun->apply (v1[i], v2[i]);
00058   return vector<generic> (r, n, format<generic> ());
00059 }

vector<generic> mmx::vector_map_n ( const routine fun,
const vector< vector< generic > > &  a 
)

Definition at line 62 of file glue_vector_map.cpp.

References arg(), ASSERT, is_a_scalar(), N(), and n.

Referenced by vector_map().

00062                                                                      {
00063   bool all_scalar= true, one_scalar= false;
00064   nat i, n= N(a), l= 0;
00065   for (i=0; i<n; i++)
00066     if (is_a_scalar (a[i])) one_scalar= true;
00067     else {
00068       if (all_scalar) l= N(a[i]);
00069       else ASSERT (N(a[i]) == l, "vectors of unequal lengths");
00070       all_scalar= false;
00071     }
00072 
00073   if (all_scalar) {
00074     vector<generic> arg= fill<generic> (n);
00075     for (i=0; i<n; i++)
00076       arg[i]= a[i].scalar();
00077     return vector<generic> (fun->apply (arg));
00078   }
00079 
00080   if (one_scalar) {
00081     vector<vector<generic> > b= fill<vector<generic> > (n);
00082     for (i=0; i<n; i++)
00083       if (is_a_scalar (a[i])) b[i]= vector<generic> (a[i].scalar(), l);
00084       else b[i]= a[i];
00085     return vector_map_n (fun, b);
00086   }
00087 
00088   generic* r= mmx_new<generic> (l);
00089   for (nat j=0; j<l; j++) {
00090     vector<generic> arg= fill<generic> (n);
00091     for (i=0; i<n; i++)
00092       arg[i]= a[i][j];
00093     r[j]= fun->apply (arg);
00094   }
00095   return vector<generic> (r, l, format<generic> ());
00096 }

vector<T> mmx::vector_new ( const vector< T > &  v  )  [inline]

Definition at line 201 of file mmc_glue.hpp.

00201                                 {
00202   return v;
00203 }

vector<T> mmx::vector_nil ( const format< T > &  fm  )  [inline]

Definition at line 216 of file mmc_glue.hpp.

00216                                  {
00217   return vec<T> (fm);
00218 }

vector<T> mmx::vector_nil (  )  [inline]

Definition at line 211 of file mmc_glue.hpp.

00211               {
00212   return vector<T> ();
00213 }

vector<T> mmx::vector_range ( const vector< T > &  v,
const int &  i,
const int &  j 
) [inline]

Definition at line 251 of file mmc_glue.hpp.

References range().

00251                                                               {
00252   return range (v, (nat) i, (nat) j);
00253 }

T mmx::vector_read ( const vector< T > &  v,
const int &  i 
) [inline]

Definition at line 241 of file mmc_glue.hpp.

00241                                                {
00242   return v[(nat) i];
00243 }

vector<T> mmx::vector_reverse ( const vector< T > &  v  )  [inline]

Definition at line 266 of file mmc_glue.hpp.

References is_a_scalar(), N(), and n.

00266                                     {
00267   if (is_a_scalar (v)) return v;
00268   nat i, n= N(v);
00269   vector<T> r= fill<T> (n);
00270   for (i=0; i<n; i++) r[i]= v[n-1-i];
00271   return r;
00272 }

generic mmx::vector_size ( const generic g  ) 

Definition at line 65 of file generic.cpp.

References as(), is(), and N().

Referenced by void_binary_helper< table< C, T, V > >::size().

00065                                        {
00066   if (!is<vector<generic> > (g)) return 0;
00067   else return N(as<vector<generic> > (g)); }

vector<generic> mmx::vector_sort ( const vector< generic > &  v  ) 

Definition at line 139 of file glue_vector_map.cpp.

References copy(), and sort().

Referenced by glue_vector_map().

00139                                        {
00140   vector<generic> r= copy (v);
00141   sort (r);
00142   return r;
00143 }

vector<generic> mmx::vector_sort_leq ( const vector< generic > &  v,
const generic f 
)

Definition at line 153 of file glue_vector_map.cpp.

References copy(), current_comparison, and default_routine().

Referenced by glue_vector_map().

00153                                                              {
00154   routine old_comparison= current_comparison;
00155   current_comparison= is<routine> (f)? as<routine> (f): default_routine (f);
00156   vector<generic> r= copy (v);
00157   sort_leq<vector_sort_leq_op> (r);
00158   current_comparison= old_comparison;
00159   return r;
00160 }

generic vector_to_compound ( const vector< generic > &  v  ) 

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().

00022                                               {
00023   return as<generic> (compound (v));
00024 }

T& mmx::vector_write ( vector< T > &  v,
const int &  i 
) [inline]

Definition at line 246 of file mmc_glue.hpp.

00246                                           {
00247   return v[(nat) i];
00248 }

Dest& mmx::view_as ( Src &  src  )  [inline]

Definition at line 60 of file instance.hpp.

00060                    {
00061   return *((Dest*) ((void*) &src));
00062 }

Dest mmx::view_as ( const Src &  src  )  [inline]

Definition at line 55 of file instance.hpp.

00055                          {
00056   return *((Dest*) ((void*) &src));
00057 }

generic mmx::vlist ( const vector< generic > &  v  )  [inline]

Definition at line 147 of file mmx_printer.cpp.

References gen().

00147                                                 {
00148   return gen ("$vlist", v); }

generic void_value (  ) 
bool mmx::wait ( const port &  p,
int  msec 
) [inline]

Definition at line 117 of file port.hpp.

References inside().

Referenced by composite_port_rep::wait().

00117                                            {
00118   return inside (p)->wait (msec); }

nat wait_port_event ( int  msecs  ) 

Definition at line 108 of file posix_port.cpp.

References busy(), entries(), in_count, and max().

Referenced by connect_to_server().

00108                             {
00109   //mmout << "Global wait " << msecs << " ms\n";
00110   int max_fd= 0;
00111 
00112   fd_set in_fds;
00113   FD_ZERO (&in_fds);
00114   for (iterator<int> it= entries (in_count); busy (it); ++it) {
00115     //mmout << "  Setting " << (*it) << "\n";
00116     FD_SET (*it, &in_fds);
00117     max_fd= max (max_fd, (*it) + 1);
00118   }
00119   
00120   nat nr;
00121   struct timeval tv;
00122   tv.tv_sec  = msecs / 1000;
00123   tv.tv_usec = 1000 * (msecs % 1000);
00124   if (msecs < 0) nr= select (max_fd, &in_fds, NULL, NULL, NULL);
00125   else nr= select (max_fd, &in_fds, NULL, NULL, &tv);
00126   //mmout << "Received " << nr << "\n";
00127   return nr;
00128 }

mmx::WRAP_BINARY_IMPL ( template< typename Cat, nat Nr >  ,
instance< Cat, Nr >  ,
generic  ,
"Ins"  ,
"Ins"   
)
mmx::WRAP_BINARY_IMPL_1 ( template< typename C >  ,
tuple< C >  ,
generic  ,
"Tu"  ,
"Tuple"  ,
 
) const

Definition at line 50 of file tuple.hpp.

References GEN_TUPLE, N(), n, Tuple, and vector_to_compound().

00057                               {
00058   nat i, n= N(a);
00059   vector<generic> t= fill<generic> (n+1);
00060   t[0]= GEN_TUPLE;
00061   for (i=0; i<n; i++)
00062     t[i+1]= as<generic> (a[i]);
00063   return Tuple (vector_to_compound (t));
00064 }

mmx::WRAP_BINARY_IMPL_1 ( template< typename C >  ,
row_tuple< C >  ,
generic  ,
"Rtu"  ,
"Row_tuple"  ,
 
) const

Definition at line 52 of file row_tuple.hpp.

References GEN_ROW, N(), n, Row_tuple, and vector_to_compound().

00059                                   {
00060   nat i, n= N(a);
00061   vector<generic> t= fill<generic> (n+1);
00062   t[0]= GEN_ROW;
00063   for (i=0; i<n; i++)
00064     t[i+1]= as<generic> (a[i]);
00065   return Row_tuple (vector_to_compound (t));
00066 }

mmx::WRAP_INDIRECT_IMPL ( template< typename C >  inline,
tuple< C >   
) const

Definition at line 41 of file tuple.hpp.

References N().

00043                                    { return N (*t) - 1; }

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.

00048                              {
00049   return as_syntactic (gen (GEN_ROW, cdr (compound_to_vector (*t))));
00050 }

mmx::WRAP_INDIRECT_IMPL ( inline  ,
routine   
) const
mmx::WRAP_INDIRECT_IMPL ( inline  ,
generic_function   
)

Definition at line 46 of file generic_function.hpp.

00049                                                        {

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.

00065                             : public void_binary_helper<Alias > {
00066   static inline string short_type_name () {
00067     return "Al" * Short_type_name (C); }
00068   static inline generic full_type_name () {
00069     return gen ("Alias", Full_type_name (C)); }
00070 };

mmx::WRAP_PRINT_IMPL ( template< typename Cat, nat Nr >  ,
instance< Cat, Nr >   
)
mmx::WRAP_WRAPPED_IMPL ( template< typename Cat, nat Nr >  ,
instance< Cat, Nr >   
)
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().

00146                          : public Alias_rep {
00147   generic_alias<C> a;
00148   C* temp;
00149 public:
00150   inline incarnate_alias_rep (const generic_alias<C>& a2):
00151     a (a2), temp (NULL) {}
00152   inline ~incarnate_alias_rep () {
00153     ASSERT (temp == NULL, "destruction while accessing alias"); }
00154   inline C get () const { return get_genalias (a); }
00155   inline C& open () const {
00156     incarnate_alias_rep<C>* me= const_cast<incarnate_alias_rep<C>*> (this);
00157     me->temp= mmx_new_one<C> (as<C> (get_genalias (a)));
00158     return *me->temp; }
00159   inline void close () const {
00160     incarnate_alias_rep<C>* me= const_cast<incarnate_alias_rep<C>*> (this);
00161     set_genalias (a, as<generic> (*temp));
00162     mmx_delete_one<C> (me->temp);
00163     me->temp= NULL; }
00164 };

static void mmx::write ( string r,
const string obj->lex_string 
) [static]

Definition at line 501 of file mmx_texmacs.cpp.

References ends(), N(), and n.

00501                                    {
00502   nat i, n=N(s);
00503   for (i=0; i<n; i++) {
00504     char c= s[i];
00505     if (c == ' ' && ends (r, " ")) r << "\\ ";
00506     else if (c == '\n') r << "\\n";
00507     else if (c == '\t') r << "\\t";
00508     else if (c == '\0') r << "\\0";
00509     else if (c == '\\') r << "\\\\";
00510     else if (c == '<') r << "\\<";
00511     else if (c == '|') r << "\\|";
00512     else if (c == '>') r << "\\>";
00513     else if (c == '\34') r << c;
00514     else if (((unsigned char) c) < ' ') r << '\\' << (c+'@');
00515     else r << c;
00516   }
00517 }

void mmx::write ( const storage st,
const string var,
const string val 
) [inline]

Wrap storage st such that values will be read at most once from server.

Definition at line 66 of file storage.hpp.

00066                                                                             {
00067   st->write (var, val); }

void write ( const port &  p,
const string &  s 
) [inline]

Definition at line 109 of file port.hpp.

References inside(), and N().

00109                                                    {
00110   inside (p)->write (inside (s, 0), N(s)); }

void write ( const port &  p,
const char *  s,
nat  n 
) [inline]
generic wrong_nr_args ( const generic where  ) 

Definition at line 36 of file exception.cpp.

References std_exception().

00036                                      {
00037   return std_exception ("wrong number of arguments", where);
00038 }

generic xaccess ( const generic f,
const generic args 
)

Definition at line 173 of file generic.cpp.

References comma(), GEN_ACCESS, and xgen().

00173                                                         {
00174   return xgen (GEN_ACCESS, comma (f, args)); }

syntactic xderive ( const syntactic g,
const syntactic v 
)

Definition at line 482 of file syntactic.cpp.

References GEN_XDERIVE, and syn().

00482                                                            {
00483   return syn (GEN_XDERIVE, g, v); }

syntactic xderive ( const syntactic g  ) 

Definition at line 480 of file syntactic.cpp.

References GEN_XDERIVE, and syn().

Referenced by xderive_op::op(), and xderive_op::set_op().

00480                                        {
00481   return syn (GEN_XDERIVE, g); }

syntactic xgcd ( const syntactic g1,
const syntactic g2 
)

Definition at line 413 of file syntactic.cpp.

References exact_eq(), GEN_ROW, GEN_SQTUPLE, and syn().

00413                                                           {
00414   if (exact_eq (g1, 0))
00415     return exact_eq (g2, 0) ?
00416       syn (GEN_SQTUPLE, syn (GEN_ROW, 1, 0     ), syn (GEN_ROW, 0, 1)) :
00417       syn (GEN_SQTUPLE, syn (GEN_ROW, 0, 1 / g2), syn (GEN_ROW, 1, 0));
00418   return exact_eq (g2, 0) ?
00419     syn (GEN_SQTUPLE, syn (GEN_ROW, 1 / g1, 0), syn (GEN_ROW, 0  , 1 )) :
00420     syn (GEN_SQTUPLE, syn (GEN_ROW, 1 / g1, 0), syn (GEN_ROW, -g2, g1));
00421 }

xgcd_matrix<generic> mmx::xgcd ( const generic &  x1,
const generic &  x2 
)

Referenced by xgcd_op::op(), and xgcd_op::set_op().

generic xgen ( const generic f,
const generic args 
)

Definition at line 162 of file generic.cpp.

References vector_to_compound(), and xgen_sub().

Referenced by xaccess(), xrow(), xsqtuple(), and xtuple().

00162                                              {
00163   vector<generic> v;
00164   v << f;
00165   xgen_sub (v, args);
00166   return vector_to_compound (v);
00167 }

void mmx::xgen_sub ( vector< generic > &  v,
const generic g 
)

Definition at line 152 of file generic.cpp.

References exact_eq(), GEN_COMMA, n, and N().

Referenced by xgen().

00152                                                 {
00153   if (is<compound> (g) && N(g) >= 1 && exact_eq (g[0], GEN_COMMA)) {
00154     int i, n= N(g);
00155     for (i=1; i<n; i++)
00156       xgen_sub (v, g[i]);
00157   }
00158   else v << g;
00159 }

generic xrow ( const generic args  ) 

Definition at line 179 of file generic.cpp.

References GEN_ROW, and xgen().

00179                                 {
00180   return xgen (GEN_ROW, g); }

generic xsqtuple ( const generic args  ) 

Definition at line 177 of file generic.cpp.

References GEN_SQTUPLE, and xgen().

Referenced by trig_op::op(), and trig().

00177                                     {
00178   return xgen (GEN_SQTUPLE, g); }

generic xtuple ( const generic args  ) 

Definition at line 175 of file generic.cpp.

References GEN_TUPLE, and xgen().

00175                                   {
00176   return xgen (GEN_TUPLE, g); }

C mmx::zero_cst (  )  [inline]

Definition at line 888 of file type_props.hpp.

References C, and set_zero().

00888 { C r; set_zero (r); return r; }

scalar_type_helper< T >::val mmx::zero_scalar ( const T &  y  )  [inline]

Definition at line 567 of file type_props.hpp.

References promote_scalar().

00567                          {
00568   return promote_scalar ((int) 0, y);
00569 }


Variable Documentation

char * alloc_mem = NULL

Definition at line 27 of file fast_new.cpp.

Referenced by enlarge_malloc().

size_t alloc_remains = 0

Definition at line 28 of file fast_new.cpp.

Referenced by enlarge_malloc(), mmx_mem_info(), and mmx_used_bytes().

Definition at line 26 of file fast_new.cpp.

Referenced by mmx_mem_info(), and mmx_used_bytes().

Definition at line 29 of file fast_new.cpp.

string(* as_string_hook)(double x) = NULL

Referenced by as_string().

Definition at line 20 of file source_track.cpp.

Referenced by source_exception().

bool batch_mode = false

Definition at line 54 of file terminal_interface.cpp.

Referenced by batch_mode_initialize().

Definition at line 55 of file generic.cpp.

Referenced by attach_generic_binary_reader(), and binary_read_generic().

C

Definition at line 182 of file new_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(), default_cst(), solve_vector_lde_op::diff_op(), 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< new_table< 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(), infinity_cst(), insert(), is_numeric_string(), is_reliable(), iterator< C >::iterator(), largest_cst(), table_rep< D, pair< S1, S2 >, table_variant >::lazy_initialize(), new_table_rep< C, T, V >::lazy_initialize(), 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(), one_cst(), 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(), powint(), promote(), heap_rep< C >::Pull(), range(), binary_helper< vector< C, V > >::read(), binary_helper< table< C, T, V > >::read(), binary_helper< new_table< C, T, V > >::read(), vector_rep< observer, V >::resize(), heap_rep< C >::resize(), reverse(), format< iterator< T > >::sample(), seq(), set_as(), 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< new_table< 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(), sparse_vector< C, T, V >::sparse_vector(), string_as_numeric(), string_to_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(), 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(), WRAP_WRAPPED_IMPL(), and zero_cst().

C2
bool color_mode = false

Definition at line 22 of file port.cpp.

Referenced by supports_color().

char * command_name = NULL

Definition at line 33 of file system.cpp.

Referenced by command_dir().

void(* compiler_initialize)(void) = NULL

Referenced by mmc_initialize().

void(* compiler_terminate)(void) = NULL

Referenced by mmc_terminate().

bool completion_mode = true

Referenced by opname_table().

generic CPP_AND("and")

Referenced by opname_table().

Referenced by opname_table().

Referenced by opname_table().

Referenced by opname_table().

generic CPP_BEGIN("begin")

Referenced by opname_table().

Referenced by opname_table().

Referenced by opname_table().

generic CPP_BOOL_TYPE("Boolean")
generic CPP_BREAK("break")
generic CPP_CATCH("catch")

Referenced by opname_table().

generic CPP_CONST("const")
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")
generic CPP_DO("do")
generic CPP_ELSE("else")

Referenced by opname_table().

generic CPP_EXIT("exit")
generic CPP_EXTERN("extern")
generic CPP_EXTERN_C("extern_C")
generic CPP_FOR("for")
generic CPP_FRIEND("friend")

Referenced by is_function_type().

generic CPP_GOTO("goto")

Referenced by opname_table().

Referenced by opname_table().

Referenced by opname_table().

generic CPP_IF("if")
generic CPP_INHERIT("inherit")
generic CPP_INITIALIZE("initialize")
generic CPP_INLINE("inline")

Referenced by is_function_type().

generic CPP_LABEL("label")

Referenced by opname_table().

Referenced by opname_table().

Referenced by opname_table().

generic CPP_MACRO("cpp_macro")

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")
generic CPP_NEW("new")

Referenced by opname_table().

generic CPP_OR("or")

Referenced by opname_table().

Referenced by opname_table().

Referenced by opname_table().

Referenced by opname_table().

Referenced by opname_table().

Referenced by opname_table().

Referenced by opname_table().

generic CPP_PUBLIC("public")
generic CPP_RETURN("return")
generic CPP_SPECIALIZE("specialize")
generic CPP_STATIC("static")

Referenced by is_function_type().

generic CPP_STRUCT("struct")
generic CPP_SWITCH("switch")
generic CPP_TEMPLATE("template")
generic CPP_THROW("raise")

Referenced by opname_table().

Referenced by opname_table().

generic CPP_TRY("try")
generic CPP_TYPE_CONSTRUCTOR("type_constructor")
generic CPP_TYPEDEF("typedef")
generic CPP_UNALIAS("unalias")

Referenced by opname_table().

generic CPP_UNFUNCTION("unfunction")
generic CPP_UNPOINTER("unpointer")
generic CPP_USING("using")
generic CPP_VERBATIM("verbatim")
generic CPP_VIRTUAL("virtual")
generic CPP_WHILE("while")
static routine current_comparison [static]
bool debug_mode = false

Definition at line 48 of file terminal_interface.cpp.

void(* dynamic_event)(const string &id, const generic &val) ( const string &  id,
const generic &  val 
) = NULL
void(* embedded_link)(const string &name) ( const string &  name  )  = NULL

Referenced by dl_link().

bool ev_lock = false

Definition at line 56 of file evaluator.cpp.

Definition at line 30 of file fast_new.cpp.

Referenced by enlarge_malloc(), mmx_mem_info(), and mmx_used_bytes().

bool fed [static]

Definition at line 280 of file terminal_interface.cpp.

Referenced by active_newline(), passive_newline(), and shell_terminal_input().

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 242 of file syntactic.cpp.

Referenced by operator*(), operator/(), pow(), and set_frac_flag().

generic GEN_ABS("abs")

Referenced by abs(), abs_as_op::name(), and abs_op::name().

generic GEN_ACCURACY("accuracy")

Referenced by set_accuracy().

generic GEN_ADDITIVE_ERROR("additive_error")
generic GEN_ALIAS("alias")
generic GEN_ALL_TYPES("all_types")

Referenced by all_type_names(), and define_type_sub().

generic GEN_AND("/\\")
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().

generic GEN_ARG("arg")

Referenced by arg(), and arg_op::name().

generic GEN_ARGCH("argch")

Referenced by accelerate(), acosh(), and acosh_op::name().

generic GEN_ARGSH("argsh")

Referenced by accelerate(), asinh(), and asinh_op::name().

generic GEN_ARGTH("argth")

Referenced by accelerate(), atanh(), and atanh_op::name().

Referenced by is_C0(), and mmx_printer::pp_E0().

generic GEN_ASSUME("assume")

Referenced by is_C0(), and mmx_printer::pp_E0().

generic GEN_AUTOFOLD("autofold")

Referenced by is_C0().

generic GEN_BACKTRACE("backtrace")
generic GEN_BALL("ball")

Referenced by ball_op::name().

generic GEN_BEGIN("begin")

Referenced by is_C0(), and un_try_catch().

generic GEN_BLUR("blur")

Referenced by blur_op::name().

Referenced by define_prerequisites().

generic GEN_BREAK("break")

Referenced by is_C0().

generic GEN_CACHE_CONVERTER("cache/converter")
generic GEN_CACHE_CONVERTERS("cache/converters")
generic GEN_CACHE_PENALTY("cache/penalty")

Referenced by derive().

generic GEN_CASE("case")
generic GEN_CAST("cast")

Referenced by accelerate().

generic GEN_CATALAN("mathcatalan")

Referenced by math_symbol_table(), and set_catalan().

generic GEN_CATCH("catch")
generic GEN_CATEGORY("category")

Referenced by is_C0().

generic GEN_CBRT("cbrt")

Referenced by cbrt_op::name().

generic GEN_CEIL("ceil")

Referenced by ceil(), and ceil_op::name().

generic GEN_CENTER("center")

Referenced by center(), and center_op::name().

generic GEN_CH("ch")

Referenced by accelerate(), cosh(), and cosh_op::name().

generic GEN_CHANGE_PRECISION("change_precision")
generic GEN_CLASS("class")

Referenced by is_C0().

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")

Referenced by is_applicable().

Referenced by is_applicable().

Referenced by comma(), and xgen_sub().

generic GEN_COMPLETE("complete")

Referenced by complete_op::name().

Referenced by define_prerequisites().

generic GEN_CONJ("conj")

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 309 of file identifiers.hpp.

Referenced by convert().

generic GEN_CONVERTER("converter")
generic GEN_CONVERTERS("converters")
generic GEN_COS("cos")

Referenced by accelerate(), cos(), and cos_op::name().

generic GEN_D("mathd")

Referenced by is_C0(), and mmx_printer::pp_E0().

Referenced by is_C0(), and mmx_printer::pp_E0().

generic GEN_DELTA("delta")

Referenced by math_symbol_table().

generic GEN_DENOMINATOR("denominator")
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")
generic GEN_DIV("div")
generic GEN_DO("do")

Referenced by math_symbol_table().

Referenced by define_prerequisites().

generic GEN_DOWNGRADE("downgrade")
generic GEN_DOWNTO("downto")

Referenced by math_symbol_table().

generic GEN_DUPLICATE("duplicate")
generic GEN_E("mathe")

Referenced by math_symbol_table().

generic GEN_ELEMENTARY_ERROR("elementary_error")
generic GEN_ELSE("else")
generic GEN_EQUALIZE_GROUPED("equalize_grouped")

Referenced by math_symbol_table().

generic GEN_ERF("erf")

Referenced by erf_op::name().

generic GEN_ERROR("error")
generic GEN_EULER("matheuler")

Referenced by math_symbol_table(), and set_euler().

generic GEN_EVALUATE("evaluate")

Referenced by evaluate_op::name().

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")
generic GEN_EXISTS("exists")

Referenced by is_C0(), and mmx_printer::pp_E0().

generic GEN_EXP("exp")

Referenced by accelerate(), exp(), and exp_op::name().

generic GEN_EXP10("exp10")

Referenced by exp10_op::name().

generic GEN_EXP2("exp2")

Referenced by exp2_op::name().

generic GEN_EXPECTED("expected")
generic GEN_EXPONENT("exponent")

Referenced by exponent(), and exponent_op::name().

generic GEN_EXPORT("export")
generic GEN_EXTERN("extern")

Referenced by is_C0().

Referenced by math_symbol_table().

generic GEN_FALSE("false")

Referenced by define_prerequisites().

generic GEN_FAST("fast")

Referenced by fast_op::name().

generic GEN_FLATTEN("flatten")
generic GEN_FLOOR("floor")

Referenced by floor(), and floor_op::name().

generic GEN_FOR("for")
generic GEN_FORALL("forall")

Referenced by is_C0(), and mmx_printer::pp_E0().

generic GEN_FOREIGN("foreign")

Referenced by is_C0().

generic GEN_FUZZ("Fuzz")

Referenced by set_fuzz().

generic GEN_GAMMA("gamma")

Referenced by gamma_op::name().

generic GEN_GAUSSIAN("gaussian")

Referenced by gaussian_op::name().

generic GEN_GCD("gcd")

Referenced by gcd(), and gcd_op::name().

generic GEN_GENERATE("generate")
generic GEN_GENERIC_ALIAS_TYPE("Generic_alias")
generic GEN_GLOBAL("global")
generic GEN_GRAD("grad")
generic GEN_GRAEFFE("graeffe")

Referenced by graeffe_op::name().

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().

generic GEN_HAS("has")
generic GEN_HASH("hash")

Referenced by hash_op::name().

generic GEN_HYPOT("hypot")

Referenced by accelerate(), hypot(), and hypot_op::name().

generic GEN_I("mathi")

Referenced by math_symbol_table(), and set_imaginary().

generic GEN_IDENTITY("identity")

Referenced by compose(), and id_op::name().

generic GEN_IF("if")

Referenced by is_C0().

generic GEN_IM("Im")

Referenced by Im(), and Im_op::name().

Referenced by math_symbol_table().

generic GEN_IMPORT("import")
generic GEN_IN("in")

Referenced by math_symbol_table().

generic GEN_INCLUDED("included")

Referenced by included_op::name().

Referenced by inf_op::name().

generic GEN_INFIX("infix")
generic GEN_INLINE("inline")

Referenced by is_C0().

generic GEN_INPLACE("inplace")

Referenced by define_prerequisites().

generic GEN_INTEGRATE("integrate")
generic GEN_INTEGRATE_INIT("integrate_init")

Referenced by integrate_init_op::name().

generic GEN_INTERN("intern")

Referenced by is_C0().

generic GEN_INTERVAL("interval")

Referenced by interval_op::name().

generic GEN_INVERT("invert")

Referenced by accelerate(), and invert_op::name().

generic GEN_KEYWORD("keyword")
generic GEN_LAMBDA("lambda")

Referenced by is_applicable(), and is_C0().

generic GEN_LARGEST("largest")

Referenced by set_largest().

generic GEN_LCM("lcm")

Referenced by lcm(), and lcm_op::name().

Referenced by math_symbol_table(), and operator<<().

Referenced by is_C0(), and mmx_printer::pp_E0().

generic GEN_LIFT("lift")

Referenced by lift_op::name().

generic GEN_LIST("list")
generic GEN_LITERAL_FLOATING("literal_floating")
generic GEN_LITERAL_INTEGER("literal_integer")
generic GEN_LITERAL_STRING("literal_string")

Referenced by define_prerequisites().

generic GEN_LOCAL("local")
generic GEN_LOG("log")

Referenced by accelerate(), log(), and log_op::name().

generic GEN_LOG10("log10")

Referenced by log10_op::name().

generic GEN_LOG2("log2")

Referenced by log2_op::name().

generic GEN_LOG2_AS("set_log2")
generic GEN_LOOP("loop")

Referenced by is_C0().

generic GEN_LOWER("lower")

Referenced by lower_op::name().

generic GEN_MACRO("macro")

Referenced by is_applicable(), and is_C0().

Referenced by define_prerequisites().

generic GEN_MAGNITUDE("magnitude")

Referenced by magnitude(), and magnitude_op::name().

Referenced by math_symbol_table().

generic GEN_MATCH("match")
generic GEN_MAX("max")

Referenced by max(), and max_op::name().

generic GEN_METHOD("method")

Referenced by is_C0().

generic GEN_MIN("min")

Referenced by min(), and min_op::name().

generic GEN_MOD("mod")
generic GEN_MODULE("module")

Referenced by is_C0().

generic GEN_MUL_ADD("mul_add")
generic GEN_MUL_SUB("mul_sub")

Referenced by mul_sub_op::name().

generic GEN_MULTIPLICATIVE_ERROR("multiplicative_error")
generic GEN_MUTABLE("mutable")

Referenced by is_C0().

generic GEN_NAN("NaN")

Referenced by set_nan().

generic GEN_NEW("new")

Referenced by define_constructor().

generic GEN_NEXT_ABOVE("next_above")

Referenced by next_above().

generic GEN_NEXT_BELOW("next_below")

Referenced by next_below().

generic GEN_NIL("nil")

Referenced by flatten().

generic GEN_NOOP("noop")

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")
generic GEN_OR("\\/")

Referenced by math_symbol_table(), and operator|().

generic GEN_OUTLINE("outline")

Referenced by is_C0().

generic GEN_OVER_I("over_i")

Referenced by over_i_op::name().

generic GEN_PARTIAL("partial")

Referenced by math_symbol_table().

generic GEN_PATTERN("pattern")
generic GEN_PENALTY("penalty")

Referenced by is_C0(), and mmx_printer::pp_E0().

generic GEN_PI("mathpi")

Referenced by math_symbol_table(), and set_pi().

generic GEN_POLAR("polar")

Referenced by polar_op::name().

generic GEN_POSTFIX("postfix")
generic GEN_PRECISION("precision")

Referenced by precision_op::name(), and precision().

generic GEN_PREFER("prefer")
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_QUO("quo")
generic GEN_RADIUS("radius")

Referenced by radius_op::name(), and radius().

generic GEN_RAISE("raise")

Referenced by math_symbol_table().

generic GEN_RE("Re")

Referenced by Re_op::name(), and Re().

generic GEN_RECONSTRUCT("reconstruct")

Referenced by reconstruct_op::name().

generic GEN_REM("rem")
generic GEN_RETURN("return")

Referenced by is_C0().

generic GEN_REVERSE("reverse")

Referenced by reverse_op::name().

generic GEN_REWRITE("rewrite")
generic GEN_ROUND("round")

Referenced by round_op::name(), and round().

generic GEN_ROUNDING_ERROR("rounding_error")

Referenced by define_prerequisites().

generic GEN_ROW("(.)")

Referenced by is_applicable(), and math_symbol_table().

Referenced by is_applicable(), and math_symbol_table().

generic GEN_SH("sh")

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().

generic GEN_SIN("sin")

Referenced by accelerate(), sin_op::name(), and sin().

Referenced by math_symbol_table().

generic GEN_SLOW("slow")

Referenced by slow_op::name().

generic GEN_SMALLEST("smallest")

Referenced by set_smallest().

generic GEN_SOLVE("solve")

Referenced by solve().

generic GEN_SPECIALIZE("specialize")
generic GEN_SPECIALIZE_ALIAS("specialize_alias")
generic GEN_SQRT("sqrt")

Referenced by accelerate(), sqrt_op::name(), pow(), and sqrt().

generic GEN_SQUARE("square")

Referenced by accelerate(), and square_op::name().

generic GEN_STEP("step")
generic GEN_SUBSTITUTE("substitute")

Referenced by substitute().

Referenced by sup_op::name().

generic GEN_TAN("tan")

Referenced by accelerate(), tan_op::name(), and tan().

generic GEN_TH("th")

Referenced by accelerate(), tanh_op::name(), and tanh().

generic GEN_THIS("this")
generic GEN_TIMES_I("times_i")

Referenced by times_i_op::name().

generic GEN_TO("to")

Referenced by math_symbol_table().

generic GEN_TRANSITIVE("transitive")

Referenced by math_symbol_table().

generic GEN_TRUE("true")

Referenced by define_prerequisites().

generic GEN_TRUNC("trunc")

Referenced by trunc_op::name(), and trunc().

generic GEN_TRUNCATE("truncate")

Referenced by truncate_op::name().

generic GEN_TRY("try")

Referenced by is_C0().

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_UNALIAS("unalias")
generic GEN_UNSPECIFIED_TYPE("Unspecified")

Referenced by type_name().

generic GEN_UNTIL("until")
generic GEN_UPGRADE("upgrade")
generic GEN_UPPER("upper")

Referenced by upper_op::name().

Referenced by math_symbol_table().

Referenced by math_symbol_table().

generic GEN_VIA_TUPLE("via_tuple")

Referenced by math_symbol_table().

Referenced by math_symbol_table().

generic GEN_WHILE("while")
generic GEN_XDERIVE("xderive")

Referenced by xderive_op::name(), and xderive().

generic GEN_XGCD("xgcd")
generic GEN_XOR("xor")

Referenced by is_applicable(), and math_symbol_table().

generic GEN_YIELD("yield")
generic GEN_ZETA("zeta")

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().

00108                                                  {
00109   static table<void (*) (), string> t;
00110   return t;
00111 }

const nat hibit_mask = ((nat) 1) << 31

Definition at line 54 of file new_table.hpp.

Referenced by new_table_rep< C, T, V >::find(), and new_table_rep< C, T, V >::set().

Definition at line 51 of file terminal_interface.cpp.

Referenced by shell_load_history(), and shell_save_history().

Initial value:
 
  list<string> ("case", "continue", "else", "error") *
  list<string> ("exists", "for", "generate", "in") *
  list<string> ("operator", "postfix", "prefix", "step") *
  list<string> ("then", "until", "while", "help")

Definition at line 190 of file terminal_interface.cpp.

Referenced by complete(), and completion_generator().

table< int, int > in_count
static nat indentation_level = 0 [static]

Definition at line 193 of file cpp_printer.cpp.

Referenced by cpp_printer::cpp_printer(), and operator<<().

const int int_minus_infinity = (int) ((((nat) (-1)) >> 1) + 1)

Definition at line 23 of file int.hpp.

Referenced by glue_int().

const int int_plus_infinity = (int) (((nat) (-1)) >> 1)

Definition at line 22 of file int.hpp.

Referenced by glue_int().

const int int_size = sizeof (int)

Definition at line 25 of file int.hpp.

const int long_int_size = sizeof (long int)

Definition at line 26 of file int.hpp.

bool math_mode = false

Definition at line 21 of file port.cpp.

Referenced by output_as_mmx(), and shell_texmacs_output().

Definition at line 22 of file mmc_glue.cpp.

Referenced by mmc_initialize().

port mmerr = formatting_port (output_file_port (stderr, false, false, "mmerr"))
port mmin = input_file_port (stdin , false, false, "mmin")

Definition at line 137 of file file_port.cpp.

Referenced by glue_port(), and shell_texmacs_input().

port mmout = formatting_port (output_file_port (stdout, false, false, "mmout"))
bool mmx_abbreviate_coerce = true

Definition at line 23 of file mmx_printer.cpp.

int mmx_argc

Definition at line 22 of file basix.cpp.

char ** mmx_argv

Definition at line 23 of file basix.cpp.

new_table< C, T, V >

Definition at line 182 of file new_table.hpp.

table< int, int > out_count
const char path_sep = ':' [static]

Definition at line 58 of file system.cpp.

Referenced by global_path(), load_path(), path_name(), resolve_name(), and var_load().

bool quiet_mode = false

Definition at line 47 of file terminal_interface.cpp.

Referenced by shell_terminal_input().

Definition at line 182 of file new_table.hpp.

bool script_mode = false

Definition at line 46 of file terminal_interface.cpp.

string shell_mmx_prompt = "mmx-prompt"

Definition at line 160 of file texmacs_interface.cpp.

Referenced by shell_texmacs_input().

Definition at line 58 of file evaluator.cpp.

Referenced by restore_evaluator(), and select_evaluator().

Definition at line 196 of file terminal_interface.cpp.

Referenced by complete(), and completion_generator().

Definition at line 189 of file system.cpp.

T
table< C, T, V >

Definition at line 160 of file table.hpp.

bool texmacs_mode = false

Definition at line 22 of file port.hpp.

Referenced by batch_mode_initialize(), and supports_color().

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 551 of file syntactic.cpp.

Definition at line 549 of file syntactic.cpp.

Definition at line 550 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().

Definition at line 216 of file threads.cpp.

bool time_mode = false

Definition at line 50 of file terminal_interface.cpp.

bool type_mode = false

Definition at line 49 of file terminal_interface.cpp.

Referenced by shell_texmacs_output().

V

Definition at line 182 of file new_table.hpp.

Referenced by default_aligned_size(), and solve_vector_lde_op::diff_op().


Generated on 6 Dec 2012 for basix by  doxygen 1.6.1