module special.geometry_point

Inheritance diagram of ensae_teaching_cs.special.geometry_point

Short summary

module ensae_teaching_cs.special.geometry_point

Defines a point in N-dimension

source on GitHub

Classes

class

truncated documentation

GeometryException

raises when an issue arises with class GeometryPoint

GeometryPoint

one point

Methods

method

truncated documentation

__add__

addition

__cmp__

comparison

__eq__

is equal

__iadd__

addition

__imul__

multiplication by a scalar

__init__

constructor

__len__

returns the dimension

__lt__

inferior

__mul__

multiplication by a scalar

__neq__

is different

__repr__

eval(__repr__) should return the same object

__str__

converts into string

__sub__

substraction

angle

return the angle

cossin

return the cos, sin of a vector (dimension 2 only)

norm2

return the norm

product

vectoriel product, dimension 2 only

scalar

scalar product

Documentation

Defines a point in N-dimension

source on GitHub

exception ensae_teaching_cs.special.geometry_point.GeometryException[source]

Bases : Exception

raises when an issue arises with class GeometryPoint

source on GitHub

class ensae_teaching_cs.special.geometry_point.GeometryPoint(*x)[source]

Bases : object

one point

source on GitHub

constructor

Paramètres

x – is a vector

source on GitHub

__add__(x)[source]

addition

source on GitHub

__cmp__(x)[source]

comparison

source on GitHub

__eq__(x)[source]

is equal

source on GitHub

__hash__ = None
__iadd__(x)[source]

addition

source on GitHub

__imul__(k)[source]

multiplication by a scalar

source on GitHub

__init__(*x)[source]

constructor

Paramètres

x – is a vector

source on GitHub

__len__()[source]

returns the dimension

source on GitHub

__lt__(x)[source]

inferior

source on GitHub

__mul__(k)[source]

multiplication by a scalar

source on GitHub

__neq__(x)[source]

is different

source on GitHub

__repr__()[source]

eval(__repr__) should return the same object

source on GitHub

__slots__ = ['_x']
__str__()[source]

converts into string

source on GitHub

__sub__(x)[source]

substraction

source on GitHub

_x
angle()[source]

return the angle

source on GitHub

cossin()[source]

return the cos, sin of a vector (dimension 2 only)

source on GitHub

norm2()[source]

return the norm

source on GitHub

product(x)[source]

vectoriel product, dimension 2 only

source on GitHub

scalar(x)[source]

scalar product

source on GitHub