adiar icon indicating copy to clipboard operation
adiar copied to clipboard

Add templated constructor for `arc` specifying is-high flag

Open SSoelvsten opened this issue 2 years ago • 1 comments

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 to arc(source, target) with an assertion that source already has an out-index of 0.
  • [ ] Specialization for is_high = true is equivalent to arc(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.

SSoelvsten avatar Dec 13 '22 19:12 SSoelvsten

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).

SSoelvsten avatar Jun 07 '23 07:06 SSoelvsten