Class: CAS::MinMax
- Defined in:
- lib/functions/fnc-piecewise.rb
Overview
Class MinMax is an intermediate class for Min and Max functions. It contains shared code and methods
Instance Attribute Summary
Attributes inherited from Piecewise
Attributes inherited from BinaryOp
Attributes inherited from Op
Instance Method Summary collapse
-
#to_latex ⇒ Object
Convert MinMax function into LaTeX representation.
-
#to_s ⇒ Object
Returns a string representation for the current operation.
Methods inherited from Piecewise
#==, #call, #diff, #dot_graph, #initialize, #to_code
Methods inherited from BinaryOp
#==, #args, #call, #depend?, #diff, #dot_graph, #initialize, #inspect, #simplify, #subs, #subs_lhs, #subs_rhs, #to_code
Methods inherited from Op
#!=, #*, #**, #+, #-, #-@, #/, #==, #args, #as_proc, #call, #depend?, #diff, #dot_graph, #equal, #greater, #greater_equal, init_simplify_dict, #initialize, #inspect, #limit, numeric_to_const, #simplify, simplify_dict, #simplify_dictionary, #smaller, #smaller_equal, #subs, #to_c_lib, #to_code
Constructor Details
This class inherits a constructor from CAS::Piecewise
Instance Method Details
#to_latex ⇒ Object
Convert MinMax function into LaTeX representation
* **returns**: `String` of LaTeX code
142 143 144 |
# File 'lib/functions/fnc-piecewise.rb', line 142 def to_latex "\\mathrm{#{@type}}\\left( \\begin{array}{c} #{@x.to_latex} \\\\ #{@y.to_latex} \\end{array} \\right)" end |
#to_s ⇒ Object
Returns a string representation for the current operation
* **returns**: `String`
149 150 151 |
# File 'lib/functions/fnc-piecewise.rb', line 149 def to_s "#{@type}(#{@x}, #{@y})" end |