C# Класс Voronoi.Algorithms.FortuneHelpers.Vector

A vector class, implementing all interesting features of vectors
Наследование: IEnumerable, IComparable
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Precision int
Tag object

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
IEnumerable ( ) : IEnumerator

Описание методов

Add() публичный Метод

Add another vector
public Add ( Vector V ) : void
V Vector V
Результат void

Add() публичный Метод

Add a constant to all elements
public Add ( double d ) : void
d double The constant
Результат void

Clone() публичный Метод

Get a copy of one vector
public Clone ( ) : Vector
Результат Vector

CompareTo() публичный Метод

Compare two vectors
public CompareTo ( object obj ) : int
obj object
Результат int

Dist() публичный статический Метод

Get the distance of two vectors
public static Dist ( Vector V1, Vector V2 ) : double
V1 Vector
V2 Vector
Результат double

Equals() публичный Метод

Compares this vector with another one
public Equals ( object obj ) : bool
obj object
Результат bool

GetHashCode() публичный Метод

Retrieves a hashcode that is dependent on the elements
public GetHashCode ( ) : int
Результат int

Multiply() публичный Метод

Scale all elements by r
public Multiply ( double r ) : void
r double The scalar
Результат void

Randomize() публичный Метод

Reset all elements with ransom values from the given range
public Randomize ( Vector MinMax ) : void
MinMax Vector MinMax[0] - Min /// MinMax[1] - Max
Результат void

Randomize() публичный Метод

Reset all elements with ransom values from the given range
public Randomize ( double Min, double Max ) : void
Min double Min
Max double Max
Результат void

ToString() публичный Метод

Convert the vector into a reconstructable string representation
public ToString ( ) : string
Результат string

Vector() публичный Метод

Build a new vector
public Vector ( ) : System
Результат System

Vector() публичный Метод

Build a new vector as a copy of an existing one
public Vector ( Vector O ) : System
O Vector The existing vector
Результат System

Vector() публичный Метод

Build a new vector
public Vector ( int dim ) : System
dim int The dimension
Результат System

Vector() публичный Метод

Build a new vector from a string
public Vector ( string S ) : System
S string A string, as produced by ToString
Результат System

operator() публичный статический Метод

Scale one vector
public static operator ( ) : Vector
Результат Vector

operator() публичный статический Метод

Get the scalar product of two vectors
public static operator ( ) : double
Результат double

this() публичный Метод

Gets or sets the value of the vector at the given index
public this ( int i ) : double
i int
Результат double

Описание свойств

Precision публичное статическое свойство

Global precision for any calculation
public static int Precision
Результат int

Tag публичное свойство

public object Tag
Результат object