MCPcopy Create free account
hub / github.com/chronoxor/FastBinaryEncoding / get

Method get

projects/JavaScript/proto/fbe.js:2640–2656  ·  view source on GitHub ↗

* Get the vector * @this {!FieldModelVector} * @param {Array=} values Vector values, defaults is [] * @returns {!Array} Result vector values

(values = [])

Source from the content-addressed store, hash-verified

2638 * @returns {!Array} Result vector values
2639 */
2640 get (values = []) {
2641 values.length = 0
2642
2643 let fbeVectorSize = this.size
2644 if (fbeVectorSize === 0) {
2645 return values
2646 }
2647
2648 let fbeModel = this.getItem(0)
2649 for (let i = 0; i < fbeVectorSize; i++) {
2650 let value = fbeModel.get()
2651 values.push(value)
2652 fbeModel.fbeShift(fbeModel.fbeSize)
2653 }
2654
2655 return values
2656 }
2657
2658 /**
2659 * Set the vector

Callers

nothing calls this directly

Calls 3

getItemMethod · 0.95
getMethod · 0.45
fbeShiftMethod · 0.45

Tested by

no test coverage detected