UNPKG

mathrok

Version:

AI-powered symbolic mathematics library combining traditional Computer Algebra System (CAS) capabilities with natural language processing for math problem solving

75 lines 2.73 kB
/** * Visualization module for Mathrok * Provides graph generation and mathematical notation rendering */ import { GraphOptions } from './graph.js'; import { MathRenderingOptions } from './math-renderer.js'; import { MathEngine } from '../core/engine/index.js'; /** * Visualization service options */ export interface VisualizationOptions { graphOptions?: Partial<GraphOptions>; mathOptions?: Partial<MathRenderingOptions>; } /** * Visualization service for Mathrok * Provides a unified interface for graph generation and math rendering */ export declare class VisualizationService { private graphGenerator; private svgRenderer; private mathRenderer; private isInitialized; constructor(engine: MathEngine, options?: VisualizationOptions); /** * Plot a 2D function */ plot2D(container: HTMLElement, expression: string, variable?: string, options?: Partial<GraphOptions>): void; /** * Plot a 3D function */ plot3D(container: HTMLElement, expression: string, options?: Partial<GraphOptions>): void; /** * Plot a parametric function */ plotParametric(container: HTMLElement, expressionX: string, expressionY: string, parameter?: string, tMin?: number, tMax?: number, options?: Partial<GraphOptions>): void; /** * Plot multiple functions */ plotMultiple(container: HTMLElement, expressions: string[], variable?: string, options?: Partial<GraphOptions>): void; /** * Generate SVG for a 2D function */ generateSVG(expression: string, variable?: string, options?: Partial<GraphOptions>): string; /** * Generate image for a 2D function */ generateImage(expression: string, variable?: string, options?: Partial<GraphOptions>): string; /** * Render a mathematical expression */ renderMath(expression: string, format?: 'latex' | 'mathml' | 'asciimath', displayMode?: boolean): string; /** * Render a step-by-step solution */ renderSteps(steps: { text: string; expression: string; }[], format?: 'latex' | 'mathml' | 'asciimath'): string; /** * Generate HTML with CSS for displaying mathematical content */ generateHTML(content: string): string; /** * Generate a complete visualization of a mathematical solution */ visualizeSolution(expression: string, steps: { text: string; expression: string; }[], plotOptions?: Partial<GraphOptions>): string; } export { GraphGenerator, GraphOptions, GraphData, Point } from './graph.js'; export { SVGRenderer } from './svg-renderer.js'; export { MathRenderer, MathRenderingOptions } from './math-renderer.js'; //# sourceMappingURL=index.d.ts.map