final case class LinKernighanTSP(init: I, weights: D, size: I, mode: I = 0, timeOut: D = 0.0) extends MultiOut[Any] with Product with Serializable
A UGen that solves the traveling salesman problem (TSP) using the Lin-Kernighan heuristic.
For each input value of size, a corresponding initial tour and edge weight sequence are
read, the tour is optimized and output along with the tour's cost.
Currently, we output two channels:
- 0 - tour - the optimized tour
- 1 - cost - the cost of the optimized tour, i.e. the sum of its edge weights
- init
the initial tour, for example linear or randomized. Should consist of
sizezero-based vertex indices- weights
the symmetric edge weights, a sequence of length
size * (size - 1) / 2, sorted as vertex connections (0,1), (0,2), (0,3), ... (0,size-1), (1,2), (1,3), ... (1,size-1), etc., until (size-2,size-1).- size
for each complete graph, the number of vertices.
- mode
currently unused and should remain at the default value of zero.
- timeOut
currently unused and should remain at the default value of zero.
- Alphabetic
- By Inheritance
- LinKernighanTSP
- Serializable
- MultiOut
- SomeOut
- Lazy
- GE
- UGenSource
- Expander
- Lazy
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new LinKernighanTSP(init: I, weights: D, size: I, mode: I = 0, timeOut: D = 0.0)
- init
the initial tour, for example linear or randomized. Should consist of
sizezero-based vertex indices- weights
the symmetric edge weights, a sequence of length
size * (size - 1) / 2, sorted as vertex connections (0,1), (0,2), (0,3), ... (0,size-1), (1,2), (1,3), ... (1,size-1), etc., until (size-2,size-1).- size
for each complete graph, the number of vertices.
- mode
currently unused and should remain at the default value of zero.
- timeOut
currently unused and should remain at the default value of zero.
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def cost: D
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val init: I
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def makeUGen(args: IndexedSeq[UGenIn[_]])(implicit b: Builder): UGenInLike[Any]
- Attributes
- protected
- Definition Classes
- LinKernighanTSP → UGenSource
- def makeUGens(implicit b: Builder): UGenInLike[Any]
Abstract method which must be implemented by creating the actual
UGens during expansion.Abstract method which must be implemented by creating the actual
UGens during expansion. This method is at most called once during graph expansion- returns
the expanded object (depending on the type parameter
U)
- Attributes
- protected
- Definition Classes
- LinKernighanTSP → Expander
- val mode: I
- final def name: String
- Definition Classes
- UGenSource
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- val size: I
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val timeOut: D
- def tour: I
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- val weights: D
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated @Deprecated
- Deprecated