Embedding Class
- java.
lang. Object - com.
microsoft. semantickernel. services. textembedding. Embedding
- com.
public class Embedding
Represents a strongly typed vector of numeric data.
Constructor Summary
| Constructor | Description |
|---|---|
| Embedding() |
Initializes a new instance of the Embedding class. |
| Embedding(float[] vector) |
Initializes a new instance of the Embedding class that contains numeric elements copied from the specified array |
| Embedding(List<Float> vector) |
Initializes a new instance of the Embedding class that contains numeric elements copied from the specified collection |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| static Embedding |
empty()
Returns an empty |
| java.util.List<java.lang.Float> |
getVector()
Return the embedding vector as a read-only list. |
Methods inherited from java.lang.Object
Constructor Details
Embedding
public Embedding()
Initializes a new instance of the Embedding class.
Embedding
public Embedding(float[] vector)
Initializes a new instance of the Embedding class that contains numeric elements copied from the specified array
Parameters:
Embedding
public Embedding(List
Initializes a new instance of the Embedding class that contains numeric elements copied from the specified collection
Parameters:
Method Details
empty
public static Embedding empty()
Returns an empty Embedding instance.
Returns:
Embedding instance.getVector
public List
Return the embedding vector as a read-only list.
Returns: