Skip to content

Instantly share code, notes, and snippets.

@mjburgess
Created March 17, 2013 14:36

Revisions

  1. Michael John Burgess created this gist Mar 17, 2013.
    18 changes: 18 additions & 0 deletions gistfile1.rs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@


    struct DEIteration {
    opts: DEOptions,
    population: @mut [@[float]],
    fitnesses: @mut [@[float]],
    crossovers: @mut [@[float]]
    }

    impl DEIteration {
    static fn new(opts: DEOptions) -> DEIteration {
    DEIteration { opts: opts,
    population: @mut [@[0.0]],
    fitnesses: @mut [@[0.0]],
    crossovers: @mut [@[0.0]]
    }
    }