PolygonValueN

trait PolygonValueN[VT <: ElemValueN] extends PolygonLike[VT] with DataValueNs[VT]
trait DataValueNs[VT]
trait DataImut[VT]
trait DataGen[VT]
trait PolygonLike[VT]
class Any
trait PolygonDblNs[VT]
trait PolygonDbl2s[VT]
class PolygonM
class PolygonLL
trait PolygonDbl3s[VT]
class PolygonM3
trait PolygonIntNs[VT]
trait PolygonInt2s[VT]
class PolygonHC

Type members

Inherited types

type SideT <: LineSegLike[VT]
Inherited from:
PolygonLike
type ThisT <: DataValueNs[A]
Inherited from:
DataValueNs

Value members

Concrete methods

override def vertsForeach[U](f: VT => U): Unit
Definition Classes
override def vertsNum: Int
Definition Classes

Inherited methods

def arrLen: Int

The total number of atomic values, Ints, Doubles, Longs etc in the backing Array.

The total number of atomic values, Ints, Doubles, Longs etc in the backing Array.

Inherited from:
DataValueNs
def dataFold[B](initVal: B)(f: (B, VT) => B): B
Inherited from:
DataGen
def dataForeach[U](f: VT => U): Unit

Performs a side effecting function on each element of this sequence in order.

Performs a side effecting function on each element of this sequence in order.

Inherited from:
DataGen
def dataIForeach[U](initIndex: Int)(f: (Int, VT) => U): Unit

Index with foreach on the data elements. Performs a side effecting function on the index and each element of the data sequence. It takes a function as a parameter. The function may return Unit. If it does return a non Unit value it is discarded. The [U] type parameter is there just to avoid warnings about discarded values and can be ignored by method users. The method has 2 versions / name overloads. The default start for the index is 0 if just the function parameter is passed. The second version name overload takes an Int for the first parameter list, to set the start value of the index. Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature.

Index with foreach on the data elements. Performs a side effecting function on the index and each element of the data sequence. It takes a function as a parameter. The function may return Unit. If it does return a non Unit value it is discarded. The [U] type parameter is there just to avoid warnings about discarded values and can be ignored by method users. The method has 2 versions / name overloads. The default start for the index is 0 if just the function parameter is passed. The second version name overload takes an Int for the first parameter list, to set the start value of the index. Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature.

Inherited from:
DataGen
def dataIForeach[U](f: (Int, VT) => Any): Unit

Index with foreach on the data elements. Performs a side effecting function on the index and each element of the data sequence. It takes a function as a parameter. The function may return Unit. If it does return a non Unit value it is discarded. The [U] type parameter is there just to avoid warnings about discarded values and can be ignored by method users. The method has 2 versions / name overloads. The default start for the index is 0 if just the function parameter is passed. The second version name overload takes an Int for the first parameter list, to set the start value of the index. Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature.

Index with foreach on the data elements. Performs a side effecting function on the index and each element of the data sequence. It takes a function as a parameter. The function may return Unit. If it does return a non Unit value it is discarded. The [U] type parameter is there just to avoid warnings about discarded values and can be ignored by method users. The method has 2 versions / name overloads. The default start for the index is 0 if just the function parameter is passed. The second version name overload takes an Int for the first parameter list, to set the start value of the index. Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature.

Inherited from:
DataGen
def dataLast: VT
Inherited from:
DataGen
final override def dataLength: Int

The number of product elements in this collection. For example in a [[PolygonImp], this is the number of Pt2s in the Polygon

The number of product elements in this collection. For example in a [[PolygonImp], this is the number of Pt2s in the Polygon

Definition Classes
Inherited from:
DataValueNs

Just a handy short cut to give the length of this collection as a string.

Just a handy short cut to give the length of this collection as a string.

Inherited from:
DataGen
def dataMap[B, ArrB <: SeqImut[B]](f: VT => B)(implicit ev: ArrBuilder[B, ArrB]): ArrB

Specialised map to an immutable SeqImut of B. For SeqGen dataMap is the same as map, but for other structures it will be different, for example a PolygonLike will map to another PolgonLike.

Specialised map to an immutable SeqImut of B. For SeqGen dataMap is the same as map, but for other structures it will be different, for example a PolygonLike will map to another PolgonLike.

Inherited from:
DataGen
def dataTailForeach[U](f: VT => U): Unit

Foreachs over the tail of the data sequence.

Foreachs over the tail of the data sequence.

Inherited from:
DataGen
def dataTailfold[B](initial: B)(f: (B, VT) => B): B

foldLeft over the tail of the data sequence.

foldLeft over the tail of the data sequence.

Inherited from:
DataGen

The number of atomic values, Ints, Doubles, Longs etc that specify / construct an element of this immutable flat Array based collection class.

The number of atomic values, Ints, Doubles, Longs etc that specify / construct an element of this immutable flat Array based collection class.

Inherited from:
DataValueNs
final def elemsStr: String

The element String allows the composition of toString for the whole collection. The syntax of the output will be reworked.

The element String allows the composition of toString for the whole collection. The syntax of the output will be reworked.

Inherited from:
DataGen
def fElemStr: VT => String
Inherited from:
DataGen
def indexData(index: Int): VT

apply method accesses the individual elements of the sequence by 0 based index.

apply method accesses the individual elements of the sequence by 0 based index.

Inherited from:
DataGen
def map[B <: ElemValueN, BB <: PolygonLike[B]](f: VT => B)(implicit build: PolygonBuilder[B, BB]): BB

Map this collection of data elements to PolygonLike class of type BB.

Map this collection of data elements to PolygonLike class of type BB.

Inherited from:
PolygonLike

Reverses the order of the elements.

Reverses the order of the elements.

Inherited from:
DataValueNs
def sidesForeach[U](f: SideT => U): Unit
Inherited from:
PolygonLike
final override def toString: String
Definition Classes
DataGen -> Any
Inherited from:
DataGen

String specifying the type of this object.

String specifying the type of this object.

Inherited from:
DataGen
def unsafeSameSize(length: Int): ThisT

This method should rarely be needed to be used by end users, but returns a new uninitialised ArrT of the this SeqImut's final type.

This method should rarely be needed to be used by end users, but returns a new uninitialised ArrT of the this SeqImut's final type.

Inherited from:
DataImut
def unsafeSetElem(i: Int, value: VT): Unit

Sets / mutates an element in the Arr. This method should rarely be needed by end users, but is used by the initialisation and factory methods.

Sets / mutates an element in the Arr. This method should rarely be needed by end users, but is used by the initialisation and factory methods.

Inherited from:
DataGen
def unsafeSetElems(index: Int, elems: VT*): Unit

Sets / mutates elements in the Arr. This method should rarely be needed by end users, but is used by the initialisation and factory methods.

Sets / mutates elements in the Arr. This method should rarely be needed by end users, but is used by the initialisation and factory methods.

Inherited from:
DataGen
def vert(index: Int): VT

Returns the vertex of the given index. Throws if the index is out of range, if it less than 1 or greater than the number of vertices.

Returns the vertex of the given index. Throws if the index is out of range, if it less than 1 or greater than the number of vertices.

Inherited from:
PolygonLike
def vertsFold[B](init: B)(f: (B, VT) => B): B

Folds over the vertices.

Folds over the vertices.

Type parameters:
B

type of the accumulator return value of this method.

Inherited from:
PolygonLike
def vertsForAll(f: VT => Boolean): Boolean

This method should be overridden in final classes.

This method should be overridden in final classes.

Inherited from:
PolygonLike
def vertsIForeach[U](f: (Int, VT) => Any): Unit

Index with foreach on each vertx. Applies the side effecting function on the index with the value of each vertex. Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature.

Index with foreach on each vertx. Applies the side effecting function on the index with the value of each vertex. Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature.

Inherited from:
PolygonLike
def vertsMap[B, ArrB <: SeqImut[B]](f: VT => B)(implicit builder: ArrBuilder[B, ArrB]): ArrB

Maps the vertices of this polygon to an immutable Array like sequence of type B.

Maps the vertices of this polygon to an immutable Array like sequence of type B.

Type parameters:
ArrB

The type of the immutable Array like sequence of B.

B

The element type of the returned sequence.

Returns:

the immutable sequence collection by applying the supplied function to each vertex.

Inherited from:
PolygonLike

Checks this polygon has at least 3 vertices.

Checks this polygon has at least 3 vertices.

Inherited from:
PolygonLike
def vertsPrevForEach[U](f: (VT, VT) => U): Unit

This method does nothing if the vertNum < 2. Foreach vertex applies the side effecting function to the previous vertex with each vertex. The previous vertex to the first vertex is the last vertex of the PolygonLike. Note the function signature (previous, vertex) => U follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods'(accumulator, element) => B signature.

This method does nothing if the vertNum < 2. Foreach vertex applies the side effecting function to the previous vertex with each vertex. The previous vertex to the first vertex is the last vertex of the PolygonLike. Note the function signature (previous, vertex) => U follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods'(accumulator, element) => B signature.

Inherited from:
PolygonLike