adiar
adiar copied to clipboard
Add templated constructor for `arc` specifying is-high flag
Add a templated constructor for the arc
class with a single templated argument bool is_high
.
Tasks in arc
class
- [ ] Specialization for
is_high = false
is equivalent toarc(source, target)
with an assertion thatsource
already has an out-index of 0. - [ ] Specialization for
is_high = true
is equivalent toarc(with_out_idx(source, true), target)
.
Tasks in 'src/adiar/internal/algorithms'
- [ ] Replace all arc constructors with the new templated constructor to hide away the need to flag the source.
This issue seems to be out of date with the changes in 2dd4875 . There might still be some things to gain, as the false
option essentially does a few noop operations. But, this essentially is a minimal optimisation (by removing the noop part at compile time).