Skip to content

Commit 917f2f1

Browse files
author
Jack Dunham
committed
Rename NoComputeStep to IncrementOnly
I think this is clearer than `JustIncrement` which might not be clear to non-native English speakers (maybe), and avoids the case of `OnlyIncrement` being confused with "the only increment".
1 parent 62195b6 commit 917f2f1

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/solvers/adapters.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ Iterator wrapper whos `compute!` function simply returns itself, doing nothing i
55
process. This allows one to manually call a custom `compute!` or insert their own code it in
66
the loop body in place of `compute!`.
77
"""
8-
struct NoComputeStep{S<:AbstractNetworkIterator} <: AbstractNetworkIterator
8+
struct IncrementOnly{S<:AbstractNetworkIterator} <: AbstractNetworkIterator
99
parent::S
1010
end
1111

12-
islaststep(adapter::NoComputeStep) = islaststep(adapter.parent)
13-
state(adapter::NoComputeStep) = state(adapter.parent)
14-
increment!(adapter::NoComputeStep) = increment!(adapter.parent)
15-
compute!(adapter::NoComputeStep) = adapter
12+
islaststep(adapter::IncrementOnly) = islaststep(adapter.parent)
13+
state(adapter::IncrementOnly) = state(adapter.parent)
14+
increment!(adapter::IncrementOnly) = increment!(adapter.parent)
15+
compute!(adapter::IncrementOnly) = adapter
1616

17-
NoComputeStep(adapter::NoComputeStep) = adapter
17+
IncrementOnly(adapter::IncrementOnly) = adapter
1818

1919
"""
2020
struct EachRegion{SweepIterator} <: AbstractNetworkIterator

src/solvers/sweep_solve.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function sweep_solve(
1313
region_callback=default_region_callback,
1414
)
1515
# Don't compute the region iteration automatically as we wish to insert a callback.
16-
for _ in NoComputeStep(sweep_iterator)
16+
for _ in IncrementOnly(sweep_iterator)
1717
for _ in region_iterator(sweep_iterator)
1818
region_callback(sweep_iterator)
1919
end

0 commit comments

Comments
 (0)