Click or drag to resize

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).

Inheritance Hierarchy
SystemObject
  DHI.Mike1D.GenericLocationSpanMapT

Namespace:  DHI.Mike1D.Generic
Assembly:  DHI.Mike1D.Generic (in DHI.Mike1D.Generic.dll) Version: 19.0.0.0 (11.1.1.1111)
Syntax
public class LocationSpanMap<T>
where T : class

Type Parameters

T
Data stored in location span

The LocationSpanMapT type exposes the following members.

Constructors
  NameDescription
Public methodLocationSpanMapT
Initializes a new instance of the LocationSpanMapT class
Top
Methods
  NameDescription
Public methodAdd(String, T)
Add to map
Public methodAdd(ILocationSpan, T)
Add to map
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFind(String)
Find data based on the provided reach id. If more than span exist with the same reachId, the first found is returned.
Public methodFind(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.

Public methodFind(ILocation, Double)
Find data based on the provided location.
Public methodFindAll
Find data based on the provided location.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also