| Class | LTF::MaximaInputGenerator |
| In: |
lib/ltf/maxima_input_generator.rb
|
| Parent: | Object |
MaximaInputGenerator generates Maxima code to determine a linear tranformation from vector input/output constraints.
| DefaultSolsName | = | 'sols' |
Generate an array of formulas for a linear system.
Create a new MaximaInputGenerator. Raises InvalidConstraint if any constraints are invalid.
Return the number of transformation variables for a given input/output vector size. Raises ArgumentError if vector_size is less than zero.
Return transformation variable names for a given input/output vector size. Raises ArgumentError if vector_size is less than zero.
Return the vector variable names for a given input/output vector size. Raises ArgumentError if vector_size is less than zero.
Add a number of constraints at the same time. Raises InvalidConstraint if any constraints are invalid.
Add a constraint. A constraint is a pair of vectors (each of the same size, and also the same size as all previously-added constraints). This pair represents an input vector and the output vector the transformation should map it to.
Return true if the given input/output vectors are a valid constraint to add, false otherwise. Constraints must have equally-sized inputs and outputs. This size must also be equal to all previously-entered constraints.
Generate a Maxima input string that will solve for the linear transformation variables and print out the resulting transformation piece by piece.