import { LayoutSettings } from '../layered/SugiyamaLayoutSettings';
//  MDL layout settings
export class MdsLayoutSettings extends LayoutSettings {
    constructor() {
        //  the setting of Multi-Dimensional Scaling layout
        super(...arguments);
        //  private double epsilon = Math.Pow(10,-8);
        this.pivotNumber = 50;
        this.iterationsWithMajorization = 30;
        this.scaleX = 200;
        this.scaleY = 200;
        this.exponent = -2;
        this.rotationAngle = 0;
        this.removeOverlaps = true;
        //
        this._callIterationsWithMajorizationThreshold = 3000;
        this.adjustScale = false;
    }
    //  remove overlaps between node boundaries
    get RemoveOverlaps() {
        return this.removeOverlaps;
    }
    set RemoveOverlaps(value) {
        this.removeOverlaps = value;
    }
    //  Number of pivots in Landmark Scaling (between 3 and number of objects).
    get PivotNumber() {
        return this.pivotNumber;
    }
    set PivotNumber(value) {
        this.pivotNumber = value;
    }
    //  Number of iterations in distance scaling
    get IterationsWithMajorization() {
        return this.iterationsWithMajorization;
    }
    set IterationsWithMajorization(value) {
        this.iterationsWithMajorization = value;
    }
    //  X Scaling Factor.
    get ScaleX() {
        return this.scaleX;
    }
    set ScaleX(value) {
        this.scaleX = value;
    }
    //  Y Scaling Factor.
    get ScaleY() {
        return this.scaleY;
    }
    set ScaleY(value) {
        /*Assert.assert(!isNaN(value))*/
        this.scaleY = value;
    }
    //  Weight matrix exponent.
    get Exponent() {
        return this.exponent;
    }
    set Exponent(value) {
        this.exponent = value;
    }
    //  rotation angle
    get RotationAngle() {
        return this.rotationAngle;
    }
    set RotationAngle(value) {
        this.rotationAngle = value % 360;
    }
    //  Settings for calculation of ideal edge length
    get IdealEdgeLength() {
        return this.edgeConstraints;
    }
    set IdealEdgeLength(value) {
        this.edgeConstraints = value;
    }
    //  Adjust the scale of the graph if there is not enough whitespace between nodes
    get AdjustScale() {
        return this.adjustScale;
    }
    set AdjustScale(value) {
        this.adjustScale = value;
    }
    GetNumberOfIterationsWithMajorization(nodeCount) {
        if (nodeCount > this.CallIterationsWithMajorizationThreshold) {
            return 0;
        }
        return this.IterationsWithMajorization;
    }
    get CallIterationsWithMajorizationThreshold() {
        return this._callIterationsWithMajorizationThreshold;
    }
    set CallIterationsWithMajorizationThreshold(value) {
        this._callIterationsWithMajorizationThreshold = value;
    }
}
//# sourceMappingURL=MDSLayoutSettings.js.map