示例#1
0
        public static IndexFlatSafeHandle New(long d, MetricType metric = MetricType.MetricL2)
        {
            var index = new IndexFlatSafeHandle();

            FaissEnvironment.FaissNativeInit();
            _native.faiss_IndexFlat_new_with(ref index, d, metric);
            return(index);
        }
示例#2
0
 internal IndexFlat(IndexFlatSafeHandle handle) : base(handle)
 {
 }
示例#3
0
 public IndexFlat(long dimension, MetricType metric) : base(IndexFlatSafeHandle.New(dimension, metric))
 {
 }