Class: Plurimath::Math::Function::Table::Vmatrix

Inherits:
Plurimath::Math::Function::Table show all
Defined in:
lib/plurimath/math/function/table/vmatrix.rb

Instance Attribute Summary

Attributes inherited from Plurimath::Math::Function::TernaryFunction

#parameter_one, #parameter_three, #parameter_two

Instance Method Summary collapse

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 = "|") ⇒ Vmatrix

Returns a new instance of Vmatrix.



10
11
12
13
14
15
# File 'lib/plurimath/math/function/table/vmatrix.rb', line 10

def initialize(parameter_one,
               parameter_two = "|",
               parameter_three = "|")
  parameter_three = nil if parameter_two == "norm["
  super
end

Instance Method Details

#to_latexObject



17
18
19
20
# File 'lib/plurimath/math/function/table/vmatrix.rb', line 17

def to_latex
  first_value = parameter_one&.map(&:to_latex)&.join("\\\\")
  "\\begin{vmatrix}#{first_value}\\end{vmatrix}"
end