示例#1
0
 public Permutation(PermutationTypes type, IntArray elements)
     : this(type, elements.Length)
 {
     for (int i = 0; i < array.Length; i++)
     {
         array[i] = elements[i];
     }
 }
示例#2
0
 public Permutation(PermutationTypes type, int length)
     : base(length)
 {
     for (int i = 0; i < length; i++)
     {
         this[i] = i;
     }
     permutationType = type;
 }
        public PermutationEncoding(string name, int length, PermutationTypes type)
            : base(name)
        {
            lengthParameter          = new FixedValueParameter <IntValue>(Name + ".Length", new IntValue(length));
            permutationTypeParameter = new FixedValueParameter <PermutationType>(Name + ".Type", new PermutationType(type));
            Parameters.Add(lengthParameter);
            Parameters.Add(permutationTypeParameter);

            SolutionCreator = new RandomPermutationCreator();
            RegisterParameterEvents();
            DiscoverOperators();
        }
示例#4
0
 public Permutation(PermutationTypes type, IntArray elements)
   : this(type, elements.Length) {
   for (int i = 0; i < array.Length; i++)
     array[i] = elements[i];
 }
示例#5
0
 public Permutation(PermutationTypes type, int[] elements)
   : base(elements) {
   permutationType = type;
 }
示例#6
0
 public Permutation(PermutationTypes type, int length, IRandom random)
   : this(type, length) {
   Randomize(random);
 }
示例#7
0
 public Permutation(PermutationTypes type, int length)
   : base(length) {
   for (int i = 0; i < length; i++)
     this[i] = i;
   permutationType = type;
 }
示例#8
0
 public Permutation(PermutationTypes type)
   : base() {
   permutationType = type;
 }
示例#9
0
 protected Permutation(Permutation original, Cloner cloner)
   : base(original, cloner) {
   this.permutationType = original.permutationType;
 }
示例#10
0
 public Permutation(PermutationTypes type, int[] elements)
     : base(elements)
 {
     permutationType = type;
 }
示例#11
0
 public Permutation(PermutationTypes type, int length, IRandom random)
     : this(type, length)
 {
     Randomize(random);
 }
示例#12
0
 public Permutation(PermutationTypes type)
     : base()
 {
     permutationType = type;
 }
示例#13
0
 protected Permutation(Permutation original, Cloner cloner)
     : base(original, cloner)
 {
     this.permutationType = original.permutationType;
 }