@dalet-oss/lexorank
Version:
A reference implementation of a list ordering system like JIRA's Lexorank algorithm
41 lines (40 loc) • 1.48 kB
TypeScript
import { ILexoNumeralSystem } from '../numeralSystems';
export declare class LexoInteger {
static parse(strFull: string, system: ILexoNumeralSystem): LexoInteger;
static zero(sys: ILexoNumeralSystem): LexoInteger;
static one(sys: ILexoNumeralSystem): LexoInteger;
static make(sys: ILexoNumeralSystem, sign: number, mag: number[]): LexoInteger;
private static ZERO_MAG;
private static ONE_MAG;
private static NEGATIVE_SIGN;
private static ZERO_SIGN;
private static POSITIVE_SIGN;
private static add;
private static extendWithCarry;
private static subtract;
private static multiply;
private static complement;
private static compare;
private readonly sys;
private readonly sign;
private readonly mag;
constructor(system: ILexoNumeralSystem, sign: number, mag: number[]);
add(other: LexoInteger): LexoInteger;
subtract(other: LexoInteger): LexoInteger;
multiply(other: LexoInteger): LexoInteger;
negate(): LexoInteger;
shiftLeft(times?: number): LexoInteger;
shiftRight(times?: number): LexoInteger;
complement(): LexoInteger;
complementDigits(digits: number): LexoInteger;
isZero(): boolean;
isOne(): boolean;
getMag(index: number): number;
compareTo(other: LexoInteger): number;
getSystem(): ILexoNumeralSystem;
format(): string;
equals(other: LexoInteger): boolean;
toString(): string;
private isOneish;
private checkSystem;
}