Faiss

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | Public Attributes | List of all members
faiss::LinearTransform Struct Reference

`#include <VectorTransform.h>`

Inheritance diagram for faiss::LinearTransform:

## Public Member Functions
| LinearTransform (int d_in=0, int d_out=0, bool have_bias=false)
| both d_in > d_out and d_out < d_in are supported
virtual void | apply_noalloc (idx_t n, const float *x, float *xt) const
| same as apply, but result is pre-allocated
void | transform_transpose (idx_t n, const float *y, float *x) const
const float * | maybe_subsample_train_set (Index::idx_t *n, const float *x)
Public Member Functions inherited from faiss::VectorTransform
| VectorTransform (int d_in=0, int d_out=0)
| ! output dimension
virtual void | train (idx_t n, const float *x)
float * | apply (idx_t n, const float *x) const
virtual void | reverse_transform (idx_t n, const float *xt, float *x) const

## Public Attributes
bool | have_bias
std::vector< float > | A
| ! whether to use the bias term More...
std::vector< float > | b
| bias vector, size d_out
size_t | max_points_per_d
bool | verbose
Public Attributes inherited from faiss::VectorTransform
int | d_in
int | d_out
| ! input dimension
bool | is_trained

## Additional Inherited Members
Public Types inherited from faiss::VectorTransform
typedef Index::idx_t | idx_t

## Detailed Description

Generic linear transformation, with bias term applied on output y = A * x + b

Definition at line 78 of file VectorTransform.h.

## Member Function Documentation

void LinearTransform::transform_transpose | ( | idx_t | n,
|  | const float * | y,
|  | float * | x
| ) |  | const

compute x = A^T * (x - b) is reverse transform if A has orthonormal lines

Definition at line 130 of file VectorTransform.cpp.

## Member Data Documentation

std::vector<float> faiss::LinearTransform::A

! whether to use the bias term

Transformation matrix, size d_out * d_in

Definition at line 84 of file VectorTransform.h.

The documentation for this struct was generated from the following files:

- VectorTransform.h
- VectorTransform.cpp