@zfunction/genetics-js
Version:
Genetic and evolutionary algorithms framework for the web
80 lines • 2.28 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var Phase = /** @class */ (function () {
function Phase(duration, state) {
this._duration = duration;
this._state = state;
}
Object.defineProperty(Phase.prototype, "duration", {
get: function () {
return this._duration;
},
set: function (value) {
this._duration = value;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Phase.prototype, "state", {
get: function () {
return this._state;
},
set: function (value) {
this._state = value;
},
enumerable: true,
configurable: true
});
return Phase;
}());
exports.Phase = Phase;
var TLLogic = /** @class */ (function () {
function TLLogic(name, phases, offset) {
this._id = name;
this._phases = phases ? phases : [];
this._offset = offset ? offset : 0;
}
Object.defineProperty(TLLogic.prototype, "size", {
get: function () {
return 1 + this.phases.length; // +1 because of offset
},
enumerable: true,
configurable: true
});
Object.defineProperty(TLLogic.prototype, "offset", {
get: function () {
return this._offset;
},
set: function (value) {
this._offset = value;
},
enumerable: true,
configurable: true
});
Object.defineProperty(TLLogic.prototype, "phases", {
get: function () {
return this._phases;
},
set: function (value) {
this._phases = value;
},
enumerable: true,
configurable: true
});
Object.defineProperty(TLLogic.prototype, "id", {
get: function () {
return this._id;
},
set: function (value) {
this._id = value;
},
enumerable: true,
configurable: true
});
TLLogic.prototype.pushPhase = function (phase) {
this.phases.push(phase);
};
return TLLogic;
}());
exports.TLLogic = TLLogic;
//# sourceMappingURL=tl-logic.js.map