mathpix-markdown-it
Version:
Mathpix-markdown-it is an open source implementation of the mathpix-markdown spec written in Typescript. It relies on the following open source libraries: MathJax v3 (to render math with SVGs), markdown-it (for standard Markdown parsing)
80 lines (79 loc) • 3.43 kB
TypeScript
/**
* A class representing a ring connection.
*
* @property {Number} id The id of this ring connection.
* @property {Number} firstRingId A ring id.
* @property {Number} secondRingId A ring id.
* @property {Set<Number>} vertices A set containing the vertex ids participating in the ring connection.
*/
declare class RingConnection {
id: any;
firstRingId: any;
secondRingId: any;
vertices: any;
/**
* The constructor for the class RingConnection.
*
* @param {Ring} firstRing A ring.
* @param {Ring} secondRing A ring.
*/
constructor(firstRing: any, secondRing: any);
/**
* Adding a vertex to the ring connection.
*
* @param {Number} vertexId A vertex id.
*/
addVertex(vertexId: any): void;
/**
* Update the ring id of this ring connection that is not the ring id supplied as the second argument.
*
* @param {Number} ringId A ring id. The new ring id to be set.
* @param {Number} otherRingId A ring id. The id that is NOT to be updated.
*/
updateOther(ringId: any, otherRingId: any): void;
/**
* Returns a boolean indicating whether or not a ring with a given id is participating in this ring connection.
*
* @param {Number} ringId A ring id.
* @returns {Boolean} A boolean indicating whether or not a ring with a given id participates in this ring connection.
*/
containsRing(ringId: any): boolean;
/**
* Checks whether or not this ring connection is a bridge in a bridged ring.
*
* @param {Vertex[]} vertices The array of vertices associated with the current molecule.
* @returns {Boolean} A boolean indicating whether or not this ring connection is a bridge.
*/
isBridge(vertices: any): boolean;
/**
* Checks whether or not two rings are connected by a bridged bond.
*
* @static
* @param {RingConnection[]} ringConnections An array of ring connections containing the ring connections associated with the current molecule.
* @param {Vertex[]} vertices An array of vertices containing the vertices associated with the current molecule.
* @param {Number} firstRingId A ring id.
* @param {Number} secondRingId A ring id.
* @returns {Boolean} A boolean indicating whether or not two rings ar connected by a bridged bond.
*/
static isBridge(ringConnections: any, vertices: any, firstRingId: any, secondRingId: any): any;
/**
* Retruns the neighbouring rings of a given ring.
*
* @static
* @param {RingConnection[]} ringConnections An array of ring connections containing ring connections associated with the current molecule.
* @param {Number} ringId A ring id.
* @returns {Number[]} An array of ring ids of neighbouring rings.
*/
static getNeighbours(ringConnections: any, ringId: any): any[];
/**
* Returns an array of vertex ids associated with a given ring connection.
*
* @static
* @param {RingConnection[]} ringConnections An array of ring connections containing ring connections associated with the current molecule.
* @param {Number} firstRingId A ring id.
* @param {Number} secondRingId A ring id.
* @returns {Number[]} An array of vertex ids associated with the ring connection.
*/
static getVertices(ringConnections: any, firstRingId: any, secondRingId: any): any;
}
export default RingConnection;