Class DynamicGraphMinFixedPoint

java.lang.Object
net.minecraft.world.level.lighting.DynamicGraphMinFixedPoint
Direct Known Subclasses:
ChunkTracker, SectionTracker

public abstract class DynamicGraphMinFixedPoint extends Object
  • Field Details

    • SOURCE

      public static final long SOURCE
      See Also:
    • NO_COMPUTED_LEVEL

      private static final int NO_COMPUTED_LEVEL
      See Also:
    • levelCount

      protected final int levelCount
    • priorityQueue

      private final LeveledPriorityQueue priorityQueue
    • computedLevels

      private final it.unimi.dsi.fastutil.longs.Long2ByteMap computedLevels
    • hasWork

      private volatile boolean hasWork
  • Constructor Details

    • DynamicGraphMinFixedPoint

      protected DynamicGraphMinFixedPoint(int levelCount, int minQueueSize, int minMapSize)
  • Method Details

    • removeFromQueue

      protected void removeFromQueue(long node)
    • removeIf

      public void removeIf(LongPredicate pred)
    • calculatePriority

      private int calculatePriority(int level, int computedLevel)
    • checkNode

      protected void checkNode(long node)
    • checkEdge

      protected void checkEdge(long from, long to, int newLevelFrom, boolean onlyDecreased)
    • checkEdge

      private void checkEdge(long from, long to, int newLevelFrom, int levelTo, int oldComputedLevel, boolean onlyDecreased)
    • checkNeighbor

      protected final void checkNeighbor(long from, long to, int level, boolean onlyDecreased)
    • hasWork

      protected final boolean hasWork()
    • runUpdates

      protected final int runUpdates(int count)
    • getQueueSize

      public int getQueueSize()
    • isSource

      protected boolean isSource(long node)
    • getComputedLevel

      protected abstract int getComputedLevel(long node, long knownParent, int knownLevelFromParent)
      Computes level propagated from neighbors of specified position with given existing level, excluding the given source position.
    • checkNeighborsAfterUpdate

      protected abstract void checkNeighborsAfterUpdate(long node, int level, boolean onlyDecrease)
    • getLevel

      protected abstract int getLevel(long node)
    • setLevel

      protected abstract void setLevel(long node, int level)
    • computeLevelFromNeighbor

      protected abstract int computeLevelFromNeighbor(long from, long to, int fromLevel)
      Returns level propagated from start position with specified level to the neighboring end position.