import { Point2d, Vector2d } from "../geometry3d/Point2dVector2d";
import { Point3d, Vector3d } from "../geometry3d/Point3dVector3d";
import { WritableXAndY, XAndY } from "../geometry3d/XYZProps";
import { Point4d } from "../geometry4d/Point4d";
/**
 * static methods for commonly appearing sets of equations in 2 or 3 variables
 * @public
 */
export declare class SmallSystem {
    /**
     * Intersect two transverse 2D lines.
     * * If the lines are parallel and overlap, the returned intersection is of dubious use.
     * @param a0 start point of line A
     * @param aDir direction vector of line A
     * @param b0 start point of line B
     * @param bDir direction vector of line B
     * @returns intersection fractions, `x` along line A and `y` along line B; or `undefined` if no intersection.
     * @see [[lineSegmentXYUVOverlapUnbounded]], [[lineSegmentXYUVIntersectionUnbounded]]
     */
    static lineXYUVTransverseIntersection(a0: XAndY, aDir: XAndY, b0: XAndY, bDir: XAndY): WritableXAndY | undefined;
    /**
     * Return true if lines (a0,a1) to (b0, b1) have a simple intersection.
     * Return the fractional (not xy) coordinates in result.x, result.y.
     * @param a0 start point of line A
     * @param a1 end point of line A
     * @param b0 start point of line B
     * @param b1 end point of line B
     * @param result vector to receive fractional coordinates of intersection: result.x is fraction on line A, result.y is
     * fraction on line B.
     */
    static lineSegment2dXYTransverseIntersectionUnbounded(a0: XAndY, a1: XAndY, b0: XAndY, b1: XAndY, result: Vector2d): boolean;
    /**
     * Return true if the lines have a simple intersection.
     * * Points (ax0,ay0) to (ax0+ux,ay0+uy) are at fractions 0 and 1 of line A.
     * * Points (bx0,by0) to (bx0+vx,by0+vy) are at fractions 0 and 1 of line B.
     * @param result vector to receive fractional coordinates of intersection: result.x is fraction on line A, result.y is
     *  fraction on line B.
     */
    static lineSegmentXYUVTransverseIntersectionUnbounded(ax0: number, ay0: number, ux: number, uy: number, bx0: number, by0: number, vx: number, vy: number, result: Vector2d): boolean;
    /**
     * Return true if lines (a0,a1) to (b0, b1) have a simple intersection using only xy parts.
     * @param a0 start point of line A
     * @param a1 end point of line A
     * @param b0 start point of line B
     * @param b1 end point of line B
     * @param result vector to receive fractional coordinates of intersection: result.x is fraction on line A, result.y is
     * fraction on line B.
     */
    static lineSegment3dXYTransverseIntersectionUnbounded(a0: Point3d, a1: Point3d, b0: Point3d, b1: Point3d, result: Vector2d): boolean;
    /**
     * Intersect two overlapping unbounded 2D lines.
     * @param a0 start point of line A
     * @param aDir direction vector of line A; end point of line segment A is `a0 + aDir`
     * @param b0 start point of line B
     * @param bDir direction vector of line B; end point of line segment B is `b0 + bDir`
     * @param tol overlap distance tolerance
     * @returns `undefined` if the lines have a simple (transverse) intersection, or are parallel without overlap.
     * Otherwise, return the fractions at which each segment overlaps the other line:
     * * segment B maps to fractions in the range f0.x < f1.x on line A.
     * * segment A maps to fractions in the range f0.y < f1.y on line B.
     * @see [[lineXYUVTransverseIntersection]], [[lineSegmentXYUVIntersectionUnbounded]]
     */
    static lineSegmentXYUVOverlapUnbounded(a0: XAndY, aDir: XAndY, b0: XAndY, bDir: XAndY, tol?: number): {
        f0: WritableXAndY;
        f1: WritableXAndY;
    } | undefined;
    /**
     * Intersect two transverse or overlapping unbounded 2D line segments.
     * @param a0 start point of line A
     * @param aDir direction vector of line A; end point of line segment A is `a0 + aDir`
     * @param b0 start point of line B
     * @param bDir direction vector of line B; end point of line segment B is `b0 + bDir`
     * @param tol overlap distance tolerance
     * @returns intersection fractions:
     * * If `f1` is undefined, the intersection occurs at fraction f0.x along line A and f0.y along line B.
     * * If `f1` is defined, the line segments are parallel and overlap:
     * segment B maps to fractions in the range f0.x < f1.x on line A;
     * segment A maps to fractions in the range f0.y < f1.y on line B.
     * * If `undefined`, the lines are parallel without overlap.
     */
    static lineSegmentXYUVIntersectionUnbounded(a0: XAndY, aDir: XAndY, b0: XAndY, bDir: XAndY, tol?: number): {
        f0: WritableXAndY;
        f1?: WritableXAndY;
    } | undefined;
    /**
     * Return true if lines (a0,a1) to (b0, b1) have a simple intersection using only xy parts of WEIGHTED 4D Points
     * @param hA0 homogeneous start point of line A
     * @param hA1 homogeneous end point of line A
     * @param hB0 homogeneous start point of line B
     * @param hB1 homogeneous end point of line B
     * @param result vector to receive fractional coordinates of intersection: result.x is fraction on line A, result.y is
     * fraction on line B.
     */
    static lineSegment3dHXYTransverseIntersectionUnbounded(hA0: Point4d, hA1: Point4d, hB0: Point4d, hB1: Point4d, result?: Vector2d): Vector2d | undefined;
    /**
     * Return the line fraction at which the (homogeneous) line is closest to a space point as viewed in xy only.
     * @param hA0 homogeneous start point of the line
     * @param hA1 homogeneous end point of the line
     * @param spacePoint homogeneous point in space
     */
    static lineSegment3dHXYClosestPointUnbounded(hA0: Point4d, hA1: Point4d, spacePoint: Point4d): number | undefined;
    /**
     * Return the line fraction at which the line is closest to a space point as viewed in xy only.
     * @param pointA0 start point
     * @param pointA1 end point
     * @param spacePoint point in space
     */
    static lineSegment3dXYClosestPointUnbounded(pointA0: XAndY, pointA1: XAndY, spacePoint: XAndY): number | undefined;
    /**
     * Return the line fraction at which the line is closest to a space point
     * @param pointA0 start point
     * @param pointA1 end point
     * @param spacePoint point in space
     */
    static lineSegment3dClosestPointUnbounded(pointA0: Point3d, pointA1: Point3d, spacePoint: Point3d): number | undefined;
    /**
     * Return true if lines (a0,a1) to (b0, b1) have closest approach (go by each other) in 3d
     * @param a0 start point of line A
     * @param a1 end point of line A
     * @param b0 start point of line B
     * @param b1 end point of line B
     * @param result vector to receive fractional coordinates of closest approach: result.x is fraction on line A, result.y
     * is fraction on line B.
     */
    static lineSegment3dClosestApproachUnbounded(a0: Point3d, a1: Point3d, b0: Point3d, b1: Point3d, result: Vector2d): boolean;
    /**
     * Return true if the given rays have closest approach (go by each other) in 3d
     * @param ax x-coordinate of the origin of the first ray
     * @param ay y-coordinate of the origin of the first ray
     * @param az z-coordinate of the origin of the first ray
     * @param au x-coordinate of the direction vector of the first ray
     * @param av y-coordinate of the direction vector of the first ray
     * @param aw z-coordinate of the direction vector of the first ray
     * @param bx x-coordinate of the origin of the second ray
     * @param by y-coordinate of the origin of the second ray
     * @param bz z-coordinate of the origin of the second ray
     * @param bu x-coordinate of the direction vector of the second ray
     * @param bv y-coordinate of the direction vector of the second ray
     * @param bw z-coordinate of the direction vector of the second ray
     * @param result vector to receive fractional coordinates of intersection: result.x is fraction on line A, result.y is
     * fraction on line B.
     */
    static ray3dXYZUVWClosestApproachUnbounded(ax: number, ay: number, az: number, au: number, av: number, aw: number, bx: number, by: number, bz: number, bu: number, bv: number, bw: number, result: Vector2d): boolean;
    /**
     * Solve the pair of linear equations
     * * `ux * x + vx * y = cx`
     * * `uy * x + vy * y = cy`
     * @param ux xx coefficient
     * @param vx xy coefficient
     * @param uy yx coefficient
     * @param vy yy coefficient
     * @param cx x right hand side
     * @param cy y right hand side
     * @param result (x,y) solution (MUST be preallocated by caller)
     */
    static linearSystem2d(ux: number, vx: number, // first row of matrix
    uy: number, vy: number, // second row of matrix
    cx: number, cy: number, // right side
    result: Vector2d): boolean;
    /**
     * Solve a linear system:
     * * x equation: `axx * u + axy * v + axz * w = cx`
     * * y equation: `ayx * u + ayy * v + ayz * w = cy`
     * * z equation: `azx * u + azy * v + azz * w = cz`
     * @param axx row 0, column 0 coefficient
     * @param axy row 0, column 1 coefficient
     * @param axz row 0, column 1 coefficient
     * @param ayx row 1, column 0 coefficient
     * @param ayy row 1, column 1 coefficient
     * @param ayz row 1, column 2 coefficient
     * @param azx row 2, column 0 coefficient
     * @param azy row 2, column 1 coefficient
     * @param azz row 2, column 2 coefficient
     * @param cx right hand side row 0 coefficient
     * @param cy right hand side row 1 coefficient
     * @param cz right hand side row 2 coefficient
     * @param result optional result.
     * @returns solution vector (u,v,w) or `undefined` if system is singular.
     */
    static linearSystem3d(axx: number, axy: number, axz: number, // first row of matrix
    ayx: number, ayy: number, ayz: number, // second row of matrix
    azx: number, azy: number, azz: number, // second row of matrix
    cx: number, cy: number, cz: number, // right side
    result?: Vector3d): Vector3d | undefined;
    /**
     * Compute the intersection of three planes.
     * @param xyzA point on the first plane
     * @param normalA normal of the first plane
     * @param xyzB point on the second plane
     * @param normalB normal of the second plane
     * @param xyzC point on the third plane
     * @param normalC normal of the third plane
     * @param result optional result
     * @returns intersection point of the three planes (as a Vector3d), or undefined if at least two planes are parallel.
     */
    static intersect3Planes(xyzA: Point3d, normalA: Vector3d, xyzB: Point3d, normalB: Vector3d, xyzC: Point3d, normalC: Vector3d, result?: Vector3d): Vector3d | undefined;
    /**
     * In rowB, replace `rowB[j] += a * rowB[pivot] * rowA[j] / rowA[pivot]` for `j > pivot`
     * @param rowA row that does not change
     * @param pivotIndex index of pivot (divisor) in rowA.
     * @param rowB row where elimination occurs.
     */
    static eliminateFromPivot(rowA: Float64Array, pivotIndex: number, rowB: Float64Array, a: number): boolean;
    /**
     * Solve a pair of bilinear equations
     * * First equation: `a0 + b0 * u + c0 * v + d0 * u * v = 0`
     * * Second equation: `a1 + b1 * u + c1 * v + d1 * u * v = 0`
     */
    static solveBilinearPair(a0: number, b0: number, c0: number, d0: number, a1: number, b1: number, c1: number, d1: number): Point2d[] | undefined;
}
//# sourceMappingURL=SmallSystem.d.ts.map