/*
 *
 *  * Project to resolve 2D cutting stock problem for Discreet Optimizations course at Polytech Lyon
 *  * Copyright (C) 2015.  CARON Antoine and CHAUSSENDE Adrien
 *  *
 *  * This program is free software: you can redistribute it and/or modify
 *  * it under the terms of the GNU Affero General Public License as
 *  * published by the Free Software Foundation, either version 3 of the
 *  * License, or (at your option) any later version.
 *  *
 *  * This program is distributed in the hope that it will be useful,
 *  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  * GNU Affero General Public License for more details.
 *  *
 *  * You should have received a copy of the GNU Affero General Public License
 *  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

package com.polytech4A.cuttingstock.core.model;

/**
 * Created by Antoine CARON on 12/03/2015.
 *
 * @author Antoine CARON
 * @version 1.0
 *          <p/>
 *          Representation of a classic mathematical 2D vector for Position of Size.
 */
public class Vector {

    /**
     * Horizontal value.
     */
    private double x;

    /**
     * Vertical value.
     */
    private double y;

    /**
     * Create a instance of a 2D vector.
     *
     * @param x horizontal value.
     * @param y vertical value.
     */
    public Vector(double x, double y) {
        this.x = x;
        this.y = y;
    }

    public double getX() {
        return x;
    }

    public void setX(double x) {
        this.x = x;
    }

    public double getY() {
        return y;
    }

    public void setY(double y) {
        this.y = y;
    }

    public void set(double x, double y) {
        this.x = x;
        this.y = y;
    }

    public double getArea() {
        return x * y;
    }
}

@@ -1034,17 +1034,16 @@
       %3Cp
-/
 %3E%0A *    
@@ -1812,54 +1812,571 @@
     
-public double getArea() %7B%0A        return x * y
+/**%0A     * Compute rectangular area given by the horizontal and vertical values.%0A     *%0A     * @return Rectangular area%0A     */%0A    public double getArea() %7B%0A        return x * y;%0A    %7D%0A%0A    /**%0A     * Compare horizontal and vertical values between current object and an other vector.%0A     *%0A     * @param v Vector to compare size.%0A     * @return True if horizontal and vertical values are smaller or equals to horizontal and vertical values of Vector v.%0A     */%0A    public boolean isSmallerThan(Vector v) %7B%0A        return getX() %3C= v.getX() && getY() %3C= v.getY()
 ;%0A  

Complete Javadoc of Vector.