/** @packageDocumentation
 * @module Polyface
 */
/**
 * Represent an [[IndexedPolyface]] edge as:
 * * vertex start index and vertex end index (CCW order around its facet)
 * * an additional number to associate with the edge (e.g., facet index)
 * @public
 */
export declare class SortableEdge {
    private _v;
    private _a;
    /** Constructor. */
    constructor(startVertex: number, endVertex: number, facetIndex: number);
    /** Clone the edge. */
    clone(): SortableEdge;
    /** Return the vertex index that appears first in the order stored.  */
    get startVertex(): number;
    /** Return the vertex index that appears second in the order stored.  */
    get endVertex(): number;
    /**
     * Return the facet index.
     * * This value is carried along during matching. Typically it is a facet index, but it does not have to be.
     */
    get facetIndex(): number;
    /** return true if `startVertex` is less than `endVertex`. */
    get isLowHigh(): boolean;
    /** Return the vertex index with lower numeric value. */
    get lowVertex(): number;
    /** Return the vertex index with higher numeric value. */
    get highVertex(): number;
    /** Return true if edgeA and edgeB traverse the same edge in the same direction. */
    private static areSameEdge;
    /** Return true if edgeA and edgeB traverse the same edge in opposite directions. */
    static areDirectedPartners(edgeA: SortableEdge, edgeB: SortableEdge): boolean;
    /** Return true if edgeA and edgeB traverse the same edge in the same or opposite directions. */
    static areUndirectedPartners(edgeA: SortableEdge, edgeB: SortableEdge): boolean;
    /**
     * Return numeric identifier for the relationship between edgeA and edgeB:
     * * 1 if they share start and end vertex indices in the same order.
     * * -1 if they share start and end vertex indices in reversed order.
     * * 0 otherwise.
     */
    static relativeOrientation(edgeA: SortableEdge, edgeB: SortableEdge): number;
    /** Whether the start and end vertex indices are equal. */
    get isNullEdge(): boolean;
    /**
     * Lexical comparison of two edges.
     * * If the edges have the same vertex index pair (in same or opposite order) they will end up adjacent in a sort.
     * @param edgeA first edge
     * @param edgeB second edge
     */
    static lessThan(edgeA: SortableEdge, edgeB: SortableEdge): number;
    /** Return the edge data as a JSON array. */
    toJSON(): any;
    /** Return the edge cluster in JSON format.  */
    static clusterToJSON(data: SortableEdgeCluster): any;
    /** Return the edge cluster array in JSON format. */
    static clusterArrayToJSON(data: SortableEdgeCluster[]): any[];
}
/**
 * Union type for a single [[SortableEdge]] or a (matched) array of them.
 * @public
 */
export type SortableEdgeCluster = SortableEdge | SortableEdge[];
/**
 * An IndexedEdgeMatcher carries an array of edge start and end indices for sorting and subsequent analyses,
 * such as testing for closed mesh.
 * @public
 */
export declare class IndexedEdgeMatcher {
    /** The array of edges to be sorted. */
    edges: SortableEdge[];
    /** Constructor. Call [[addEdge]] or [[addPath]] to populate `edges`. */
    constructor();
    /**
     * Push a new edge.
     * @param vertexA start vertex
     * @param vertexB end vertex
     * @param facetIndex value to carry along during matching
     * @returns the edge pushed onto the `edges` array
     */
    addEdge(vertexA: number, vertexB: number, facetIndex: number): SortableEdge;
    /**
     * Push edges along a path.
     * * Typically used to add edges around a facet.
     * @param vertexIndices array of vertex indices along an open or closed path.
     * @param facetIndex value to set on each edge pushed.
     * @param closeLoop true to add an edge from last to first vertex.
     */
    addPath(vertexIndices: number[], facetIndex: number, closeLoop: boolean): void;
    /** Sort the edges. */
    sort(): void;
    /** Create a single or compound SortableEdgeCluster in dest. */
    private collectSortableEdgeCluster;
    /**
     * Sort the edges, and collect up to four categories of edges: manifold pairs, singletons, null edges,
     * and everything else.
     * * Caller should allocate arrays of interest.
     * * Any combination of the arrays may be `undefined`, indicating that category is to be ignored.
     * * Any combination of the arrays may be aliased as the same target, in which case the aliased categories are
     * merged into the target.
     * * For instance, to ignore manifold pairs and collect all other edges in a single array:
     * `const foo = []; matcher.sortAndCollectClusters(undefined, foo, foo, foo);`
     * @param manifoldPairs array to receive pairs of properly mated edges, i.e. mesh interior edges.
     * @param singletons array to receive edges that have no partner, i.e., mesh boundary edges.
     * @param nullEdges array to receive arrays of matched null edges, for which start === end vertex index.
     * @param allOtherClusters array to receive arrays of edges that are partners in an undirected, non-manifold sense.
     */
    sortAndCollectClusters(manifoldPairs?: SortableEdgeCluster[], singletons?: SortableEdgeCluster[], nullEdges?: SortableEdgeCluster[], allOtherClusters?: SortableEdgeCluster[]): void;
}
//# sourceMappingURL=IndexedEdgeMatcher.d.ts.map