<commit_before><commit_msg>Created node type for ET and AET data structures<commit_after>package org.CG.datastructure;

import org.CG.util.Rational;

/**
 * Node for the Edge Table and Alive Edge Table data structures.
 *
 * @author Diorge-Mephy
 */
public class EdgeNode {

    private final int maximumY;

    private Rational currentX;

    private final Rational delta;

    /**
     * Instantiates a new node.
     *
     * @param maximumY the maximum y-coordinate of the edge.
     * @param xCoordinateOfMinimumY the x-coordinate of the point with the
     * minimum y-coordinate of the edge.
     * @param delta the width of the edge divided by its height.
     */
    public EdgeNode(int maximumY, Rational xCoordinateOfMinimumY, Rational delta) {
        this.maximumY = maximumY;
        this.currentX = xCoordinateOfMinimumY;
        this.delta = delta;
    }

    /**
     * Gets the maximum y-coordinate of the edge.
     *
     * @return the maximum y-coordinate.
     */
    public int getMaximumY() {
        return maximumY;
    }

    /**
     * Gets the current x-coordinate of the scan line.
     *
     * @return
     */
    public Rational getCurrentX() {
        return currentX;
    }

    /**
     * Gets the delta of the edge.
     *
     * @return the delta of the edge.
     */
    public Rational getDelta() {
        return delta;
    }

    /**
     * Moves the current x-coordinate to the next scan line.
     */
    public void goToNextScanLine() {
        this.currentX = this.currentX.add(this.getDelta());
    }

}
{'fraction_non_alphanumeric': 0.08838709677419355, 'fraction_numerical': 0.0, 'mean_word_length': 2.17827868852459, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7376727', 'n_tokens_mistral': 473, 'n_tokens_neox': 450, 'n_words': 150}