Class: Einsum::Label

Inherits:
Struct
  • Object
show all
Defined in:
lib/einsum.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dimension, count = 0) ⇒ Label

Returns a new instance of Label.



15
16
17
# File 'lib/einsum.rb', line 15

def initialize(dimension, count = 0)
  super(dimension, count)
end

Instance Attribute Details

#countObject

Returns the value of attribute count

Returns:

  • (Object)

    the current value of count



14
15
16
# File 'lib/einsum.rb', line 14

def count
  @count
end

#dimensionObject

Returns the value of attribute dimension

Returns:

  • (Object)

    the current value of dimension



14
15
16
# File 'lib/einsum.rb', line 14

def dimension
  @dimension
end

Instance Method Details

#incrementObject



19
20
21
# File 'lib/einsum.rb', line 19

def increment
  self.count += 1
end