Contour

scalacv.Contour
See theContour companion class
object Contour

Attributes

Companion
class
Source
Contours.scala
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Contour.type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
Source
Mirror.scala
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror
Source
Mirror.scala

Value members

Concrete methods

def apply(points: Seq[Point]): Contour

Builds a contour, copying the points into an immutable Vector.

Builds a contour, copying the points into an immutable Vector.

This apply replaces the case-class-generated one, and the copy is the whole point of that: retaining the caller's Seq by reference would make the lazy metrics observe a mutable buffer's later edits, and a List would make convexHull's per-vertex indexing quadratic. Vector.toVector is the same instance, so contours built from already-immutable data pay nothing. The remaining way to hand in a sequence by reference is new Contour(...) or copy(points = ...) — explicit, not the default.

Attributes

Source
Contours.scala