mirror of
https://github.com/vlang/v.git
synced 2025-09-14 06:52:36 +03:00
tools: format most examples and tutorials, add them to v test-cleancode
(#9826)
This commit is contained in:
parent
dff50686d6
commit
16e79bc3ca
38 changed files with 471 additions and 433 deletions
|
@ -29,7 +29,7 @@ fn (mut n Neuron) populate(nb int) {
|
|||
}
|
||||
|
||||
struct Layer {
|
||||
id int
|
||||
id int
|
||||
mut:
|
||||
neurons []Neuron
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ mut:
|
|||
fn (mut n Network) populate(network []int) {
|
||||
assert network.len >= 2
|
||||
input := network[0]
|
||||
hiddens := network[1..network.len-1]
|
||||
hiddens := network[1..network.len - 1]
|
||||
output := network[network.len - 1]
|
||||
mut index := 0
|
||||
mut previous_neurons := 0
|
||||
|
@ -232,8 +232,8 @@ fn (g Generation) next(population int) []Save {
|
|||
|
||||
pub struct Generations {
|
||||
pub:
|
||||
population int
|
||||
network []int
|
||||
population int
|
||||
network []int
|
||||
mut:
|
||||
generations []Generation
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue