next up previous contents
Next: Polynomials Up: Straight-line Programs Previous: Header Files

Usage Examples

  #include "slp.h"

  int
  main(int argc, char** argv)
  {
    Slp slp1 = 5;                       // Creates a leaf Slp with value 5 
    Slp slp2 = "x1";                    // Creates a leaf Slp for "x1". 
    Slp slp3 = slp1 + slp2              // Adds the two to get Slp for 5 + x1
    Field_element fe = evaluate(slp3);  // Evaluates the slp for the random
					// value that x1 has been set to. 
  }

1.0



Ashu Rege
Fri May 9 17:57:21 PDT 1997