C# Класс SegmentUnit, plausible-deniability

identifies a unit on a path segment
this is a struct instead of a class because it compares by value
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
g Sim,
segment Segment,
unit Unit,

Открытые методы

Метод Описание
SegmentUnit ( Segment, segmentVal, Unit, unitVal ) : System
canBeUnambiguousParent ( long time ) : bool

returns whether this unit exists before specified time, so if it makes a child unit at specified time, it's unambiguous who is the parent

children ( ) : IEnumerable

iterates over all segment/unit pairs that this unit in this segment could have made

delete ( bool addMoveLines = false ) : bool

removes unit from this segment and fewest possible unseen segments such that all remaining possibilities are valid, returns whether successful

hasChildrenAfter ( ) : bool
next ( ) : IEnumerable

iterates over all segments containing this unit that branch off from the end of this segment

parents ( ) : IEnumerable

iterates over all segment/unit pairs that could have made this unit in this segment

prev ( ) : IEnumerable

iterates over all segments containing this unit that merge onto the beginning of this segment

unseenAfter ( long time ) : bool

Приватные методы

Метод Описание
deleteAfter ( Dictionary &removed, long &timeEarliestChild ) : bool

Описание методов

SegmentUnit() публичный Метод

public SegmentUnit ( Segment, segmentVal, Unit, unitVal ) : System
segmentVal Segment,
unitVal Unit,
Результат System

canBeUnambiguousParent() публичный Метод

returns whether this unit exists before specified time, so if it makes a child unit at specified time, it's unambiguous who is the parent
public canBeUnambiguousParent ( long time ) : bool
time long
Результат bool

children() публичный Метод

iterates over all segment/unit pairs that this unit in this segment could have made
public children ( ) : IEnumerable
Результат IEnumerable

delete() публичный Метод

removes unit from this segment and fewest possible unseen segments such that all remaining possibilities are valid, returns whether successful
public delete ( bool addMoveLines = false ) : bool
addMoveLines bool
Результат bool

hasChildrenAfter() публичный Метод

public hasChildrenAfter ( ) : bool
Результат bool

next() публичный Метод

iterates over all segments containing this unit that branch off from the end of this segment
public next ( ) : IEnumerable
Результат IEnumerable

parents() публичный Метод

iterates over all segment/unit pairs that could have made this unit in this segment
public parents ( ) : IEnumerable
Результат IEnumerable

prev() публичный Метод

iterates over all segments containing this unit that merge onto the beginning of this segment
public prev ( ) : IEnumerable
Результат IEnumerable

unseenAfter() публичный Метод

public unseenAfter ( long time ) : bool
time long
Результат bool

Описание свойств

g публичное свойство

public Sim, g
Результат Sim,

segment публичное свойство

public Segment, segment
Результат Segment,

unit публичное свойство

public Unit, unit
Результат Unit,