61 lines
2.4 KiB
Java
61 lines
2.4 KiB
Java
/* ----------------------------------------------------------------------------
|
|
* This file was automatically generated by SWIG (http://www.swig.org).
|
|
* Version 4.0.2
|
|
*
|
|
* Do not make changes to this file unless you know what you are doing--modify
|
|
* the SWIG interface file instead.
|
|
* ----------------------------------------------------------------------------- */
|
|
|
|
package com.twitter.ann.faiss;
|
|
|
|
public final class MetricType {
|
|
public final static MetricType METRIC_INNER_PRODUCT = new MetricType("METRIC_INNER_PRODUCT", swigfaissJNI.METRIC_INNER_PRODUCT_get());
|
|
public final static MetricType METRIC_L2 = new MetricType("METRIC_L2", swigfaissJNI.METRIC_L2_get());
|
|
public final static MetricType METRIC_L1 = new MetricType("METRIC_L1");
|
|
public final static MetricType METRIC_Linf = new MetricType("METRIC_Linf");
|
|
public final static MetricType METRIC_Lp = new MetricType("METRIC_Lp");
|
|
public final static MetricType METRIC_Canberra = new MetricType("METRIC_Canberra", swigfaissJNI.METRIC_Canberra_get());
|
|
public final static MetricType METRIC_BrayCurtis = new MetricType("METRIC_BrayCurtis");
|
|
public final static MetricType METRIC_JensenShannon = new MetricType("METRIC_JensenShannon");
|
|
|
|
public final int swigValue() {
|
|
return swigValue;
|
|
}
|
|
|
|
public String toString() {
|
|
return swigName;
|
|
}
|
|
|
|
public static MetricType swigToEnum(int swigValue) {
|
|
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
|
|
return swigValues[swigValue];
|
|
for (int i = 0; i < swigValues.length; i++)
|
|
if (swigValues[i].swigValue == swigValue)
|
|
return swigValues[i];
|
|
throw new IllegalArgumentException("No enum " + MetricType.class + " with value " + swigValue);
|
|
}
|
|
|
|
private MetricType(String swigName) {
|
|
this.swigName = swigName;
|
|
this.swigValue = swigNext++;
|
|
}
|
|
|
|
private MetricType(String swigName, int swigValue) {
|
|
this.swigName = swigName;
|
|
this.swigValue = swigValue;
|
|
swigNext = swigValue+1;
|
|
}
|
|
|
|
private MetricType(String swigName, MetricType swigEnum) {
|
|
this.swigName = swigName;
|
|
this.swigValue = swigEnum.swigValue;
|
|
swigNext = this.swigValue+1;
|
|
}
|
|
|
|
private static MetricType[] swigValues = { METRIC_INNER_PRODUCT, METRIC_L2, METRIC_L1, METRIC_Linf, METRIC_Lp, METRIC_Canberra, METRIC_BrayCurtis, METRIC_JensenShannon };
|
|
private static int swigNext = 0;
|
|
private final int swigValue;
|
|
private final String swigName;
|
|
}
|
|
|