// Path: src/main/java/org/avmframework/initialization/DefaultInitializer.java
// public class DefaultInitializer extends Initializer {
// 
//   @Override
//   public void initialize(Vector vector) {
//     vector.setVariablesToInitial();
//   }
// }
// 
// Path: src/main/java/org/avmframework/localsearch/IteratedPatternSearch.java
// public class IteratedPatternSearch extends PatternSearch {
// 
//   public IteratedPatternSearch() {}
// 
//   public IteratedPatternSearch(int accelerationFactor) {
//     super(accelerationFactor);
//   }
// 
//   protected void performSearch() throws TerminationException {
//     ObjectiveValue next = objFun.evaluate(vector);
//     ObjectiveValue last;
// 
//     do {
//       initialize();
//       if (establishDirection()) {
//         patternSearch();
//       }
// 
//       last = next;
//       next = objFun.evaluate(vector);
//     }
//     while (next.betterThan(last));
//   }
// }


import org.avmframework.initialization.DefaultInitializer;
import org.avmframework.localsearch.IteratedPatternSearch;
package org.avmframework;


public class AlternatingVariableMethods {

  public static AlternatingVariableMethod anyAlternatingVariableMethod() {
    return new AlternatingVariableMethod(
        new IteratedPatternSearch(),
        TerminationPolicy.createMaxEvaluationsTerminationPolicy(100),
        new DefaultInitializer());
  }

  public static AlternatingVariableMethod anyAlternatingVariableMethodWithTerminationPolicy(
      TerminationPolicy tp) {
// Path: src/main/java/org/avmframework/initialization/DefaultInitializer.java
// public class DefaultInitializer extends Initializer {
// 
//   @Override
//   public void initialize(Vector vector) {
//     vector.setVariablesToInitial();
//   }
// }
// 
// Path: src/main/java/org/avmframework/localsearch/IteratedPatternSearch.java
// public class IteratedPatternSearch extends PatternSearch {
// 
//   public IteratedPatternSearch() {}
// 
//   public IteratedPatternSearch(int accelerationFactor) {
//     super(accelerationFactor);
//   }
// 
//   protected void performSearch() throws TerminationException {
//     ObjectiveValue next = objFun.evaluate(vector);
//     ObjectiveValue last;
// 
//     do {
//       initialize();
//       if (establishDirection()) {
//         patternSearch();
//       }
// 
//       last = next;
//       next = objFun.evaluate(vector);
//     }
//     while (next.betterThan(last));
//   }
// }


// Path: src/test/java/org/avmframework/AlternatingVariableMethods.java
import org.avmframework.initialization.DefaultInitializer;
import org.avmframework.localsearch.IteratedPatternSearch;

package org.avmframework;


public class AlternatingVariableMethods {

  public static AlternatingVariableMethod anyAlternatingVariableMethod() {
    return new AlternatingVariableMethod(
        new IteratedPatternSearch(),
        TerminationPolicy.createMaxEvaluationsTerminationPolicy(100),
        new DefaultInitializer());
  }

  public static AlternatingVariableMethod anyAlternatingVariableMethodWithTerminationPolicy(
      TerminationPolicy tp) {
    return new AlternatingVariableMethod(new IteratedPatternSearch(), tp, new DefaultInitializer());