Class/Object

com.sparkcorr.Geometry

Point

Related Docs: object Point | package Geometry

Permalink

class Point extends AnyRef

A generic class to deal with n-dimensional points (or vectors) in cartesian coordinates with some basic operations

Author:

Stephane Plaszczynski

Example:
  1. val p=Point(1,2,3)
    print(p)
    val x=p(0)
    val p2=p/2
    val sum=p+p2
    print(sum/10)
Linear Supertypes
AnyRef, Any
Known Subclasses
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Point
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Point(l: Array[Double])

    Permalink

    auxiliary constructor from Array

  2. new Point(coord: List[Double])

    Permalink

    create point from list of coordinates.

    create point from list of coordinates. Companion object allows variable length arguments.

    coord

    coordinates list

Value Members

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. def *(s: Double): Point

    Permalink

    scale all coordinates by s

  4. def +(p: Point): Point

    Permalink

    addition

  5. def -(p: Point): Point

    Permalink

    substraction

  6. def /(s: Double): Point

    Permalink

    inverse-scale (divide) all coordinates by s

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

    Permalink
    Definition Classes
    AnyRef → Any
  8. def apply(i: Int): Double

    Permalink

    direct access to coordinates

    direct access to coordinates

    Example:
    1. val p=new Point(1,2,3); p(0)=3

  9. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. val coord: List[Double]

    Permalink

    coordinates list

  12. val dim: Int

    Permalink

    dimension

  13. def dist(p: Point): Double

    Permalink

    distance to other point

  14. def dist2(p: Point): Double

    Permalink

    squared distance to some other point

  15. def dot(p: Point): Double

    Permalink

    dot product

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

    Permalink
    Definition Classes
    AnyRef
  17. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  18. def finalize(): Unit

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

    Permalink
    Definition Classes
    AnyRef → Any
  20. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  21. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  22. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  23. def norm(): Double

    Permalink

    norm of the vector

  24. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  27. def toString(): String

    Permalink

    pretty printing

    pretty printing

    Definition Classes
    Point → AnyRef → Any
  28. final def wait(): Unit

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped