LocationSpanMapT Class

Helper class for fast searcing for objects defined in location spans or by reach id's.

If storing a large amount of data in each span, consider instead one of the NetworkDataT classes. This class is a light-weight version of the NetworkDataT implementation.

It does fast lookup in a dictionary of span-id's, containing a list of spans for each id, i.e. for a given span-id it does linear searching in the chainages.

It can work for as well location-spans as reach-id's (covering an entire span), though it does not support location-span with id matching a reach-id (undefined behavior).

Definition

Namespace: DHI.Mike1D.Generic
Assembly: DHI.Mike1D.Generic (in DHI.Mike1D.Generic.dll) Version: 24.0.0.0 (11.1.1.1111)
C#
public class LocationSpanMap<T>
where T : class
Inheritance
Object    LocationSpanMapT

Type Parameters

T
Data stored in location span

Constructors

LocationSpanMapTInitializes a new instance of the LocationSpanMapT class

Methods

Add(ILocationSpan, T) Add to map
Add(String, T) Add to map
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Find(ILocation) Find data based on the provided location.

It will first search without chainage tolerance, and if none found, search using tolerance of LOCATION_EQUAL_TOLERANCE.

Find(String) Find data based on the provided reach id. If more than span exist with the same reachId, the first found is returned.
Find(ILocation, Double) Find data based on the provided location.
FindAll Find data based on the provided location.
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ToStringReturns a string that represents the current object.
(Inherited from Object)

See Also