class ECC::Curve

Attributes

a[R]
b[R]
f[R]

Public Class Methods

new( a:, b:, f: IntegerOp ) click to toggle source
# File lib/elliptic-lite/base.rb, line 25
def initialize( a:, b:, f: IntegerOp ) ## field (operations type) class
  @a  = a
  @b  = b
  @f  = f
end

Public Instance Methods

==(other) click to toggle source
# File lib/elliptic-lite/base.rb, line 36
def ==(other)
  if other.is_a?( Curve ) && field?( other )
    self.a == other.a && self.b == other.b
  else
    false
  end
end
field?( other ) click to toggle source
# File lib/elliptic-lite/base.rb, line 32
def field?( other )   ## matching field (operations type) class?
  @f == other.f
end