Rev 1162 | Rev 1165 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1162 | Rev 1164 | ||
---|---|---|---|
Line 51... | Line 51... | ||
51 | 51 | ||
52 | double lif_corr[cPxPerHectare]; |
52 | double lif_corr[cPxPerHectare]; |
53 | for (int i=0;i<cPxPerHectare;++i) |
53 | for (int i=0;i<cPxPerHectare;++i) |
54 | lif_corr[i]=-1.; |
54 | lif_corr[i]=-1.; |
55 | 55 | ||
- | 56 | int species_idx; |
|
- | 57 | QVector<int>::const_iterator sbegin, send; |
|
56 |
|
58 | ru->speciesSet()->randomSpeciesOrder(sbegin, send); |
- | 59 | for (QVector<int>::const_iterator s_idx=sbegin; s_idx!=send;++s_idx) { |
|
57 |
|
60 | //for (int s_idx = 0; s_idx<ru->ruSpecies().size(); ++s_idx) {
|
58 | 61 | ||
59 | // start from a random species (and cycle through the available species)
|
62 | // start from a random species (and cycle through the available species)
|
60 | species_idx = |
63 | species_idx = *s_idx; |
61 | 64 | ||
62 | ResourceUnitSpecies *rus = ru->ruSpecies()[species_idx]; |
65 | ResourceUnitSpecies *rus = ru->ruSpecies()[species_idx]; |
63 | // check if there are seeds of the given species on the resource unit
|
66 | // check if there are seeds of the given species on the resource unit
|
64 | float seeds = 0.f; |
67 | float seeds = 0.f; |
65 | Grid<float> &seedmap = const_cast<Grid<float>& >(rus->species()->seedDispersal()->seedMap()); |
68 | Grid<float> &seedmap = const_cast<Grid<float>& >(rus->species()->seedDispersal()->seedMap()); |