UNPKG

geneea-nlp-client

Version:

The TypeScript Client for Geneea Interpretor G3 API.

27 lines (26 loc) 761 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Vector = void 0; const common_1 = require("../../common/common"); /** Class encapsulating a vector. */ class Vector { /** * * @param name Name identifying the model of this vector. * @param version A particular version of the model which produced this vector. * @param values The vector values. */ constructor(name, version, values) { this.name = name; this.version = version; this.values = values; } /** Dimension of this vector. */ get dimension() { return this.values.length; } toString() { return (0, common_1.objToStr)(this, Object.keys(this)); } } exports.Vector = Vector;