SqlServerDbFunctionsExtensions.VectorDistance<T> メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
指定された距離メトリックを使用して、2 つのベクトル間の距離を計算します。
public static double VectorDistance<T>(this Microsoft.EntityFrameworkCore.DbFunctions _, string distanceMetric, Microsoft.Data.SqlTypes.SqlVector<T> vector1, Microsoft.Data.SqlTypes.SqlVector<T> vector2) where T : struct;
static member VectorDistance : Microsoft.EntityFrameworkCore.DbFunctions * string * Microsoft.Data.SqlTypes.SqlVector<'T (requires 'T : struct)> * Microsoft.Data.SqlTypes.SqlVector<'T (requires 'T : struct)> -> double (requires 'T : struct)
<Extension()>
Public Function VectorDistance(Of T As Structure) (_ As DbFunctions, distanceMetric As String, vector1 As SqlVector(Of T), vector2 As SqlVector(Of T)) As Double
型パラメーター
- T
パラメーター
DbFunctions のインスタンスです。
- distanceMetric
- String
指定された 2 つのベクトル間の距離を計算するために使用する距離メトリックの名前を持つ文字列。 サポートされている距離メトリックは、 cosine、 euclidean 、または dotです。
- vector1
- SqlVector<T>
最初のベクトル。
- vector2
- SqlVector<T>
2 番目のベクトル。
戻り値
注釈
ベクター距離は常に正確であり、使用可能な場合でもベクター インデックスを使用しません。