Class: Plurimath::Math::Function::Table::Bmatrix
- Inherits:
-
Plurimath::Math::Function::Table
- Object
- Plurimath::Math::Function::TernaryFunction
- Plurimath::Math::Function::Table
- Plurimath::Math::Function::Table::Bmatrix
- Defined in:
- lib/plurimath/math/function/table/bmatrix.rb
Instance Attribute Summary
Attributes inherited from Plurimath::Math::Function::TernaryFunction
#parameter_one, #parameter_three, #parameter_two
Instance Method Summary collapse
-
#initialize(parameter_one, parameter_two = "[", parameter_three = "]") ⇒ Bmatrix
constructor
A new instance of Bmatrix.
- #to_latex ⇒ Object
Methods inherited from Plurimath::Math::Function::Table
#latex_environment, #to_asciimath, #to_html, #to_mathml_without_math_tag
Methods inherited from Plurimath::Math::Function::TernaryFunction
#==, #class_name, #to_asciimath, #to_html, #to_mathml_without_math_tag
Constructor Details
#initialize(parameter_one, parameter_two = "[", parameter_three = "]") ⇒ Bmatrix
Returns a new instance of Bmatrix.
10 11 12 13 14 |
# File 'lib/plurimath/math/function/table/bmatrix.rb', line 10 def initialize(parameter_one, parameter_two = "[", parameter_three = "]") super end |
Instance Method Details
#to_latex ⇒ Object
16 17 18 19 20 21 |
# File 'lib/plurimath/math/function/table/bmatrix.rb', line 16 def to_latex first_value = parameter_one&.map(&:to_latex)&.join("\\\\") matrices = Latex::Constants::MATRICES.invert environment = matrices[parameter_two].to_s "\\begin{#{environment}}#{first_value}\\end{#{environment}}" end |