Skip to content

Commit

Permalink
Updating inline documentation. RE:#386
Browse files Browse the repository at this point in the history
  • Loading branch information
phargogh committed Jun 21, 2024
1 parent e747eb8 commit 4f0e062
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/pygeoprocessing/routing/routing.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -138,17 +138,23 @@ cdef struct FlowPixelType:
int last_flow_dir
double value

# This struct is used to track a value as it decays. The intent is to have the
# ``decayed_value`` updated in-place as we walk the flow graph until the value
# is less than the ``min_value``.
cdef struct DecayingValue:
double decayed_value # The value, which will be progressively updated as it decays
double min_value # The minimum value before the Decaying Value should be ignored.
# This struct is used to track an intermediate flow pixel's last calculated
# direction and flow accumulation value so far (just like with FlowPixelType).
# Additionally, we track all of the decaying values from upstream that
# influence the load on this pixel. Used during decaying flow accumulation.
cdef struct WeightedFlowPixelType:
int xi
int yi
int last_flow_dir
double value
queue[DecayingValue] decaying_values

int xi # The pixel's x coordinate in pixel space
int yi # The pixel's y coordinate in pixel space
int last_flow_dir # The last flow direction processed on this pixel
double value # The flow accumulation value at this pixel
queue[DecayingValue] decaying_values # A queue of upstream decaying values that affect the accumulation on this pixel.

# this struct is used in distance_to_channel_mfd to add up each pixel's
# weighted distances and flow weights
Expand Down

0 comments on commit 4f0e062

Please sign in to comment.