PropCost.java
Go to the documentation of this file.
00001
00002
00003
00004
00005
00006
00007
00008
00009 package org.gecode;
00010
00032 public enum PropCost {
00033 PC_CRAZY_LO(0),
00034 PC_CRAZY_HI(0),
00035 PC_CUBIC_LO(1),
00036 PC_CUBIC_HI(1),
00037 PC_QUADRATIC_LO(2),
00038 PC_QUADRATIC_HI(2),
00039 PC_LINEAR_HI(3),
00040 PC_LINEAR_LO(4),
00041 PC_TERNARY_HI(5),
00042 PC_BINARY_HI(6),
00043 PC_TERNARY_LO(6),
00044 PC_BINARY_LO(7),
00045 PC_UNARY_LO(7),
00046 PC_UNARY_HI(7);
00047
00048 public final int swigValue() {
00049 return swigValue;
00050 }
00051
00052 public static PropCost swigToEnum(int swigValue) {
00053 PropCost[] swigValues = PropCost.class.getEnumConstants();
00054 if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
00055 return swigValues[swigValue];
00056 for (PropCost swigEnum : swigValues)
00057 if (swigEnum.swigValue == swigValue)
00058 return swigEnum;
00059 throw new IllegalArgumentException("No enum " + PropCost.class + " with value " + swigValue);
00060 }
00061
00062 private PropCost() {
00063 this.swigValue = SwigNext.next++;
00064 }
00065
00066 private PropCost(int swigValue) {
00067 this.swigValue = swigValue;
00068 SwigNext.next = swigValue+1;
00069 }
00070
00071 private PropCost(PropCost swigEnum) {
00072 this.swigValue = swigEnum.swigValue;
00073 SwigNext.next = this.swigValue+1;
00074 }
00075
00076 private final int swigValue;
00077
00078 private static class SwigNext {
00079 private static int next = 0;
00080 }
00081 }
00082