Skip to content

Commit aac7bd5

Browse files
committed
typo
1 parent b7e1037 commit aac7bd5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/src/manual.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,8 @@ The [`AggregationAlgorithm`](@ref) in this library requires you to specify three
269269
using Statistics
270270

271271
struct ToBeAggregatedGD <: AbstractAlgorithm{Vector{Float64},Vector{Float64}}
272-
stepsize::Float64
273272
q1::Vector{Float64}
273+
stepsize::Float64
274274
end
275275

276276
(tba::ToBeAggregatedGD)(problem::Any) = tba.q1
@@ -279,7 +279,7 @@ The [`AggregationAlgorithm`](@ref) in this library requires you to specify three
279279
(tba::ToBeAggregatedGD)(q::Vector{Float64}, problem::Any) = q - tba.stepsize * problem.∇f(q)
280280
end
281281

282-
algorithm = AggregationAlgorithm(ToBeAggregatedGD(0.01, rand(10)); pids=workers())
282+
algorithm = AggregationAlgorithm(ToBeAggregatedGD(rand(10), 0.01); pids=workers())
283283

284284
history = start(algorithm, distributed_problem, (epoch=100,));
285285
```
@@ -291,16 +291,16 @@ history = start(algorithm, distributed_problem, (epoch=100,));
291291
```julia
292292
@everywhere begin
293293
struct ToBeAveragedGD <: AbstractAlgorithm{Vector{Float64},Vector{Float64}}
294-
stepsize::Float64
295294
q1::Vector{Float64}
295+
stepsize::Float64
296296
end
297297

298298
(tba::ToBeAveragedGD)(problem::Any) = tba.q1
299299
(tba::ToBeAveragedGD)(a::Vector{Float64}, problem::Any) = a
300300
(tba::ToBeAveragedGD)(q::Vector{Float64}, problem::Any) = q - tba.stepsize * problem.∇f(q)
301301
end
302302

303-
algorithm = AveragingAlgorithm(ToBeAveragedGD(0.01, rand(10)); pids=workers(), weights=ones(nworkers()))
303+
algorithm = AveragingAlgorithm(ToBeAveragedGD(rand(10), 0.01); pids=workers(), weights=ones(nworkers()))
304304

305305
history = start(algorithm, distributed_problem, (epoch=100,));
306306
```

0 commit comments

Comments
 (0)