Class: Ibex::Impact::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/ibex/impact/propagation.rb,
sig/ibex/impact/propagation.rbs

Overview

One shortest witness for a symbol reached by dependency propagation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(symbol:, distance:, witness:, kind:, component:) ⇒ Node

Returns a new instance of Node.

RBS:

  • (symbol: Integer, distance: Integer, witness: Array[Edge], kind: Symbol, component: Array[Integer]) -> void

Parameters:

  • symbol: (Integer)
  • distance: (Integer)
  • witness: (Array[Edge])
  • kind: (Symbol)
  • component: (Array[Integer])


17
18
19
20
21
22
23
24
# File 'lib/ibex/impact/propagation.rb', line 17

def initialize(symbol:, distance:, witness:, kind:, component:)
  @symbol = symbol
  @distance = distance
  @witness = witness.freeze
  @kind = kind
  @component = component.freeze
  freeze
end

Instance Attribute Details

#componentArray[Integer] (readonly)

Signature:

  • Array[Integer]

Returns:

  • (Array[Integer])


14
15
16
# File 'lib/ibex/impact/propagation.rb', line 14

def component
  @component
end

#distanceInteger (readonly)

Signature:

  • Integer

Returns:

  • (Integer)


11
12
13
# File 'lib/ibex/impact/propagation.rb', line 11

def distance
  @distance
end

#kindSymbol (readonly)

Signature:

  • Symbol

Returns:

  • (Symbol)


13
14
15
# File 'lib/ibex/impact/propagation.rb', line 13

def kind
  @kind
end

#symbolInteger (readonly)

Signature:

  • Integer

Returns:

  • (Integer)


10
11
12
# File 'lib/ibex/impact/propagation.rb', line 10

def symbol
  @symbol
end

#witnessArray[Edge] (readonly)

Signature:

  • Array[Edge]

Returns:



12
13
14
# File 'lib/ibex/impact/propagation.rb', line 12

def witness
  @witness
end