All Downloads are FREE. Search and download functionalities are using the official Maven repository.

izumi.fundamentals.graphs.tools.cycles.LoopBreaker.scala Maven / Gradle / Ivy

package izumi.fundamentals.graphs.tools.cycles

import izumi.fundamentals.graphs.GraphTraversalError.UnrecoverableLoops
import izumi.fundamentals.graphs.struct.IncidenceMatrix

trait LoopBreaker[N] {
  def breakLoops(withLoops: IncidenceMatrix[N]): Either[UnrecoverableLoops[N], IncidenceMatrix[N]]
}

object LoopBreaker {
  def terminating[N]: LoopBreaker[N] = _ => Left(UnrecoverableLoops())
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy