C# Class SegmentUnit, plausible-deniability

identifies a unit on a path segment
this is a struct instead of a class because it compares by value
ファイルを表示 Open project: ad510/plausible-deniability Class Usage Examples

Public Properties

Property Type Description
g Sim,
segment Segment,
unit Unit,

Public Methods

Method Description
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

Private Methods

Method Description
deleteAfter ( Dictionary &removed, long &timeEarliestChild ) : bool

Method Details

SegmentUnit() public method

public SegmentUnit ( Segment, segmentVal, Unit, unitVal ) : System
segmentVal Segment,
unitVal Unit,
return System

canBeUnambiguousParent() public method

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
return bool

children() public method

iterates over all segment/unit pairs that this unit in this segment could have made
public children ( ) : IEnumerable
return IEnumerable

delete() public method

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
return bool

hasChildrenAfter() public method

public hasChildrenAfter ( ) : bool
return bool

next() public method

iterates over all segments containing this unit that branch off from the end of this segment
public next ( ) : IEnumerable
return IEnumerable

parents() public method

iterates over all segment/unit pairs that could have made this unit in this segment
public parents ( ) : IEnumerable
return IEnumerable

prev() public method

iterates over all segments containing this unit that merge onto the beginning of this segment
public prev ( ) : IEnumerable
return IEnumerable

unseenAfter() public method

public unseenAfter ( long time ) : bool
time long
return bool

Property Details

g public_oe property

public Sim, g
return Sim,

segment public_oe property

public Segment, segment
return Segment,

unit public_oe property

public Unit, unit
return Unit,