You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by br...@apache.org on 2008/03/31 17:39:26 UTC

svn commit: r643028 - /commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/

Author: brentworden
Date: Mon Mar 31 08:39:17 2008
New Revision: 643028

URL: http://svn.apache.org/viewvc?rev=643028&view=rev
Log:
set subversion properties on new files.

Modified:
    commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/Chromosome.java   (props changed)
    commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/ChromosomePair.java   (contents, props changed)
    commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/CrossoverPolicy.java   (contents, props changed)
    commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/Fitness.java   (contents, props changed)
    commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/GeneticAlgorithm.java   (contents, props changed)
    commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/MutationPolicy.java   (contents, props changed)
    commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/Population.java   (contents, props changed)
    commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/SelectionPolicy.java   (contents, props changed)
    commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/StoppingCondition.java   (props changed)

Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/Chromosome.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/Chromosome.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/ChromosomePair.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/ChromosomePair.java?rev=643028&r1=643027&r2=643028&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/ChromosomePair.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/ChromosomePair.java Mon Mar 31 08:39:17 2008
@@ -1,58 +1,58 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.math.genetics;
-
-/**
- * A pair of {@link Chromosome} objects.
- */
-public class ChromosomePair {
-    /** the first chromosome in the pair. */
-    private Chromosome first;
-
-    /** the second chromosome in the pair. */
-    private Chromosome second;
-
-    /**
-     * Create a chromosome pair.
-     * 
-     * @param c1 the first chromosome.
-     * @param c2 the second chromosome.
-     */
-    public ChromosomePair(Chromosome c1, Chromosome c2) {
-        super();
-        first = c1;
-        second = c2;
-    }
-
-    /**
-     * Access the first chromosome.
-     * 
-     * @return the first chromosome.
-     */
-    public Chromosome getFirst() {
-        return first;
-    }
-
-    /**
-     * Access the second chromosome.
-     * 
-     * @return the second chromosome.
-     */
-    public Chromosome getSecond() {
-        return second;
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.math.genetics;
+
+/**
+ * A pair of {@link Chromosome} objects.
+ */
+public class ChromosomePair {
+    /** the first chromosome in the pair. */
+    private Chromosome first;
+
+    /** the second chromosome in the pair. */
+    private Chromosome second;
+
+    /**
+     * Create a chromosome pair.
+     * 
+     * @param c1 the first chromosome.
+     * @param c2 the second chromosome.
+     */
+    public ChromosomePair(Chromosome c1, Chromosome c2) {
+        super();
+        first = c1;
+        second = c2;
+    }
+
+    /**
+     * Access the first chromosome.
+     * 
+     * @return the first chromosome.
+     */
+    public Chromosome getFirst() {
+        return first;
+    }
+
+    /**
+     * Access the second chromosome.
+     * 
+     * @return the second chromosome.
+     */
+    public Chromosome getSecond() {
+        return second;
+    }
+}

Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/ChromosomePair.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/ChromosomePair.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/CrossoverPolicy.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/CrossoverPolicy.java?rev=643028&r1=643027&r2=643028&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/CrossoverPolicy.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/CrossoverPolicy.java Mon Mar 31 08:39:17 2008
@@ -1,32 +1,32 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.math.genetics;
-
-/**
- * Policy used to create a pair of new chromosomes by performing a crossover
- * operation on a source pair of chromosomes.
- */
-public interface CrossoverPolicy {
-    /**
-     * Perform a crossover operation on the given chromosomes.
-     * 
-     * @param first the first chromosome.
-     * @param second the second chromosome.
-     * @return the pair of new chromosomes that resulted from the crossover.
-     */
-    ChromosomePair crossover(Chromosome first, Chromosome second);
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.math.genetics;
+
+/**
+ * Policy used to create a pair of new chromosomes by performing a crossover
+ * operation on a source pair of chromosomes.
+ */
+public interface CrossoverPolicy {
+    /**
+     * Perform a crossover operation on the given chromosomes.
+     * 
+     * @param first the first chromosome.
+     * @param second the second chromosome.
+     * @return the pair of new chromosomes that resulted from the crossover.
+     */
+    ChromosomePair crossover(Chromosome first, Chromosome second);
+}

Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/CrossoverPolicy.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/CrossoverPolicy.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/Fitness.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/Fitness.java?rev=643028&r1=643027&r2=643028&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/Fitness.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/Fitness.java Mon Mar 31 08:39:17 2008
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.math.genetics;
-
-public interface Fitness extends Comparable {
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.math.genetics;
+
+public interface Fitness extends Comparable {
+}

Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/Fitness.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/Fitness.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/GeneticAlgorithm.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/GeneticAlgorithm.java?rev=643028&r1=643027&r2=643028&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/GeneticAlgorithm.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/GeneticAlgorithm.java Mon Mar 31 08:39:17 2008
@@ -1,181 +1,181 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.math.genetics;
-
-/**
- * Implementation of a genetic algorithm. All factors that govern the operation
- * of the algorithm can be configured for a specific problem.
- */
-public class GeneticAlgorithm {
-    /** the crossover policy used by the algorithm. */
-    private CrossoverPolicy crossoverPolicy;
-
-    /** the rate of crossover for the algorithm. */
-    private double crossoverRate;
-
-    /** the mutation policy used by the algorithm. */
-    private MutationPolicy mutationPolicy;
-
-    /** the rate of mutation for the algorithm. */
-    private double mutationRate;
-
-    /** the selection policy used by the algorithm. */
-    private SelectionPolicy selectionPolicy;
-
-    /**
-     * Evolve the given population. Evolution stops when the stopping condition
-     * is satisfied.
-     * 
-     * @param initial the initial, seed population.
-     * @param condition the stopping condition used to stop evolution.
-     * @return the population that satisfies the stopping condition.
-     */
-    public Population evolve(Population initial, StoppingCondition condition) {
-        Population current = initial;
-        while (!condition.isSatisfied(current)) {
-            current = nextGeneration(current);
-        }
-        return current;
-    }
-
-    /**
-     * Access the crossover policy.
-     * 
-     * @return the crossover policy.
-     */
-    private CrossoverPolicy getCrossoverPolicy() {
-        return crossoverPolicy;
-    }
-
-    /**
-     * Access the crossover rate.
-     * 
-     * @return the crossover rate.
-     */
-    private double getCrossoverRate() {
-        return crossoverRate;
-    }
-
-    /**
-     * Access the mutation policy.
-     * 
-     * @return the mutation policy.
-     */
-    private MutationPolicy getMutationPolicy() {
-        return mutationPolicy;
-    }
-
-    /**
-     * Access the mutation rate.
-     * 
-     * @return the mutation rate.
-     */
-    private double getMutationRate() {
-        return mutationRate;
-    }
-
-    /**
-     * Access the selection policy.
-     * 
-     * @return the selection policy.
-     */
-    private SelectionPolicy getSelectionPolicy() {
-        return selectionPolicy;
-    }
-
-    /**
-     * Evolve the given population into the next generation.
-     * 
-     * @param current the current population.
-     * @return the population for the next generation.
-     */
-    private Population nextGeneration(Population current) {
-        Population nextGeneration = current.nextGeneration();
-
-        while (nextGeneration.getPopulationSize() < nextGeneration
-                .getPopulationLimit()) {
-            // select parent chromosomes
-            ChromosomePair pair = getSelectionPolicy().select(current);
-
-            // apply crossover policy to create two offspring
-            if (Math.random() < getCrossoverRate()) {
-                pair = getCrossoverPolicy().crossover(pair.getFirst(),
-                        pair.getSecond());
-            }
-
-            // apply mutation policy to first offspring
-            if (Math.random() < getMutationRate()) {
-                nextGeneration.addChromosome(getMutationPolicy().mutate(
-                        pair.getFirst()));
-
-                if (nextGeneration.getPopulationSize() < nextGeneration
-                        .getPopulationLimit()) {
-                    // apply mutation policy to second offspring
-                    nextGeneration.addChromosome(getMutationPolicy().mutate(
-                            pair.getSecond()));
-                }
-            }
-        }
-
-        return nextGeneration;
-    }
-
-    /**
-     * Modify the crossover policy.
-     * 
-     * @param value the new crossover policy.
-     */
-    public void setCrossoverPolicy(CrossoverPolicy value) {
-        this.crossoverPolicy = value;
-    }
-
-    /**
-     * Modify the crossover rate.
-     * 
-     * @param value the new crossover rate.
-     */
-    public void setCrossoverRate(double value) {
-        this.crossoverRate = value;
-    }
-
-    /**
-     * Modify the mutation policy.
-     * 
-     * @param value the new mutation policy.
-     */
-    public void setMutationPolicy(MutationPolicy value) {
-        this.mutationPolicy = value;
-    }
-
-    /**
-     * Modify the mutation rate.
-     * 
-     * @param value the new mutation rate.
-     */
-    public void setMutationRate(double value) {
-        this.mutationRate = value;
-    }
-
-    /**
-     * Modify the selection policy.
-     * 
-     * @param value the new selection policy.
-     */
-    public void setSelectionPolicy(SelectionPolicy value) {
-        this.selectionPolicy = value;
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.math.genetics;
+
+/**
+ * Implementation of a genetic algorithm. All factors that govern the operation
+ * of the algorithm can be configured for a specific problem.
+ */
+public class GeneticAlgorithm {
+    /** the crossover policy used by the algorithm. */
+    private CrossoverPolicy crossoverPolicy;
+
+    /** the rate of crossover for the algorithm. */
+    private double crossoverRate;
+
+    /** the mutation policy used by the algorithm. */
+    private MutationPolicy mutationPolicy;
+
+    /** the rate of mutation for the algorithm. */
+    private double mutationRate;
+
+    /** the selection policy used by the algorithm. */
+    private SelectionPolicy selectionPolicy;
+
+    /**
+     * Evolve the given population. Evolution stops when the stopping condition
+     * is satisfied.
+     * 
+     * @param initial the initial, seed population.
+     * @param condition the stopping condition used to stop evolution.
+     * @return the population that satisfies the stopping condition.
+     */
+    public Population evolve(Population initial, StoppingCondition condition) {
+        Population current = initial;
+        while (!condition.isSatisfied(current)) {
+            current = nextGeneration(current);
+        }
+        return current;
+    }
+
+    /**
+     * Access the crossover policy.
+     * 
+     * @return the crossover policy.
+     */
+    private CrossoverPolicy getCrossoverPolicy() {
+        return crossoverPolicy;
+    }
+
+    /**
+     * Access the crossover rate.
+     * 
+     * @return the crossover rate.
+     */
+    private double getCrossoverRate() {
+        return crossoverRate;
+    }
+
+    /**
+     * Access the mutation policy.
+     * 
+     * @return the mutation policy.
+     */
+    private MutationPolicy getMutationPolicy() {
+        return mutationPolicy;
+    }
+
+    /**
+     * Access the mutation rate.
+     * 
+     * @return the mutation rate.
+     */
+    private double getMutationRate() {
+        return mutationRate;
+    }
+
+    /**
+     * Access the selection policy.
+     * 
+     * @return the selection policy.
+     */
+    private SelectionPolicy getSelectionPolicy() {
+        return selectionPolicy;
+    }
+
+    /**
+     * Evolve the given population into the next generation.
+     * 
+     * @param current the current population.
+     * @return the population for the next generation.
+     */
+    private Population nextGeneration(Population current) {
+        Population nextGeneration = current.nextGeneration();
+
+        while (nextGeneration.getPopulationSize() < nextGeneration
+                .getPopulationLimit()) {
+            // select parent chromosomes
+            ChromosomePair pair = getSelectionPolicy().select(current);
+
+            // apply crossover policy to create two offspring
+            if (Math.random() < getCrossoverRate()) {
+                pair = getCrossoverPolicy().crossover(pair.getFirst(),
+                        pair.getSecond());
+            }
+
+            // apply mutation policy to first offspring
+            if (Math.random() < getMutationRate()) {
+                nextGeneration.addChromosome(getMutationPolicy().mutate(
+                        pair.getFirst()));
+
+                if (nextGeneration.getPopulationSize() < nextGeneration
+                        .getPopulationLimit()) {
+                    // apply mutation policy to second offspring
+                    nextGeneration.addChromosome(getMutationPolicy().mutate(
+                            pair.getSecond()));
+                }
+            }
+        }
+
+        return nextGeneration;
+    }
+
+    /**
+     * Modify the crossover policy.
+     * 
+     * @param value the new crossover policy.
+     */
+    public void setCrossoverPolicy(CrossoverPolicy value) {
+        this.crossoverPolicy = value;
+    }
+
+    /**
+     * Modify the crossover rate.
+     * 
+     * @param value the new crossover rate.
+     */
+    public void setCrossoverRate(double value) {
+        this.crossoverRate = value;
+    }
+
+    /**
+     * Modify the mutation policy.
+     * 
+     * @param value the new mutation policy.
+     */
+    public void setMutationPolicy(MutationPolicy value) {
+        this.mutationPolicy = value;
+    }
+
+    /**
+     * Modify the mutation rate.
+     * 
+     * @param value the new mutation rate.
+     */
+    public void setMutationRate(double value) {
+        this.mutationRate = value;
+    }
+
+    /**
+     * Modify the selection policy.
+     * 
+     * @param value the new selection policy.
+     */
+    public void setSelectionPolicy(SelectionPolicy value) {
+        this.selectionPolicy = value;
+    }
+}

Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/GeneticAlgorithm.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/GeneticAlgorithm.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/MutationPolicy.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/MutationPolicy.java?rev=643028&r1=643027&r2=643028&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/MutationPolicy.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/MutationPolicy.java Mon Mar 31 08:39:17 2008
@@ -1,30 +1,30 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.math.genetics;
-
-/**
- * Algorithm used to mutate a chrommosome.
- */
-public interface MutationPolicy {
-
-    /**
-     * Mutate the given chromosome.
-     * @param original the original chromosome.
-     * @return the mutated chromomsome.
-     */
-    Chromosome mutate(Chromosome original);
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.math.genetics;
+
+/**
+ * Algorithm used to mutate a chrommosome.
+ */
+public interface MutationPolicy {
+
+    /**
+     * Mutate the given chromosome.
+     * @param original the original chromosome.
+     * @return the mutated chromomsome.
+     */
+    Chromosome mutate(Chromosome original);
+}

Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/MutationPolicy.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/MutationPolicy.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/Population.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/Population.java?rev=643028&r1=643027&r2=643028&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/Population.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/Population.java Mon Mar 31 08:39:17 2008
@@ -1,52 +1,52 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.math.genetics;
-
-/**
- * A collection of chromosomes that facilitates generational evolution.
- */
-public interface Population {
-    /**
-     * Access the current population size.
-     * @return the current population size.
-     */
-    int getPopulationSize();
-
-    /**
-     * Access the maximum population size.
-     * @return the maximum population size.
-     */
-    int getPopulationLimit();
-
-    /**
-     * Start the population for the next generation.
-     * @return the beginnings of the next generation.
-     */
-    Population nextGeneration();
-
-    /**
-     * Add the given chromosome to the population.
-     * @param chromosome the chromosome to add.
-     */
-    void addChromosome(Chromosome chromosome);
-
-    /**
-     * Access the fittest chromosome in this population.
-     * @return the fittest chromosome.
-     */
-    Chromosome getFittestChromosome();
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.math.genetics;
+
+/**
+ * A collection of chromosomes that facilitates generational evolution.
+ */
+public interface Population {
+    /**
+     * Access the current population size.
+     * @return the current population size.
+     */
+    int getPopulationSize();
+
+    /**
+     * Access the maximum population size.
+     * @return the maximum population size.
+     */
+    int getPopulationLimit();
+
+    /**
+     * Start the population for the next generation.
+     * @return the beginnings of the next generation.
+     */
+    Population nextGeneration();
+
+    /**
+     * Add the given chromosome to the population.
+     * @param chromosome the chromosome to add.
+     */
+    void addChromosome(Chromosome chromosome);
+
+    /**
+     * Access the fittest chromosome in this population.
+     * @return the fittest chromosome.
+     */
+    Chromosome getFittestChromosome();
+}

Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/Population.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/Population.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/SelectionPolicy.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/SelectionPolicy.java?rev=643028&r1=643027&r2=643028&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/SelectionPolicy.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/SelectionPolicy.java Mon Mar 31 08:39:17 2008
@@ -1,29 +1,29 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.math.genetics;
-
-/**
- * Algorithm used to select a chromosome pair from a population.
- */
-public interface SelectionPolicy {
-    /**
-     * Select two chromosomes from the population.
-     * @param population the population from which the chromosomes are choosen.
-     * @return the selected chromosomes.
-     */
-    ChromosomePair select(Population population);
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.math.genetics;
+
+/**
+ * Algorithm used to select a chromosome pair from a population.
+ */
+public interface SelectionPolicy {
+    /**
+     * Select two chromosomes from the population.
+     * @param population the population from which the chromosomes are choosen.
+     * @return the selected chromosomes.
+     */
+    ChromosomePair select(Population population);
+}

Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/SelectionPolicy.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/SelectionPolicy.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/StoppingCondition.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/genetics/StoppingCondition.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain