Class/Object

cogx.cogmath.geometry

Shape

Related Docs: object Shape | package geometry

Permalink

final class Shape extends Serializable

A Shape describes the dimensions of a discrete, hyper-rectangular object.

For historical reasons, the elements of a shape also have the following names: 3D: (layers, rows, columns) 2D: (rows, columns) 1D: (columns)

Annotations
@SerialVersionUID()
Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Shape
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Shape(sizes: Array[Int])

    Permalink

    sizes

    The integral size of each dimension.

  2. new Shape(size: Int*)

    Permalink

    Create a dimensional shape with zero or more dimensions.

    Create a dimensional shape with zero or more dimensions.

    Annotations
    @deprecated
    Deprecated

    (Since version 4.0) drop 'new', use Shape(Int*) instead.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def <=(other: Shape): Boolean

    Permalink

    Compare two shapes, returning true if every dimension of this is smaller than or equal to the corresponding dimension in other.

    Compare two shapes, returning true if every dimension of this is smaller than or equal to the corresponding dimension in other.

    other

    Shape to compare with this.

    returns

    True if this and other have the same number of dimensions and this is no larger in any corresponding dimension.

  4. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  5. def apply(dimension: Int): Int

    Permalink

    Get the size of the indexed "dimension".

  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def concat(that: Shape): Shape

    Permalink

    Concatenate two shapes to form a higher dimensional shape.

  9. def concatenate(that: Shape): Shape

    Permalink

    Concatenate "this" and "that" to create a higher-dimensional shape.

  10. val dimensions: Int

    Permalink

    Number of dimensions for this shape.

  11. def downsample(factor: Int): Shape

    Permalink

    Reduces the Shape by a factor in each dimension, rounding up when the original size is not an integer multiple of the downsample factor.

    Reduces the Shape by a factor in each dimension, rounding up when the original size is not an integer multiple of the downsample factor. The is the standard we use throughout Cog.

  12. def drop(d: Int): Shape

    Permalink

    Drop the first "d" dimensions from "this", returning smaller shape.

  13. def dropLast(d: Int): Shape

    Permalink

    Drop the last "d" dimensions from "this", returning smaller shape.

  14. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. def equals(other: Any): Boolean

    Permalink

    Test "this" and "other" Shape for equality.

    Test "this" and "other" Shape for equality. Allows "==" to work.

    Definition Classes
    Shape → AnyRef → Any
  16. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  18. val hashCode: Int

    Permalink

    Required because of overriding equals.

    Required because of overriding equals.

    Definition Classes
    Shape → AnyRef → Any
  19. def indices: Iterator[Array[Int]]

    Permalink

    Return an iterator over all possible discrete locations in the shape.

    Return an iterator over all possible discrete locations in the shape. For example, the Shape (2, 3) has the following locations:

    (0, 0)
    (0, 1)
    (0, 2)
    (1, 0)
    (1, 1)
    (1, 2)
  20. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  21. def join(that: Shape): Shape

    Permalink

    Join "this" and "that" to create a same-dimensional shape representing the two shapes abutted.

    Join "this" and "that" to create a same-dimensional shape representing the two shapes abutted. Join of 0D fields illegal.

  22. val lastDimension: Int

    Permalink

    Get the size of the last dimension.

    Get the size of the last dimension. If this is 0-dimensions, returns 0.

  23. def map(f: (Int) ⇒ Int): Shape

    Permalink

    Map this shape to another shape using "f".

  24. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  25. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  27. val points: Int

    Permalink

    Number of points in this discrete shape.

  28. def supersample: Shape

    Permalink
  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  30. def toArray: Array[Int]

    Permalink

    Convert the shape to an array.

  31. def toString(prefix: String): String

    Permalink

    Like ordinary toString but allows for a prefix besides "Shape"

  32. def toString(): String

    Permalink

    Convert a Shape to a String for debugging.

    Convert a Shape to a String for debugging.

    Definition Classes
    Shape → AnyRef → Any
  33. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped