module special.geometry_segment#

Inheritance diagram of ensae_teaching_cs.special.geometry_segment

Short summary#

module ensae_teaching_cs.special.geometry_segment

Defines a segment

source on GitHub

Classes#

class

truncated documentation

GeometrySegment

two points

Methods#

method

truncated documentation

__eq__

equal

__imul__

multiplication

__init__

constructor

__len__

dimension

__neq__

different

__str__

usual

equation

dimension 2 only

equation_eval

norm2

reverse

switch extremities

topdown

the vector only points in the same semi-plan

vector

Documentation#

Defines a segment

source on GitHub

class ensae_teaching_cs.special.geometry_segment.GeometrySegment(a, b)#

Bases : object

two points

source on GitHub

constructor

Paramètres:
  • a – first extremity

  • b – second extremity

source on GitHub

__eq__(x)#

equal

source on GitHub

__hash__ = None#
__imul__(k)#

multiplication

source on GitHub

__init__(a, b)#

constructor

Paramètres:
  • a – first extremity

  • b – second extremity

source on GitHub

__len__()#

dimension

source on GitHub

__neq__(x)#

different

source on GitHub

__slots__ = ['_a', '_b']#
__str__()#

usual

source on GitHub

_a#
_b#
equation()#

dimension 2 only

Renvoie:

a,b,c : ax + by +c

source on GitHub

equation_eval(x)#
Renvoie:

the evaluation of the equation

source on GitHub

norm2()#
Renvoie:

the norm2

source on GitHub

reverse()#

switch extremities

source on GitHub

topdown()#

the vector only points in the same semi-plan

source on GitHub

vector()#
Renvoie:

the directional vector

source on GitHub