GeneratedEmbeddings<TEmbedding> Class

Definition

Represents the result of an operation to generate embeddings.

C#
public sealed class GeneratedEmbeddings<TEmbedding> : System.Collections.Generic.ICollection<TEmbedding>, System.Collections.Generic.IEnumerable<TEmbedding>, System.Collections.Generic.IList<TEmbedding>, System.Collections.Generic.IReadOnlyCollection<TEmbedding>, System.Collections.Generic.IReadOnlyList<TEmbedding> where TEmbedding : Embedding

Type Parameters

TEmbedding

Specifies the type of the generated embeddings.

Inheritance
GeneratedEmbeddings<TEmbedding>
Implements

Constructors

GeneratedEmbeddings<TEmbedding>()

Initializes a new instance of the GeneratedEmbeddings<TEmbedding> class.

GeneratedEmbeddings<TEmbedding>(IEnumerable<TEmbedding>)

Initializes a new instance of the GeneratedEmbeddings<TEmbedding> class that contains all of the embeddings from the specified collection.

GeneratedEmbeddings<TEmbedding>(Int32)

Initializes a new instance of the GeneratedEmbeddings<TEmbedding> class with the specified capacity.

Properties

AdditionalProperties

Gets or sets any additional properties associated with the embeddings.

Count

Gets the number of elements contained in the ICollection<T>.

Item[Int32]

Gets or sets the element at the specified index.

Usage

Gets or sets usage details for the embeddings' generation.

Methods

Add(TEmbedding)

Adds an item to the ICollection<T>.

AddRange(IEnumerable<TEmbedding>)

Adds the embeddings from the specified collection to the end of this list.

Clear()

Removes all items from the ICollection<T>.

Contains(TEmbedding)

Determines whether the ICollection<T> contains a specific value.

CopyTo(TEmbedding[], Int32)

Copies the elements of the ICollection<T> to an Array, starting at a particular Array index.

GetEnumerator()

Returns an enumerator that iterates through the collection.

IndexOf(TEmbedding)

Determines the index of a specific item in the IList<T>.

Insert(Int32, TEmbedding)

Inserts an item to the IList<T> at the specified index.

Remove(TEmbedding)

Removes the first occurrence of a specific object from the ICollection<T>.

RemoveAt(Int32)

Removes the IList<T> item at the specified index.

Explicit Interface Implementations

ICollection<TEmbedding>.IsReadOnly

Gets a value indicating whether the ICollection<T> is read-only.

IEnumerable.GetEnumerator()

Returns an enumerator that iterates through a collection.

Extension Methods

ToFrozenDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>)

Creates a FrozenDictionary<TKey,TValue> from an IEnumerable<T> according to specified key selector function.

ToFrozenDictionary<TSource,TKey,TElement>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>, IEqualityComparer<TKey>)

Creates a FrozenDictionary<TKey,TValue> from an IEnumerable<T> according to specified key selector and element selector functions.

ToFrozenSet<T>(IEnumerable<T>, IEqualityComparer<T>)

Creates a FrozenSet<T> with the specified values.

ToImmutableArray<TSource>(IEnumerable<TSource>)

Creates an immutable array from the specified collection.

ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>)

Constructs an immutable dictionary based on some transformation of a sequence.

ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>)

Constructs an immutable dictionary from an existing collection of elements, applying a transformation function to the source keys.

ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>, IEqualityComparer<TValue>)

Enumerates and transforms a sequence, and produces an immutable dictionary of its contents by using the specified key and value comparers.

ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>)

Enumerates and transforms a sequence, and produces an immutable dictionary of its contents by using the specified key comparer.

ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>)

Enumerates and transforms a sequence, and produces an immutable dictionary of its contents.

ToImmutableHashSet<TSource>(IEnumerable<TSource>, IEqualityComparer<TSource>)

Enumerates a sequence, produces an immutable hash set of its contents, and uses the specified equality comparer for the set type.

ToImmutableHashSet<TSource>(IEnumerable<TSource>)

Enumerates a sequence and produces an immutable hash set of its contents.

ToImmutableList<TSource>(IEnumerable<TSource>)

Enumerates a sequence and produces an immutable list of its contents.

ToImmutableSortedDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IComparer<TKey>, IEqualityComparer<TValue>)

Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents by using the specified key and value comparers.

ToImmutableSortedDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IComparer<TKey>)

Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents by using the specified key comparer.

ToImmutableSortedDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>)

Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents.

ToImmutableSortedSet<TSource>(IEnumerable<TSource>, IComparer<TSource>)

Enumerates a sequence, produces an immutable sorted set of its contents, and uses the specified comparer.

ToImmutableSortedSet<TSource>(IEnumerable<TSource>)

Enumerates a sequence and produces an immutable sorted set of its contents.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler)

Copies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption)

Copies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>)

Returns a DataTable that contains copies of the DataRow objects, given an input IEnumerable<T> object where the generic parameter T is DataRow.

Applies to

Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided)