General Information
Shortcuts:
NewSR: stands for the new Semiring, you want to generate.
Working with "Copy from Source Box"
Before selecting copy from SourceBox, you should first define the code within the sourceBox (see example for Binary operators).
If you want to change the code, just press the corresponding "show code" button (if you don't see it anymore inside the sourceBox)
and do your changes. After that again select "Copy from Source Box".
Defining Constructors
There are three type of Constructors, here are the corresponding parameter names:
1. Constructor( NewSR x)
2. Constructor ( Attrbiute1 a0, Attribute2 a1,..., AttributeN an-1)
3. Constructor (String str)
Defining "Binary operators"
Always use a and b to reference the binary operator parameters.
The corresponding attribute names are shown in the "selected attributes" list.
Example:
public NewSR operator +(NewSR a, NewSr b) { return new NewSR (a.mem0 + b.mem0); }You only need to define the body of the function (compound-statement). The definition of the function is generated automaticly. Please never forget to define the return-Statement. Otherwise your Code will not compile.
Defining LinearCombination
Always use set and vec to reference the function parameters.
set : represents the matrix
vec : represents the vector, which maybe could be a linear combination of the vectors contained by set.
The return parameter is of type : LinearCombination
public struct LinearCombination{ /// /// A boolean that indicates if a linear combination was found. /// public bool CombinationExists; ////// A T-valued array that stores the multiplicands. /// public T[] Multiplicands; }