PolygonDblN

ostrat.geom.PolygonDblN
trait PolygonDblN[+VT <: DblNElem] extends PolygonValueN[VT], SeqSpecDblN[VT]

A polygon whose elements are defined by Doubles.

Attributes

Graph
Supertypes
trait SeqSpecDblN[VT]
trait SeqLikeImutDblN[VT]
trait SpecialT
trait PolygonValueN[VT]
trait SeqSpecValueN[VT]
trait SeqLikeImutValueN[VT]
trait SeqLikeBacked[VT]
trait SeqLikeValueN[VT]
trait PolygonBase[VT]
trait VertSeqSpec[VT]
trait SeqSpec[VT]
trait SeqLike[VT]
class Any
Show all
Known subtypes
trait PolygonDbl2[VT]
class PolygonLL
class DoDeclign
trait Polygon5Plus
trait Polygon6Plus
trait HexReg
class HexRegImp
trait Hexlign
class HexParrX
class HexParrY
class PolygonGen
trait PolygonLen2[VT]
class PolygonKm2
trait PolygonLen2P3[VT]
trait PolygonLen2P4[VT]
trait PolygonM2P4
trait QuadM2
trait RectangleM2
trait RectM2
class SqlignM2
trait QuadLen2[VT]
trait RectangleLen2[VT]
trait RectLen2[VT]
trait SqlignLen2[VT]
trait SquareLen2[VT]
trait PolygonM2P3
class TriangleM2
trait TriangleLen2[VT]
trait PolygonM2
class PolygonM2Gen
class PolygonPm2
trait PolygonDbl3[VT]
trait PolygonLength3[VT]
class PolygonKm3
class PolygonM3
Show all

Members list

Type members

Inherited and Abstract types

type SideT <: LSegBase[VT]

Attributes

Inherited from:
PolygonBase
type ThisT <: SeqSpecDblN[VT]

Gives the final type of this class.

Gives the final type of this class.

Attributes

Inherited from:
SeqSpecDblN

Value members

Abstract methods

protected def arrayForSides: Array[Double]

Creates the Array[Double] need to implement the sides method.

Creates the Array[Double] need to implement the sides method.

Attributes

Inherited methods

def appendArray(appendProductsLength: Int): Array[Double]

Builder helper method that provides a longer array, with the underlying array copied into the new extended Array.

Builder helper method that provides a longer array, with the underlying array copied into the new extended Array.

Attributes

Inherited from:
SeqSpecDblN
final def arrayLen: Int

The length of the backing Array Double.

The length of the backing Array Double.

Attributes

Inherited from:
ArrayDblBacked
def elemsForAll(f: VT => Boolean): Boolean

Attributes

Inherited from:
SeqSpecValueN
override 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.

Attributes

Definition Classes
Inherited from:
SeqSpec
def fElemStr: VT => String

String for element, can be overridden.

String for element, can be overridden.

Attributes

Inherited from:
SeqLike
def flatMap[B <: ValueNElem, BB <: PolygonBase[B]](f: VT => SeqLike[B])(implicit build: PolygonLikeFlatBuilder[B, BB]): BB

FlatMaps the vertices of this PolygonBase to a new to PolygonLike class of type BB.

FlatMaps the vertices of this PolygonBase to a new to PolygonLike class of type BB.

Attributes

Inherited from:
PolygonBase
def foldLeft[B](initVal: B)(f: (B, VT) => B): B

foldLeft over the specifying sequence.

foldLeft over the specifying sequence.

Attributes

Inherited from:
SeqSpec
override def foreach[U](f: VT => U): Unit

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

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

Attributes

Definition Classes
Inherited from:
SeqSpec
def iForeach[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.

Attributes

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

Index with foreach on the specifying sequence elements. Performs a side effecting function on the index and each element of the specifying 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 specifying sequence elements. Performs a side effecting function on the index and each element of the specifying 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.

Attributes

Inherited from:
SeqSpec
def innerForeach[U](f: VT => U): Unit

Foreachs over the inner of the specifying sequence, excludes the first and last element. Performs a side effecting function on each element of the tail of the specifying sequence in order.

Foreachs over the inner of the specifying sequence, excludes the first and last element. Performs a side effecting function on each element of the tail of the specifying sequence in order.

Attributes

Inherited from:
SeqSpec
def last: VT

Last element of the specifying sequence.

Last element of the specifying sequence.

Attributes

Inherited from:
SeqSpec
def map[B <: ValueNElem, BB <: PolygonBase[B]](f: VT => B)(implicit build: PolygonLikeBuilderMap[B, BB]): BB

Maps the vertices of this PolygonBase to a new to PolygonLike class of type BB.

Maps the vertices of this PolygonBase to a new to PolygonLike class of type BB.

Attributes

Inherited from:
PolygonBase
def mapArr[B, ArrB <: Arr[B]](f: VT => B)(implicit ev: BuilderArrMap[B, ArrB]): ArrB

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

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

Attributes

Inherited from:
SeqSpec
def mutateElemUnsafe(index: Int, f: VT => VT): Unit

Mutates an element in the Arr at the given index. This method should rarely be needed by end users, but is used by the initialisation and factory methods.

Mutates an element in the Arr at the given index. This method should rarely be needed by end users, but is used by the initialisation and factory methods.

Attributes

Inherited from:
SeqLikeBacked
override def numVerts: Int

The number of vertices.

The number of vertices.

Attributes

Definition Classes
Inherited from:
PolygonValueN
def optMap[B <: ValueNElem, BB <: PolygonBase[B]](f: VT => Option[B])(implicit build: PolygonLikeBuilderMap[B, BB]): Option[BB]

Optionally maps the vertices of this PolygonBase to vertices of a new to PolygonLike class of type BB. If the new PolygonBase has at least 3 vertices returns Some else returns None.

Optionally maps the vertices of this PolygonBase to vertices of a new to PolygonLike class of type BB. If the new PolygonBase has at least 3 vertices returns Some else returns None.

Attributes

Inherited from:
PolygonBase
override def reverse: ThisT

Reverses the order of the elements of the specifying sequence.

Reverses the order of the elements of the specifying sequence.

Attributes

Definition Classes
Inherited from:
SeqSpecDblN
def reverseForeach[U](f: VT => U): Unit

Performs a side effecting function on each element of the specifying-sequence in reverse order. 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.

Performs a side effecting function on each element of the specifying-sequence in reverse order. 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.

Attributes

Inherited from:
SeqSpec
def setElemsUnsafe(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.

Attributes

Inherited from:
SeqLikeBacked
def tailFold[B](initial: B)(f: (B, VT) => B): B

FoldLeft over the tail of the specifying sequence.

FoldLeft over the tail of the specifying sequence.

Attributes

Inherited from:
SeqSpec
def tailForeach[U](f: VT => U): Unit

Foreachs over the tail of the specifying sequence. Performs a side effecting function on each element of the tail of the specifying sequence in order.

Foreachs over the tail of the specifying sequence. Performs a side effecting function on each element of the tail of the specifying sequence in order.

Attributes

Inherited from:
SeqSpec
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
SeqLike -> Any
Inherited from:
SeqLike

Reverses the order of the elements in a new Array[Double] which is returned.

Reverses the order of the elements in a new Array[Double] which is returned.

Attributes

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

Attributes

Inherited from:
SeqLikeImutDblN
def vert(vertNum: Int): VT

Returns the vertex of the given index. Cycles around if the index is out of range, vert 3 returns vert 0 on a triangle.

Returns the vertex of the given index. Cycles around if the index is out of range, vert 3 returns vert 0 on a triangle.

Attributes

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

This method should be overridden in final classes.

This method should be overridden in final classes.

Attributes

Inherited from:
PolygonBase
override def vertsForeach[U](f: VT => U): Unit

Performs the side effecting function on the value of each vertex.

Performs the side effecting function on the value of each vertex.

Attributes

Definition Classes
Inherited from:
PolygonValueN
def vertsMap[B, ArrB <: Arr[B]](f: VT => B)(implicit builder: BuilderArrMap[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.

Attributes

Returns

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

Inherited from:
PolygonBase

Checks this polygon has at least 3 vertices.

Checks this polygon has at least 3 vertices.

Attributes

Inherited from:
PolygonBase
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 PolygonBase. 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 PolygonBase. 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.

Attributes

Inherited from:
PolygonBase

Inherited and Abstract methods

Attributes

Inherited from:
ArrayDblBacked
def elem(index: Int): VT

Accesses the specifying sequence element by a 0 based index. For Sequs this will an alternative name for apply.

Accesses the specifying sequence element by a 0 based index. For Sequs this will an alternative name for apply.

Attributes

Inherited from:
SeqLike
def elemEq(a1: VT, a2: VT): Boolean

Checks if 2 values of the specifying sequence are equal.

Checks if 2 values of the specifying sequence are equal.

Attributes

Inherited from:
SeqLikeValueN

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.

Attributes

Inherited from:
SeqLikeValueN
def fromArray(array: Array[Double]): ThisT

Attributes

Inherited from:
SeqLikeImutDblN
def numElems: Int

The number of data elements in the defining sequence. These collections use underlying mutable Arrays and ArrayBuffers. The length of the underlying Array will be a multiple of this number. For Sequs this will be an alternative name for length.

The number of data elements in the defining sequence. These collections use underlying mutable Arrays and ArrayBuffers. The length of the underlying Array will be a multiple of this number. For Sequs this will be an alternative name for length.

Attributes

Inherited from:
SeqLike
def setElemUnsafe(index: Int, newElem: VT): Unit

Sets / mutates an element in the Arr at the given index. 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 at the given index. This method should rarely be needed by end users, but is used by the initialisation and factory methods.

Attributes

Inherited from:
SeqLikeBacked
def side(index: Int): SideT

Returns a side of the appropriate type for the PolygonBase from the given index. The index cycles.

Returns a side of the appropriate type for the PolygonBase from the given index. The index cycles.

Attributes

Inherited from:
PolygonBase
def sides: Arr[SideT]

Attributes

Inherited from:
PolygonBase
def sidesForeach[U](f: SideT => U): Unit

Attributes

Inherited from:
PolygonBase

String specifying the type of this object.

String specifying the type of this object.

Attributes

Inherited from:
SeqLike
def verts: Arr[VT]

Attributes

Inherited from:
PolygonBase