C# 클래스 Voronoi.Algorithms.FortuneHelpers.Vector

A vector class, implementing all interesting features of vectors
상속: IEnumerable, IComparable
파일 보기 프로젝트 열기: TobieD/City-Generator 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
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