TimeIntervalCollectionTIntersectMergingData Method (TimeIntervalT, IEqualityComparerT, MergeTimeIntervalDataCallbackT) |
Computes the intersection of this interval collection with an interval. When the interval overlaps an interval
in the collection, a provided callback is used to merge the
Data on each into a single
value that is applied to the interval of intersection. If the
mergeCallback is
, intervals that overlap in time will not be included in the returned intersection collection
if they have different data.
Namespace:
AGI.Foundation.Time
Assembly:
AGI.Foundation.Core (in AGI.Foundation.Core.dll) Version: 24.2.419.0 (24.2.419.0)
Syntax public TimeIntervalCollection<T> IntersectMergingData(
TimeInterval<T> interval,
IEqualityComparer<T> dataComparer,
MergeTimeIntervalDataCallback<T> mergeCallback
)
Public Function IntersectMergingData (
interval As TimeInterval(Of T),
dataComparer As IEqualityComparer(Of T),
mergeCallback As MergeTimeIntervalDataCallback(Of T)
) As TimeIntervalCollection(Of T)
public:
TimeIntervalCollection<T>^ IntersectMergingData(
TimeInterval<T>^ interval,
IEqualityComparer<T>^ dataComparer,
MergeTimeIntervalDataCallback<T>^ mergeCallback
)
member IntersectMergingData :
interval : TimeInterval<'T> *
dataComparer : IEqualityComparer<'T> *
mergeCallback : MergeTimeIntervalDataCallback<'T> -> TimeIntervalCollection<'T>
Parameters
- interval
- Type: AGI.Foundation.TimeTimeIntervalT
The interval to intersect with this collection - dataComparer
- Type: System.Collections.GenericIEqualityComparerT
The object to use to compare the Data properties of intervals. - mergeCallback
- Type: AGI.Foundation.TimeMergeTimeIntervalDataCallbackT
The method to use to "merge" the data on two intervals that intersect. If ,
the data from this interval will be used.
Return Value
Type:
TimeIntervalCollectionTThe intersection of this collection with the interval.
Remarks
The returned collection will only contain the intervals that are in both collections.
If two intervals in the two collections overlap but have different
Data,
the overlapping part will NOT be included in the resulting collection.
See Also