<commit_before>/**
 * helper for polygons
 * (jca)
 */

import * as _ from "lodash";
import Graphic = require("esri/graphic");

// Segment is a structure of type [ Vertex (in), Vertex (out) ]
// where Vertex is a structure of [ number (x) , number (y) ]
type Vertex = number[];
type Segment = Vertex[];

type Tuple = number[];

// Detect and remove cut off paths:
// * Enumerates all combination of comparative paths
// * For each, detects segments' intersections and remove them
export function removeCommonSegments(xs: Graphic[]) {
<commit_msg>Add comments<commit_after>/**
 * helper for polygons
 * (jca)
 */

import * as _ from "lodash";
import Graphic = require("esri/graphic");

// Segment is a structure of type [ Vertex (in), Vertex (out) ]
// where Vertex is a structure of [ number (x) , number (y) ]
type Vertex = number[];
type Segment = Vertex[];

type Tuple = number[];

// Detect and remove cut off paths. Mutate the graphics.
// * Enumerates all combination of comparative paths
// * For each, detects segments' intersections and remove them
export function removeCommonSegments(xs: Graphic[]) {

{'fraction_non_alphanumeric': 0.12679856115107913, 'fraction_numerical': 0.0, 'mean_word_length': 4.036199095022624, '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': '3666086', 'n_tokens_mistral': 339, 'n_tokens_neox': 334, 'n_words': 134}