Couchbase Lite C++
Couchbase Lite C++ API
Loading...
Searching...
No Matches
cbl::VectorEncoding Class Reference

Vector encoding type to use in a VectorIndexConfiguration, for reducing the size of the stored vectors. More...

#include <cbl++/VectorIndex.hh>

Public Member Functions

 VectorEncoding ()=delete
 Deleted: a VectorEncoding must be constructed via one of the named factories (none, scalarQuantizer, productQuantizer).

Static Public Member Functions

static VectorEncoding none ()
 Creates a no-encoding type to use in VectorIndexConfiguration; 4 bytes per dimension, no data loss.
static VectorEncoding scalarQuantizer (CBLScalarQuantizerType type)
 Creates a Scalar Quantizer encoding type to use in VectorIndexConfiguration.
static VectorEncoding productQuantizer (unsigned int subquantizers, unsigned int bits)
 Creates a Product Quantizer encoding type to use in VectorIndexConfiguration.

Protected Member Functions

CBLVectorEncodingref () const

Friends

class VectorIndexConfiguration

Detailed Description

Vector encoding type to use in a VectorIndexConfiguration, for reducing the size of the stored vectors.

Note
ENTERPRISE EDITION ONLY

Constructor & Destructor Documentation

◆ VectorEncoding()

cbl::VectorEncoding::VectorEncoding ( )
delete

Deleted: a VectorEncoding must be constructed via one of the named factories (none, scalarQuantizer, productQuantizer).

Member Function Documentation

◆ none()

VectorEncoding cbl::VectorEncoding::none ( )
inlinestatic

Creates a no-encoding type to use in VectorIndexConfiguration; 4 bytes per dimension, no data loss.

Returns
A None encoding object.

◆ productQuantizer()

VectorEncoding cbl::VectorEncoding::productQuantizer ( unsigned int subquantizers,
unsigned int bits )
inlinestatic

Creates a Product Quantizer encoding type to use in VectorIndexConfiguration.

Parameters
subquantizersNumber of subquantizers. Must be > 1 and a factor of vector dimensions.
bitsNumber of bits. Must be >= 4 and <= 12.
Returns
A Product Quantizer encoding object.

◆ ref()

CBLVectorEncoding * cbl::VectorEncoding::ref ( ) const
inlineprotected

◆ scalarQuantizer()

VectorEncoding cbl::VectorEncoding::scalarQuantizer ( CBLScalarQuantizerType type)
inlinestatic

Creates a Scalar Quantizer encoding type to use in VectorIndexConfiguration.

Parameters
typeScalar Quantizer Type.
Returns
A Scalar Quantizer encoding object.

◆ VectorIndexConfiguration

friend class VectorIndexConfiguration
friend

The documentation for this class was generated from the following file: