Show / Hide Table of Contents

Class SortedNearestNeighbours

An enumerable containing n-nearest neighbours and some extra information like maximum weight and n.

Inheritance
System.Object
SortedNearestNeighbours
Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public class SortedNearestNeighbours : List<int>

Constructors

SortedNearestNeighbours(Single)

Creates a new sorted nearest neighbour collection.

Declaration
public SortedNearestNeighbours(float max)
Parameters
System.Single max

Properties

Max

Gets the maximum weight.

Declaration
public float Max { get; }
Property Value
System.Single

N

Gets the # of nearest neighbours.

Declaration
public int N { get; }
Property Value
System.Int32

Methods

Backward(Single[][], Single, Int32)

Calculates then nearest neighbours using a weight smaller than or equal to a maximum in a backward-direction only.

Declaration
public static SortedNearestNeighbours Backward(float[][] weights, float max, int customer)
Parameters
System.Single[][] weights

System.Single max

System.Int32 customer

Returns
SortedNearestNeighbours

BackwardDirected(Single[][], Single, Int32)

Calculates then nearest neighbours using a weight smaller than or equal to a maximum in a backward-direction only.

Declaration
public static SortedNearestNeighbours BackwardDirected(float[][] weights, float max, int customer)
Parameters
System.Single[][] weights

System.Single max

System.Int32 customer

Returns
SortedNearestNeighbours

Forward(Single[][], Single, Int32)

Calculates then nearest neighbours using a weight smaller than or equal to a maximum in a forward-direction only.

Declaration
public static SortedNearestNeighbours Forward(float[][] weights, float max, int customer)
Parameters
System.Single[][] weights

System.Single max

System.Int32 customer

Returns
SortedNearestNeighbours

ForwardDirected(Single[][], Single, Int32)

Calculates then nearest neighbours using a weight smaller than or equal to a maximum in a forward-direction only.

Declaration
public static SortedNearestNeighbours ForwardDirected(float[][] weights, float max, int customer)
Parameters
System.Single[][] weights

System.Single max

System.Int32 customer

Returns
SortedNearestNeighbours

Get(Int32)

Gets the customer at the given index.

Declaration
public int Get(int idx)
Parameters
System.Int32 idx

Returns
System.Int32

Back to top Built by Itinero, MIT licensed.