diff --git a/reference/mongodb/bson/binary/fromvector.xml b/reference/mongodb/bson/binary/fromvector.xml new file mode 100644 index 0000000000..b5987e34f4 --- /dev/null +++ b/reference/mongodb/bson/binary/fromvector.xml @@ -0,0 +1,92 @@ + + + + + + + MongoDB\BSON\Binary::fromVector + Crée un nouveau binaire avec le sous-type MongoDB\BSON\Binary::SUBTYPE_VECTOR à partir du tableau et du type de vecteur donnés + + + + &reftitle.description; + + final public static MongoDB\BSON\BinaryMongoDB\BSON\Binary::fromVector + arrayvector + MongoDB\BSON\VectorTypevectorType + + + + + &reftitle.parameters; + + + vector (array) + + + Un tableau de valeurs représentant les données vectorielles. Le type de chaque valeur doit correspondre au type indiqué par le paramètre vectorType: + + pour MongoDB\BSON\VectorType::Float32, chaque valeur doit être un float + pour MongoDB\BSON\VectorType::Int8, chaque valeur doit être un int de 8 bits, c'est-à-dire de -127 à 128 + pour MongoDB\BSON\VectorType::PackedBit, chaque valeur doit être un bool ou un int de 1 bit, c'est-à-dire 0 ou 1 + + + + + + vectorType (MongoDB\BSON\VectorType) + + + Le type de donnée du vecteur. + + + + + + + + &reftitle.returnvalues; + + Renvoie un nouveau binaire avec le sous-type MongoDB\BSON\Binary::SUBTYPE_VECTOR. + + + + + &reftitle.errors; + + &mongodb.throws.argumentparsing; + + + + + &reftitle.seealso; + + MongoDB\BSON\Binary::toArray + MongoDB\BSON\Binary::getVectorType + MongoDB\BSON\VectorType + BSON Types + + + + + + diff --git a/reference/mongodb/bson/binary/getvectortype.xml b/reference/mongodb/bson/binary/getvectortype.xml new file mode 100644 index 0000000000..81c0cff243 --- /dev/null +++ b/reference/mongodb/bson/binary/getvectortype.xml @@ -0,0 +1,68 @@ + + + + + + + MongoDB\BSON\Binary::getVectorType + Renvoie le type de données pour un binaire avec le sous-type vecteur + + + + &reftitle.description; + + final public MongoDB\BSON\VectorTypeMongoDB\BSON\Binary::getVectorType + + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Renvoie le type de données du vecteur binaire. + + + + + &reftitle.errors; + + Lève une MongoDB\Driver\Exception\LogicException si le sous-type n'est pas MongoDB\BSON\Binary::SUBTYPE_VECTOR. + &mongodb.throws.argumentparsing; + + + + + &reftitle.seealso; + + Types BSON + MongoDB\BSON\VectorType + + + + + + diff --git a/reference/mongodb/bson/binary/toarray.xml b/reference/mongodb/bson/binary/toarray.xml new file mode 100644 index 0000000000..0992e2cb0d --- /dev/null +++ b/reference/mongodb/bson/binary/toarray.xml @@ -0,0 +1,68 @@ + + + + + + + MongoDB\BSON\Binary::toArray + Renvoie le vecteur sous forme de tableau pour un binaire avec le sous-type MongoDB\BSON\Binary::SUBTYPE_VECTOR + + + + &reftitle.description; + + final public arrayMongoDB\BSON\Binary::toArray + + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Renvoie un tableau contenant les données vectorielles. + + + + + &reftitle.errors; + + Lève une MongoDB\Driver\Exception\LogicException si le sous-type n'est pas MongoDB\BSON\Binary::SUBTYPE_VECTOR. + &mongodb.throws.argumentparsing; + + + + + &reftitle.seealso; + + MongoDB\BSON\Binary::fromVector + Types BSON + + + + + + diff --git a/reference/mongodb/bson/vectortype.xml b/reference/mongodb/bson/vectortype.xml new file mode 100644 index 0000000000..e70e8c55a1 --- /dev/null +++ b/reference/mongodb/bson/vectortype.xml @@ -0,0 +1,71 @@ + + + + + + + L'énumération MongoDB\BSON\VectorType + MongoDB\BSON\VectorType + + +
+ &reftitle.intro; + + L'énumération MongoDB\BSON\VectorType est utilisée pour spécifier le type de + données vectorielles stockées dans une MongoDB\BSON\Binary avec le + sous-type MongoDB\BSON\Binary::TYPE_VECTOR. + +
+ +
+ &reftitle.enumsynopsis; + + + MongoDB\BSON\VectorType + + + Float32 + + Chaque élément dans le vecteur est une valeur à virgule flottante de 32 bits. + + + + + Int8 + + Chaque élément dans le vecteur est une valeur entière de 8 bits. + + + + + PackedBit + + Chaque élément dans le vecteur est une valeur de 1 bit. Lors de la création de vecteurs + de ce type, vous pouvez passer soit des valeurs bool, soit des valeurs int de 1 bit, c'est-à-dire 0 ou 1. + + + +
+
+
+ +