C# Class Voronoi.Algorithms.FortuneHelpers.Vector

A vector class, implementing all interesting features of vectors
Inheritance: IEnumerable, IComparable
Afficher le fichier Open project: TobieD/City-Generator Class Usage Examples

Méthodes publiques

Свойство Type Description
Precision int
Tag object

Méthodes publiques

Méthode Description
Add ( Vector V ) : void

Add another vector

Add ( double d ) : void

Add a constant to all elements

Clone ( ) : Vector

Get a copy of one vector

CompareTo ( object obj ) : int

Compare two vectors

Dist ( Vector V1, Vector V2 ) : double

Get the distance of two vectors

Equals ( object obj ) : bool

Compares this vector with another one

GetHashCode ( ) : int

Retrieves a hashcode that is dependent on the elements

Multiply ( double r ) : void

Scale all elements by r

Randomize ( Vector MinMax ) : void

Reset all elements with ransom values from the given range

Randomize ( double Min, double Max ) : void

Reset all elements with ransom values from the given range

ToString ( ) : string

Convert the vector into a reconstructable string representation

Vector ( ) : System

Build a new vector

Vector ( Vector O ) : System

Build a new vector as a copy of an existing one

Vector ( int dim ) : System

Build a new vector

Vector ( string S ) : System

Build a new vector from a string

operator ( ) : Vector

Scale one vector

operator ( ) : double

Get the scalar product of two vectors

this ( int i ) : double

Gets or sets the value of the vector at the given index

Private Methods

Méthode Description
IEnumerable ( ) : IEnumerator

Method Details

Add() public méthode

Add another vector
public Add ( Vector V ) : void
V Vector V
Résultat void

Add() public méthode

Add a constant to all elements
public Add ( double d ) : void
d double The constant
Résultat void

Clone() public méthode

Get a copy of one vector
public Clone ( ) : Vector
Résultat Vector

CompareTo() public méthode

Compare two vectors
public CompareTo ( object obj ) : int
obj object
Résultat int

Dist() public static méthode

Get the distance of two vectors
public static Dist ( Vector V1, Vector V2 ) : double
V1 Vector
V2 Vector
Résultat double

Equals() public méthode

Compares this vector with another one
public Equals ( object obj ) : bool
obj object
Résultat bool

GetHashCode() public méthode

Retrieves a hashcode that is dependent on the elements
public GetHashCode ( ) : int
Résultat int

Multiply() public méthode

Scale all elements by r
public Multiply ( double r ) : void
r double The scalar
Résultat void

Randomize() public méthode

Reset all elements with ransom values from the given range
public Randomize ( Vector MinMax ) : void
MinMax Vector MinMax[0] - Min /// MinMax[1] - Max
Résultat void

Randomize() public méthode

Reset all elements with ransom values from the given range
public Randomize ( double Min, double Max ) : void
Min double Min
Max double Max
Résultat void

ToString() public méthode

Convert the vector into a reconstructable string representation
public ToString ( ) : string
Résultat string

Vector() public méthode

Build a new vector
public Vector ( ) : System
Résultat System

Vector() public méthode

Build a new vector as a copy of an existing one
public Vector ( Vector O ) : System
O Vector The existing vector
Résultat System

Vector() public méthode

Build a new vector
public Vector ( int dim ) : System
dim int The dimension
Résultat System

Vector() public méthode

Build a new vector from a string
public Vector ( string S ) : System
S string A string, as produced by ToString
Résultat System

operator() public static méthode

Scale one vector
public static operator ( ) : Vector
Résultat Vector

operator() public static méthode

Get the scalar product of two vectors
public static operator ( ) : double
Résultat double

this() public méthode

Gets or sets the value of the vector at the given index
public this ( int i ) : double
i int
Résultat double

Property Details

Precision public_oe static_oe property

Global precision for any calculation
public static int Precision
Résultat int

Tag public_oe property

public object Tag
Résultat object