Grammalecte  Check-in [0369072caa]

Overview
Comment:[graphspell][js] dawg: useless parameters
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | graphspell
Files: files | file ages | folders
SHA3-256: 0369072caa6172b5c0f7e78f968a6524b9a257d03cea4485df29d03f264554fd
User & Date: olr on 2020-11-16 10:33:54
Other Links: manifest | tags
Context
2020-11-16
17:45
[fr] ajustements check-in: c456372ec6 user: olr tags: trunk, fr
10:33
[graphspell][js] dawg: useless parameters check-in: 0369072caa user: olr tags: trunk, graphspell
2020-11-15
09:53
[graphspell][js] dawg: fix bug about node identification check-in: 15cc11e719 user: olr tags: trunk, graphspell
Changes

Modified graphspell-js/dawg.js from [35cc08667a] to [1c01c104ea].

494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
        // Nodes are equivalent if they have identical arcs, and each identical arc leads to identical states.
        return this.__str__() == other.__str__();
    }

    sortArcs (dValOccur) {
        let lTemp = Array.from(this.arcs.entries());
        lTemp.sort(function (a, b) {
            if (dValOccur.get(a[0], 0) > dValOccur.get(b[0], 0))
                return -1;
            if (dValOccur.get(a[0], 0) < dValOccur.get(b[0], 0))
                return 1;
            return 0;
        });
        this.arcs = new Map(lTemp);
    }

    display (nTab, lArcVal, bRecur=false) {







|

|







494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
        // Nodes are equivalent if they have identical arcs, and each identical arc leads to identical states.
        return this.__str__() == other.__str__();
    }

    sortArcs (dValOccur) {
        let lTemp = Array.from(this.arcs.entries());
        lTemp.sort(function (a, b) {
            if (dValOccur.get(a[0]) > dValOccur.get(b[0]))
                return -1;
            if (dValOccur.get(a[0]) < dValOccur.get(b[0]))
                return 1;
            return 0;
        });
        this.arcs = new Map(lTemp);
    }

    display (nTab, lArcVal, bRecur=false) {