Class: Birch::Edge

Inherits:
Object
  • Object
show all
Defined in:
lib/birch/pure.rb,
ext/birch/native.c

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Edge

Returns a new instance of Edge.



38
39
40
41
# File 'ext/birch/native.c', line 38

def initialize(node_a, node_b, directed = false, direction = 0)
  @node_a, @node_b = node_a, node_b
  @directed, @direction = directed, direction
end

Instance Attribute Details

#directedObject (readonly)

Returns the value of attribute directed.



119
120
121
# File 'lib/birch/pure.rb', line 119

def directed
  @directed
end

#directionObject (readonly)

Returns the value of attribute direction.



119
120
121
# File 'lib/birch/pure.rb', line 119

def direction
  @direction
end

#node_aObject (readonly)

Returns the value of attribute node_a.



118
119
120
# File 'lib/birch/pure.rb', line 118

def node_a
  @node_a
end

#node_bObject (readonly)

Returns the value of attribute node_b.



118
119
120
# File 'lib/birch/pure.rb', line 118

def node_b
  @node_b
end