export class Subspan {
    /**
     *
     * @param {number} dim dimension count
     * @param {PointSet} s
     * @param {number} k
     */
    constructor(dim: number, s: PointSet, k: number);
    /**
     * @type {PointSet}
     */
    S: PointSet;
    /**
     * reserve bit-field size
     * @type {BitSet}
     */
    membership: BitSet;
    /**
     *
     * @type {number}
     */
    dim: number;
    /**
     *
     * @type {Int32Array}
     */
    members: Int32Array;
    /**
     * @type {SquareMatrix}
     */
    Q: SquareMatrix;
    /**
     * @type {SquareMatrix}
     */
    R: SquareMatrix;
    /**
     * D sized vector
     * @type {Float64Array}
     */
    u: Float64Array;
    /**
     * D sized vector
     * @type {Float64Array}
     */
    w: Float64Array;
    r: number;
    /**
     * Givens rotation coefficients scratch: cs[0] = c, cs[1] = s.
     * Holding this as an instance field avoids per-call allocation of a
     * fresh 2-element array — see givens_rotation_coefficients's contract.
     * @type {Float64Array}
     */
    cs: Float64Array;
    dimension(): number;
    /**
     * The size of the instance's set <i>M</i>, a number between 0 and `dim+1`.
     *
     * Complexity: O(1).
     *
     * @returns {int} <i>|M|</i>
     */
    size(): int;
    /**
     * Whether <i>S[i]</i> is a member of <i>M</i>.
     *
     * Complexity: O(1)
     *
     * @param {int} i
     *          the "global" index into <i>S</i>
     * @returns {boolean} true iff <i>S[i]</i> is a member of <i>M</i>
     */
    isMember(i: int): boolean;
    /**
     * The global index (into <i>S</i>) of an arbitrary element of <i>M</i>.
     *
     * Precondition: `size()>0`
     *
     * Postcondition: `isMember(anyMember())`
     * @returns {number}
     */
    anyMember(): number;
    /**
     * The index (into <i>S</i>) of the <i>i</i>th point in <i>M</i>. The points in <i>M</i> are
     * internally ordered (in an arbitrary way) and this order only changes when {@link add()} or
     * {@link remove()} is called.
     *
     * Complexity: O(1)
     *
     * @param {number} i
     * the "local" index, 0 ≤ i < `size()`
     * @return {number} <i>j</i> such that <i>S[j]</i> equals the <i>i</i>th point of M
     */
    globalIndex(i: number): number;
    /**
     * Short-hand for code readability to access element <i>(i,j)</i> of a matrix that is stored in a
     * one-dimensional array.
     *
     * @param {number} i
     * zero-based row number
     * @param {number} j
     * zero-based column number
     * @return {number} the index into the one-dimensional array to get the element at position <i>(i,j)</i> in
     * the matrix
     * @private
     */
    private ind;
    /**
     * The point `members[r]` is called the <i>origin</i>.
     *
     * @return {number} index into <i>S</i> of the origin.
     * @private
     */
    private origin;
    /**
     * Appends the new column <i>u</i> (which is a member field of this instance) to the right of <i>A
     * = QR</i>, updating <i>Q</i> and <i>R</i>. It assumes <i>r</i> to still be the old value, i.e.,
     * the index of the column used now for insertion; <i>r</i> is not altered by this routine and
     * should be changed by the caller afterwards.
     *
     * Precondition: `r<dim`
     * @private
     */
    private appendColumn;
    /**
     * Adds the point <i>S[index]</i> to the instance's set <i>M</i>.
     *
     * Precondition: `!isMember(index)`
     *
     * Complexity: O(dim^2).
     *
     * @param {number} index index into <i>S</i> of the point to add
     */
    add(index: number): void;
    /**
     * Computes the vector <i>w</i> directed from point <i>p</i> to <i>v</i>, where <i>v</i> is the
     * point in <i>aff(M)</i> that lies nearest to <i>p</i>.
     *
     * Precondition: `size()>0`
     *
     * Complexity: O(dim^2)
     *
     * @param {number[]} p
     * @param {number[]} w Euclidean coordinates of point <i>p</i>
     * @return {number} the squared length of <i>w</i>
     */
    shortestVectorToSpan(p: number[], w: number[]): number;
    /**
     * Use this for testing only; the method allocates additional storage and copies point
     * coordinates.
     * @return {number}
     */
    representationError(): number;
    /**
     * Calculates the `size()`-many coefficients in the representation of <i>p</i> as an affine
     * combination of the points <i>M</i>.
     *
     * The <i>i</i>th computed coefficient `lambdas[i] `corresponds to the <i>i</i>th point in
     * <i>M</i>, or, in other words, to the point in <i>S</i> with index `globalIndex(i)`.
     *
     * Complexity: O(dim^2)
     *
     * Preconditions: c lies in the affine hull aff(M) and size() > 0.
     * @param {number[]|Float64Array} p
     * @param {number[]|Float64Array} lambdas
     */
    findAffineCoefficients(p: number[] | Float64Array, lambdas: number[] | Float64Array): void;
    /**
     * Given <i>R</i> in lower Hessenberg form with subdiagonal entries 0 to `pos-1` already all
     * zero, clears the remaining subdiagonal entries via Givens rotations.
     * @param {number} pos
     * @private
     */
    private hessenberg_clear;
    /**
     * Update current QR-decomposition <i>A = QR</i> to
     *
     * <pre>
     * A + u * [1,...,1] = Q' R'.
     * </pre>
     * @private
     */
    private special_rank_1_update;
    /**
     *
     * @param {number} index
     */
    remove(index: number): void;
}
import { BitSet } from "../../../binary/BitSet.js";
import { SquareMatrix } from "../../../math/matrix/SquareMatrix.js";
//# sourceMappingURL=Subspan.d.ts.map