MCPcopy
hub / github.com/BrainJS/brain.js / constructor

Method constructor

src/utilities/data-formatter.js:8–20  ·  view source on GitHub ↗
(values, maxThreshold = 0)

Source from the content-addressed store, hash-verified

6 */
7export default class DataFormatter {
8 constructor(values, maxThreshold = 0) {
9 if (values === undefined) return;
10
11 this.values = values;
12 // go over all characters and keep track of all unique ones seen
13 // count up all characters
14 this.indexTable = {};
15 this.characterTable = {};
16 this.characters = [];
17 this.specialIndexes = [];
18 this.buildCharactersFromIterable(values);
19 this.buildTables(maxThreshold);
20 }
21
22 buildCharactersFromIterable(values) {
23 let tempCharactersTable = {};

Callers

nothing calls this directly

Calls 2

buildTablesMethod · 0.95

Tested by

no test coverage detected