import { Nullable } from 'vitest';

export declare class AdjacencyList {
}

export declare class ArrowGraph {
    /**
     * Returns a JSON-graph from the given arrow-formatted graph.
     * @param input
     * @returns {{nodes: *[], edges: *[]}}
     */
    static parse(input: any): {
        nodes: never[];
        edges: never[];
        typeName: string;
    };
}

export declare class Constants {
    static GenericLinkTypeName: string;
}

export declare class Forest {
    #private;
    /**
     * Instantiates a new forest.
     * @param items {Tree|Tree[]} One or more trees.
     */
    constructor(items?: null);
    /**
     * Returns the trees in this forest.
     * @returns {Tree[]}
     */
    get trees(): never[];
    /**
     * Returns the roots of this forest.
     * @returns {TreeNode[]}
     */
    get roots(): any[];
    hasTree(tree: any): boolean;
    /**
     * Returns a forest with this single tree in it.
     * @return {Forest}
     */
    static fromTree(tree: any): Forest;
    /**
     * Returns all the nodes in this forest.
     * That is, all the nodes in all the trees of all levels.
     * @return {TreeNode[]}
     */
    get nodes(): never[];
    /**
     * Creates a forest from the given roots.
     * @param roots {TreeNode<any>[]}
     * @return {Forest}
     */
    static fromRoots(roots?: any): Forest;
    hasNode(node: any): boolean;
    find(predicate: any): any;
    findByValue(value: any): any;
    /**
     * Fetches the leaf nodes of this forest.
     */
    getLeafNodes(): never[];
    appendTree(tree: any): void;
    dft(visitor: any): void;
    toJSON(): {
        typeName: string;
        trees: any[];
    };
    get typeName(): string;
    /**
     * Deserializes the given forest.
     * @param json {*} A serialized forest.
     * @returns {Forest|null}
     */
    static fromJSON(json: any): Forest | null;
}

/**
 * Lightweight (directed, multi, labelled) graph structure with some graph analytic methods.
 * - A node is something with an id.
 * - An edge is something with a sourceId and a targetId.
 * - The API can be used on its own, the only Qwiery twist is the usage of 'typeName' in some place in order to handle serialization and compatibility with the GraphMiner EntitySpace.
 */
export declare class Graph {
    #private;
    /**
     * Optional name of this graph.
     * @type string|null
     */
    name: null;
    /**
     * Optional description of this graph.
     * @type null|string
     */
    description: null;
    /**
     * The unique id of this graph.
     * @type string
     */
    id: any;
    /**
     * Instantiates a new Graph.
     * @param data {any} The given data is simply assigned to the instance, no checks performed.
     */
    constructor(data?: any);
    /**
     * Equivalent to instantiating a new Graph.
     * @return {Graph}
     */
    static empty(): Graph;
    /**
     * Returns 'Graph' as type name for this instance.
     */
    get typeName(): string;
    /**
     * Returns a copy of the edges in this graph.
     * The clone means that the node data cannot be altered by accessing them in this way.
     * This ensures integrity since otherwise e.g. sourceId of the edges could be changed and break the graph.
     * @return {IEdgeBase[]}
     */
    get edges(): any;
    /**
     * Returns a copy of the nodes in this graph.
     * The clone means that the node data cannot be altered by accessing them in this way.
     * This ensures integrity since otherwise e.g. id of the node could be changed and break the graph.
     * @return {INodeBase[]}
     */
    get nodes(): any;
    get nodeCount(): number;
    get edgeCount(): number;
    /**
     * This graph is empty if it contains neither nodes nor edges.
     * @return {boolean}
     */
    get isEmpty(): boolean;
    /**
     * Returns a graph from the given JSON-graph.
     * @param json
     * @returns {Graph}
     */
    static fromJSON(json: any): Graph;
    /**
     * Returns a graph from the given {@link JsonGraph} format.
     * @param json {JsonGraph} A graph in JSON format.
     */
    static fromJsonGraph(json: any): Graph;
    /**
     * Creates a graph from pseudo-cypher.
     * @param pseudoCypher {string} Some pseudo-cypher graph definition.
     * @param entityCreator {Function|null} Optional function returning an entity for the given PseudoCypherNode. Falls back to {@link Graph.defaultEntityCreator} which relies on {@link GraphModels} for creating entities.
     * @param edgeCreator {Function|null} Optional function returning an edge entity for the given PseudoCypherEdge. Falls back to {@link Graph.defaultLinkCreator} which relies on {@link GraphModels} for creating entities.
     */
    static fromPseudoCypher(pseudoCypher: any, entityCreator?: null, edgeCreator?: null): Graph;
    /**
     * Creates a graph from the given edge array.
     *
     * @example
     *
     * Graph.fromEdgeArray([[1,2],[2,3])
     * Graph.fromEdgeArray(["1->2",[2,3])
     * Graph.fromEdgeArray(["1->2",["2","3"]])
     *
     * @param edges
     * @returns {Graph|null}
     */
    static fromEdgeArray(edges: any): Graph | null;
    /**
     * @see https://en.wikipedia.org/wiki/Trivial_Graph_Format
     * @param data
     */
    static fromTrivial(data: any): void;
    /**
     * Creates diverse random and predefined graphs.
     * @param name {string} The name of the graph or generator.
     * @param options {*} Options specific for the type specified.
     * @returns {Graph}
     */
    static create(name?: null, options?: null): Graph;
    /**
     * @see https://en.wikipedia.org/wiki/Graph_Modelling_Language
     * @param data
     */
    static fromGml(data: any): void;
    /**
     * Imports a graph from an arrow definition.
     *
     * @example
     *
     * Graph.fromArrows("a->b->c")
     * Graph.fromArrows(`
     * a->e
     * e->e
     * `)
     * Graph.fromArrows(["a->b->c","c->b"])
     * @param input {string|string[]}
     * @see ArrowGraph
     */
    static fromArrows(input: any): Graph;
    /**
     * Imports the Matrix Market format.
     * @see https://networkrepository.com/mtx-matrix-market-format.html
     * @param data {string|string[]}
     */
    static fromMtx(data: any): Graph;
    /**
     * An alias for {@link PseudoCypher.parsePseudoCypherLine}.
     * @param pseudoCypher
     * @param entityCreator
     * @param defaultEdgeCreator
     * @return {Graph}
     */
    static parse(pseudoCypher: any, entityCreator?: null, defaultEdgeCreator?: null): Graph;
    /**
     * Merges the given graph into this one.
     * @param g
     * @return {this<INodeBase, GroupBase, EdgeBase>}
         */
     mergeGraph(g: any): this;
     /**
      * Merges the given graphs.
      * @param g1 {Graph} A graph.
      * @param g2 {Graph} Another graph.
      * @returns {Graph|null}
      */
     static mergeGraphs(g1: any, g2: any): Graph | null;
     /**
      * Returns the flow starting at the specified node id.
      * A flow is a full-length path to a leaf node.
      * @param start {string|INodeBase} A node or node id part of this graph.
      * @return The collection of paths.
      */
     getFlows(start: any): never[];
     clear(): void;
     toJSON(): {
         id: any;
         name: null;
         description: null;
         nodes: never[];
         edges: never[];
         typeName: string;
     };
     clone(): Graph;
     getEdgesBetween(id1: any, id2: any, anyDirection?: boolean): never[];
     getDownstreamEdges(id: any): never[];
     getUpstreamEdges(id: any): never[];
     getNeighborhoodEdges(id: any): never[];
     /**
      * Returns the edges and nodes from the neighborhood of the specified node as a (sub)graph.
      * @param id
      */
     getNeighborhood(id: any): Graph;
     /**
      * Returns the first edge between the given endpoints.
      * @param sourceId {string} The source id.
      * @param targetId {string} The target id.
      * @returns {*|null}
      */
     getEdge(sourceId: any, targetId: any): null;
     /**
      * Returns whether the item with the specified id is part of this graph.
      * @param id {string} The id of the node.
      * @return {boolean}
      */
     idExists(id: any): boolean;
     /**
      * Fetches the item in the graph with the specified id.
      * @param id {string} An identifier.
      * @return {any}
      */
     getById(id: any): null;
     /**
      * Returns whether there is at least one edge (in any direction) between the specified node id's.
      * @param id1 {string} A node id.
      * @param id2 {string} A node id.
      * @return {boolean}
      */
     areConnected(id1: any, id2: any): boolean;
     /**
      * Gets edges or nodes via their type name.
      * @param typeName
      * @return {any[]}
      */
     getByTypeName(typeName: any): never[];
     getNodesByTypeName(typeName: any): never[];
     getNodeById(id: any): null;
     /**
      * Case-insensitive match of the name
      * @param name
      * @returns {*}
      */
     getNodeByName(name: any): null;
     /**
      * An extension of {@link getNodeByName} for a string of names.
      * @param names {string[]} Node names.
      * @return {INodeBase[]}
      */
     getNodesByName(names: any): any;
     findNode(predicate: any): any;
     filterNodes(predicate: any): never[];
     filterEdges(predicate: any): never[];
     getEdgeById(id: any): undefined;
     /**
      * Returns the edge with the specified node id as source.
      * @param id {string} An id.
      * @return {IEdgeBase[]}
      */
     getOutgoingEdges(id: any): never[];
     /**
      * Returns the edge with the specified node id as target.
      * @param id {string} An id.
      * @return {IEdgeBase[]}
      */
     getIncomingEdges(id: any): never[];
     /**
      * Returns all the edges attached to the node with the specified id.
      * @param id {string} A node id.
      * @returns {*[]}
      */
     getEdges(id: any): never[];
     getNeighbors(id: any): never[];
     /**
      * Returns the nodes with an edge towards the specified id.
      * @param id
      * @return {any[]}
      */
     getParents(id: any): never[];
     getChildren(id: any): never[];
     getParent(id: any): null;
     getParentHierarchy(id: any): never[];
     toForest(): Forest;
     /**
      * Adds the given tree to this graph.
      * @param tree {Tree} A tree.
      */
     addTree(tree: any): void;
     /**
      * Adds a node to the graph.
      * @param nodeSpec {any} A INodeBase instance or some data which can be converted to it.
      */
     addNode(...nodeSpec: any[]): any;
     addNodes(items: any): any;
     /**
      * Adds an edge to the graph.
      *
      * @example
      *
      * addEdge("1->2")
      * addEdge(1,2)
      * addEdge("a", "b")
      * addEdge([1,2])
      *
      * @param edgeSpec {*} An edge specification.
      * @return {any}
      */
     addEdge(...edgeSpec: any[]): any;
     addEdges(...edges: any[]): any;
     nodeIdExists(id: any): boolean;
     get hasLoops(): boolean;
     edgeExists(...edgeSpec: any[]): boolean;
     /**
      * Removes a node from the graph.
      * @param dataOrNode
      * @return {any}
      */
     removeNode(dataOrNode: any): any;
     /**
      * Removes the given edge.
      * @param opt {any} Can be an id of an edge or an object with sourceId and targetId.
      * @return {any}
      */
     removeEdge(opt: any): null | undefined;
     /**
      * Depth-first traversal starting at the specified node.
      * @param visitor {(n: INodeBase, level: number,path:INodeBase[], hasChildren:boolean)=> void} A visiting function.
      * @param startNode {INodeBase} The node to start the traversal from.
      */
     dft(visitor: any, startNode: any): void;
     bft(visitor: any, startNode: any): void;
     /**
      * This will return the shortest cycle, if any.
      * @returns {string[]|null}
      */
     getCycle(): any[] | null;
     get hasCycles(): boolean;
     get isAcyclic(): boolean;
     /**
      * Returns the adjacency list of this graph.
      * @returns {{}}
      */
     toAdjacencyList(): {};
     /**
      * Returns a dictionary with for each node id its degree.
      * @returns {{}}
      */
     getDegrees(): {};
     /**
      * Returns the degree of the specified node in the graph.
      * @param n {string|*} A node id or node.
      * @returns {number}
      */
     getDegree(n: any): any;
     /**
      * Returns the maximum degree in this graph.
      * @returns {number}
      */
     get maxDegree(): any;
     /**
      * Returns the minimum degree in this graph.
      * @returns {number}
      */
     get minDegree(): any;
     /**
      * Returns an array representing the histogram of degrees.
      * @param bins {number} The amount of bins in the histogram.
      * @returns {[*]|any[]}
      * istanbul ignore next
      */
     degreeHistogram(bins?: number): any[];
     /**
      * Returns the component of the given id in the shape of node ids.
      * If the id is not in the graph an empty array is returned.
      * @param id {string} A node id.
      * @returns {*[]}
      */
     getComponentOf(id: any): never[];
     /**
      * Returns the weakly connected components of this graph.
      * @returns {*[]} An array of arrays, each representing the id's of a component.
      */
     getComponents(): never[];
     /**
      * Random subgraph with the specified amount of nodes.
      * @param nodeCount {number} The amount of the nodes taken from the current graph.
      */
     sample(nodeCount?: number): Graph;
     /**
      * This will change all the id's to unique identifiers and thus ensure uniqueness if used elsewhere.
      * @param indexFunction {Function|null} The function to assign new id's. If not given UUID's will be assigned.
      * @returns {*} The dictionary of the mapping from old to new id's.
      */
     reIndex(indexFunction?: null): {};
    }

    export declare class GraphUtils {
        /**
         * Handles different cases and returns a plain object accordingly.
         * Note that this does NOT return a {@link TreeNode}, only the necessary elements to create a node-like object.
         *
         * If a plain object is given this will only ensure that there is an id and a typeName, all the other attributes will be kept.
         * @param nodeSpecs {*} Various cases.
         * @returns {{name: string, typeName: string, id: string}|{typeName: string, id: string}|{name: null, typeName: string, id: string}|*}
         */
        static getNodeFromSpecs(...nodeSpecs: any[]): any;
        /**
         * Tries to turn the given input into something that can be interpreted as an edge definition.

         *
         * @example
         * // using the helper function
         * const getEdge = (...e) => {
         *            const found = GraphUtils.getEdgeFromSpecs(...e);
         *            return [found.sourceId, found.targetId];
         *        };
         * // all of the following will return ["1","2"]
         * getEdge(1,2);
         * getEdge("1->2");
         * getEdge({sourceId: 1, sourceId:2});
         *
         * @param edgeSpecs {*} An edge specification.
         */
        static getEdgeFromSpecs(...edgeSpecs: any[]): any;
        /**
         * Generic equality test for graphs, nodes and edges.
         * Will also work with number, boolean and string.
         * @param a {string|number|boolean|*} A string, number, boolean, node, edge or graph.
         * @param b {string|number|boolean|*} A string, number, boolean, node, edge or graph.
         * @returns {boolean}
         */
        static areEqual(a: any, b: any): boolean;
        /**
         *
         * @param edgeSpecs
         * @param throwError
         * @param returnArray
         * @returns {string[]|{sourceId: string, targetId: string}|null|*[]|{sourceId: string, targetId: string}}
         */
        static getEdgeFromSpecsOneArgument(edgeSpecs: any, throwError?: boolean, returnArray?: boolean): any;
    }

    /**
     * The minimum requirements for an edge.
     * @interface
     */
    export declare class IEdgeBase extends IId {
        sourceId: any;
        targetId: any;
        toJSON(): void;
    }

    /**
     * @interface
     */
    export declare class IId {
        id: any;
    }

    /**
     * The minimum requirements for a node.
     * @interface
     */
    export declare class INodeBase extends IId {
        /**
         * The (not necessarily unique) name of the node.
         * @type {string|null}
         */
        name: null;
        /**
         * The node type.
         * This attribute is mostly there for compatibility with the Qwiery Semantic framework.
         * @type {string}
         */
        typeName: string;
        toJSON(): void;
    }

    export declare class JsonGraph {
        /**
         * Returns an empty JSON-graph.
         * @returns {{nodes: *[], edges: *[]}}
         */
        static empty(): {
            nodes: never[];
            edges: never[];
            typeName: string;
        };
        /**
         * Returns whether the given object has the JSON-graph structure.
         * @param g
         * @returns {boolean}
         */
        static isJsonGraph(g: any): any;
        /**
         * Returns the graph `g` merged with `h`, both represented as JSON graphs (nodes and edges collections).
         *
         * Note that a clone is returned of the respective elements.
         * @param g {*} A JSON graph.
         * @param h {*} A JSON graph.
         */
        static mergeJsonGraphs(g: any, h: any): any;
        static edgeExists(g: any, edge: any): boolean;
        static getNodeById(g: any, id: any): any;
        static getEdgeById(g: any, id: any): any;
        static addNode(g: any, node: any, check?: boolean): any;
        static getEdge(g: any, sourceId: any, targetId: any, name?: null): any;
        /**
         * An edge is a plain object with a sourceId and a targetId.
         * @param something {*} Anything.
         * @returns {boolean}
         */
        static isEdge(something: any): any;
        /**
         * A node is a plain object with at least an id.
         * @param something {*} Anything.
         * @returns {boolean}
         */
        static isNode(something: any): any;
        /**
         * Ensures that the endpoints of the given edge exist in the graph.
         * @param g
         * @param edge
         */
        static ensureNodesArePresent(g: any, edge: any): void;
        static nodeIdExists(g: any, id: any): boolean;
        static addEdge(g: any, edge: any, check?: boolean): any;
    }

    export declare class MatrixMarket {
        static parse(data: any): any;
    }

    export declare class NamedGraph {
        /**
         * Returns the complete graph (K_n) of the specified size.
         * @param [size=10] {number} The size of the graph
         * @returns {Graph}
         */
        static complete(size?: number): Graph;
        /**
         * Returns a path graph.
         * @param [size=10] The size of the path.
         * @returns {Graph}
         */
        static path(size?: number): Graph;
        /**
         * Zachary's karate club is a social network of a university karate club, described in the paper
         * *"An Information Flow Model for Conflict and Fission in Small Groups"* by Wayne W. Zachary.
         * @see https://en.wikipedia.org/wiki/Zachary%27s_karate_club
         */
        static karateClub(): Graph;
        /**
         * The Davis Southern Women network from
         * "A. Davis, Gardner, B. B., Gardner, M. R., 1941. Deep South. University of Chicago Press, Chicago, IL."
         * See https://press.uchicago.edu/ucp/books/book/chicago/D/bo177425440.html
         * @returns {Graph}
         * @constructor
         */
        static DavisSouthernWomen(): Graph;
        /**
         * Creates a graph consisting of only nodes.
         * @param size {number} The amount of nodes to create.
         * @returns {Graph}
         */
        static singletons(size: any): Graph;
        static createGraphFrom(nodes: any, edges: any): Graph;
    }

    export declare class PseudoCypher {
        /**
         * Returns a single node, if any, from the given pseudo-cypher representation.
         * @param input {string}
         */
        static parseNode(input: any): any;
        /**
         * Returns a dictionary with names and id's of parameters.
         * @param input {string} Lines of pseudo-cypher.
         * @return {{}}
         */
        static createEntityDictionary(input: any, entityCreator?: null): {};
        /**
         * Returns a single edge, if any, from the given pseudo-cypher representation.
         * @param input {string}
         */
        static parseEdge(input: any): {
            id: string;
            sourceId: any;
            targetId: any;
        } | null;
        /**
         * Converts the node or edge (plain objects) into pseudo-cypher.
         * @param entity
         * @returns {null}
         */
        static entityToCypher(entity: any): void;
        /**
         * The regex to detect a triple in pseudo-cypher.
         * Things like this will be picked up
         * - (a)-->(b)
         * - (a:Person)-->(d)
         * - (a:Thing{x:34})-->(c)
         * The content of the nodes is handled separately by {@link PseudoCypherNode.parse}.
         * @return {RegExp}
         */
        static get regNoEdge(): RegExp;
        /**
         * The regex to detect a triple in pseudo-cypher.
         * Things like this will be picked up
         * - (a)-[v]->(b)
         * - (a:Person)-[:AB]->(d)
         * - (a:Thing{x:34})-[k:F{x:5}]->(c)
         * The content of the node is handled separately by {@link PseudoCypherNode.parse}.
         * The content of the edge is handled separately by {@link PseudoCypherEdge.parse}.
         * @return {RegExp}
         */
        static get regWithEdge(): RegExp;
        /**
         *
         * @returns {*}
         * @param typeName
         */
        static defaultEntityCreator(typeName?: string): (u: any) => any;
        /**
         *
         * @param [u] {PseudoCypherEdge}
         * @returns {*}
         */
        static defaultLinkCreator(u?: null): {
            id: any;
            name: any;
            description: any;
            typeName: any;
            sourceId: any;
            targetId: any;
        };
        /**
         * Returns a JSON-graph from the given pseudo-cypher.
         * @param input {string}
         * @param entityCreator
         * @param edgeCreator
         * @returns {{nodes: *[], edges: *[]}|null}
         */
        static parse(input: any, entityCreator?: null, edgeCreator?: null): {
            nodes: never[];
            edges: never[];
            typeName: string;
        } | null;
        static getLines(input: any): any;
        /**
         * Parses a single line of pseudo-cypher to a graph.
         * @param line
         * @param entityCreator {Function|string}
         * @param edgeCreator {Function|string}
         * @param paramDic {{}} A dictionary with param-name to entity in order to make sure that a param name always points to the same entity across the pseudo-cypher specs.
         * @return {*} A JSON-graph.
         */
        static parsePseudoCypherLine(line: any, entityCreator?: null, edgeCreator?: null, paramDic?: {}): {
            nodes: never[];
            edges: never[];
            typeName: string;
        } | null;
    }

    export declare class PseudoCypherEdge {
        name: null;
        typeName: null;
        data: null;
        constructor(name?: null, typeName?: null, data?: null);
        /**
         * Regex for singletons, things like (n:Thing{x:4}).
         * @return {RegExp}
         */
        static get regex(): RegExp;
        get [Symbol.toStringTag](): null;
        /**
         * Parses the given input an tries to turn it into a PseudoCypherEdge.
         * @param stuff {string|any} Something which can be interpreted as a PseudoCypherEdge.
         * @return {PseudoCypherEdge|null}
         */
        static parse(stuff: any): PseudoCypherEdge | null;
        /**
         * Returns pseudo-cypher for the given entity.
         * @param entity {any} An entity.
         * @see TripleNode.entityToCypher
         * @return {string}
         */
        static entityToCypher(entity: any): string;
        toEntity(): {};
        toCypher(): string;
    }

    export declare class PseudoCypherNode {
        name: Nullable<string>;
        typeName: Nullable<string>;
        data: any;
        constructor(name?: Nullable<string>, typeName?: Nullable<string>, data?: any);
        /**
         * Returns the regular expression to parse a pseudo-cypher node.
         * @returns {RegExp}
         */
        static get regex(): RegExp;
        static get regexMultiple(): RegExp;
        /**
         * For debugging purposes.
         * @returns {string|null}
         */
        get [Symbol.toStringTag](): Nullable<string>;
        /**
         * Parses the given input and tries to turn it into a PseudoCypherNode.
         * @param stuff {string|any} Something which can be interpreted as a PseudoCypherNode.
         * @return {PseudoCypherNode|null}
         */
        static parse(stuff: any): any;
        /**
         * Returns pseudo-cypher for the given entity.
         * @param entity {any} An entity.
         * @param variableName? {string} Optional name for the variable v in '(v:type{...})'. If not set the name of the entity is used and if the entity has no name a random name will be assigned.
         * @return {string}
         */
        static entityToCypher(entity: any, variableName?: null): string;
        /**
         * Returns the pseudo-node in plain object format.
         * @returns {*}
         */
        toEntity(): any;
        /**
         * Returns the pseudo-node as pseudo-cypher.
         * @returns {string}
         */
        toCypher(): string;
    }

    export declare class PseudoCypherTriple {
        edge: any;
        /**
         * @type PseudoCypherNode
         */
        source: any;
        /**
         * @type PseudoCypherNode
         */
        target: any;
        get typeName(): string;
        constructor(...args: any[]);
        static get regNoEdge(): RegExp;
        static get regWithEdge(): RegExp;
        get isSingleton(): any;
        get hasEdge(): boolean;
        get [Symbol.toStringTag](): string;
        get [Symbol.toStringTag](): string;
        /**
         * Turns the given edge-entity into Cypher.
         * The entity needs at least a `sourceId` and `targetId` to be considered as an edge.
         * @param entity {*|IEdgeBase} An edge entity.
         * @param sourceName
         * @param targetName
         * @param edgeName
         * @returns {null|string}
         */
        static entityToCypher(entity: any, sourceName?: string, targetName?: string, edgeName?: string): any;
        /**
         * Turns JSON-like values in a correct cypher-like format.
         * @param v {any} Anything.
         * @return {string}
         */
        static toCypherDataValue(v: any): string;
        /**
         * Turns a JSON-like blob into a cypher-like blob.
         * The two differ in the key's quotes.
         * @param data {any} A data blob.
         * @return {string}
         */
        static toCypherData(data: any): string;
        /**
         * Attempts to turn the pseudo-cypher of a single triple.
         * @param tripleString
         */
        static parse(tripleString: any): any;
        toCypher(): any;
    }

    export declare class RandomGraph {
        /**
         * Defines the way the algorithms create a node for a given index.
         * @param i {number} The index of the node.
         * @returns {{ id: string}}
         */
        static nodeCreator: (i: any) => {
            id: any;
        };
        /**
         * Defines the way the algorithms create an edge for a given edge.
         * @param i {number} Source index.
         * @param j {number} Target index.
         * @returns {{sourceId: string, targetId: string}}
         */
        static edgeCreator: (i: any, j: any) => {
            sourceId: any;
            targetId: any;
        };
        /**
         * Simple balanced tree
         *
         * @memberof RandomGraph
         * @param {number} childrenCount number of children each node has
         * @param {number} height height of the tree
         */
        static BalancedTree(childrenCount?: number, height?: number): Graph;
        /**
         * The Erdős–Rényi-Gilbert graph generator. The structure is defined by the fixed probability of having an edge between two nodes.
         * @see https://en.wikipedia.org/wiki/Erdős–Rényi_model
         * @memberof RandomGraph.ErdosRenyi
         * @param nodeCount {number} The number of nodes
         * @param probability {number}  The probability of an edge between two nodes.
         */
        static ErdosRenyiGilbert(nodeCount?: number, probability?: number): Graph;
        /**
         * The Erdős–Rényi graph generator. The structure is defined by the fixed amount of edges.
         *
         * @see https://en.wikipedia.org/wiki/Erdős–Rényi_model * @memberof RandomGraph.ErdosRenyi
         * @param {number} nodeCount number of nodes
         * @param {number} edgeCount number of edges
         */
        static ErdosRenyi(nodeCount?: number, edgeCount?: number): Graph;
        /**
         * Generates the 'Watts-Strogatz Small World Alpha' model.
         *
         * @see https://en.wikipedia.org/wiki/Watts–Strogatz_model
         * @param n {number}  number of nodes
         * @param k {number}  mean degree (even integer)
         * @param {number} alpha rewiring probability [0..1]
         */
        static WattsStrogatzAlpha(n?: number, k?: number, alpha?: number): Graph;
        /**
         * Generates the 'Watts-Strogatz Small World Beta' model.
         * @see https://en.wikipedia.org/wiki/Watts–Strogatz_model
         * @memberof RandomGraph.WattsStrogatz
         * @param n {number}  number of nodes
         * @param K {number}  mean degree (even integer)
         * @param {number} beta rewiring probability [0..1]
         */
        static WattsStrogatzBeta(n?: number, K?: number, beta?: number): Graph;
        /**
         * The Barabási–Albert model generates a scale-free network.
         * @see https://en.wikipedia.org/wiki/Barabási–Albert_model
         * @memberof RandomGraph
         * @param N {number}  total number of nodes  N  > 0
         * @param m0 {number}  m0 > 0 && m0 <  N
         * @param M {number}  M  > 0 && M  <= m0
         */
        static BarabasiAlbert(N?: number, m0?: number, M?: number): Graph;
        /**
         * Creates diverse random and predefined graphs.
         * @param name {string} The name of the graph or generator.
         * @param options {*} Options specific for the type specified.
         * @returns {Graph}
         */
        static create(name?: null, options?: null): Graph;
    }

    export declare class Tree {
        /**
         * Instantiates a new tree.
         * Pass optionally the root.
         * @param root {any} Either a TreeNode or the payload of the root.
         */
        constructor(root?: null);
        get root(): any;
        /**
         * Sets the root of this tree.
         * This will replace existing nodes in this tree.
         * @param v
         */
        set root(v: any);
        get isEmpty(): any;
        /**
         * Returns all the nodes in this tree.
         * @return {any[]}
         */
        get nodes(): never[];
        get nodeCount(): number;
        get size(): number;
        /**
         * Returns whether the given node is part of this tree.
         * @param item {*|TreeNode} A payload or a node.
         * @return {boolean}
         */
        hasNode(item: any): boolean;
        /**
         * Fetches the leaf nodes of this tree.
         */
        getLeafNodes(): never[];
        /**
         * Finds the node with the specified id.
         * @param value {*} Some payload
         * @return {TreeNode}
         */
        findByValue(value: any): any;
        /**
         * Finds the node using the given predicate.
         * The search is performed using a DFT.
         * @param predicate
         * @param startNode {TreeNode}
         * @return {TreeNode}
         */
        find(predicate: any, startNode?: null): any;
        /**
         * Appends the given child to this tree under the given parent.
         * If no parent is specified this will either set the root or raise an error if there already is a root present.
         * @param value {any|TreeNode} Either a value or a TreeNode.
         * @param parent {string|TreeNode} The parent id getting the new child.
         */
        appendChild(value: any, parent?: Nullable<string | TreeNode>): any;
        dft(visitor: any, startNode?: null): void;
        findTraverse(node: any, predicate: any, level?: number): any;
        dftTraverse(node: any, visitor: any, level?: number): void;
        toForest(): Forest;
        toJSON(): {
            typeName: string;
            root: any;
        };
        static fromJSON(json: any): Tree | null;
    }

    export declare class TreeNode {
        /**
         * The parent node. If null this is the root.
         * @type TreeNode
         */
        parentNode: null;
        /**
         * The payload.
         * @type {*}
         */
        value: null;
        /**
         * The tree this node belongs to.
         * @type Tree
         */
        tree: null;
        /**
         * The children of this node.
         * @type {TreeNode[]}
         */
        children: never[];
        /**
         * The unique id of this node.
         * @type {string}
         */
        id: string;
        /**
         * Instantiates a new TreeNode.
         * @param value {*|null} The payload.
         * @param parentNode {*|TreeNode} The parent of this new node.
         * @param tree
         */
        constructor(value?: null, parentNode?: null, tree?: null);
        /**
         * This node is a root if it has no parent.
         */
        get isRoot(): any;
        /**
         * This node is a leaf if it has no children.
         */
        get isLeaf(): boolean;
        get hasChildren(): boolean;
        /**
         * Appends the node or the new node created from the given data.
         * The appended child is returned.
         * @param child {any|TreeNode} The payload of the new node to add or the tree node.
         * @return {TreeNode<IId> | TreeNode<any>}
         */
        appendChild(child: any): TreeNode;
        /**
         * Removes the child from this node.
         * @param child
         * @return {TreeNode<IId> | TreeNode<D>}
         */
        removeChild(child: any): TreeNode | null | undefined;
        childValueExists(value: any): boolean;
        /**
         * Returns true if the given node or value is among the children of this node.
         * @param node {*|TreeNode} A node or a value.
         * @returns {boolean}
         */
        hasChild(node: any): boolean;
        /**
         * Returns the (first) child with the specified value.
         * @param value {*} Anything
         * @returns {*}
         */
        getChild(value: any): undefined;
        toJSON(): {
            typeName: string;
            value: any;
            children: never[];
            id: string;
        };
        static fromJSON(json: any): TreeNode | null;
    }

    export { }
