numbl 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cli/cli.js +768 -120
- package/dist-lib/graphics/types.d.ts +40 -1
- package/dist-lib/lib.js +767 -119
- package/dist-lib/numbl-core/interpreter/interpreter.d.ts +1 -1
- package/dist-lib/numbl-core/interpreter/interpreterFunctions.d.ts +13 -1
- package/dist-lib/numbl-core/runtime/plotUtils.d.ts +28 -2
- package/dist-lib/numbl-core/runtime/runtimePlot.d.ts +5 -0
- package/dist-lib/numbl-core/runtime/types.d.ts +6 -3
- package/dist-lib/numbl-core/version.d.ts +1 -1
- package/dist-plot-viewer/assets/index-DfxsWeyf.js +4426 -0
- package/dist-plot-viewer/index.html +1 -1
- package/dist-site-viewer/assets/index-C5c2lKAx.js +4748 -0
- package/dist-site-viewer/assets/{numbl-worker-VkVtodCX.js → numbl-worker-CkoM4MUa.js} +121 -121
- package/dist-site-viewer/index.html +1 -1
- package/package.json +1 -1
- package/dist-plot-viewer/assets/index-COAM8o1E.js +0 -4426
- package/dist-site-viewer/assets/index-CgBUy7v7.js +0 -4748
|
@@ -189,5 +189,5 @@ export declare class Interpreter {
|
|
|
189
189
|
};
|
|
190
190
|
isHandleClass: (classInfo: ClassInfo) => boolean;
|
|
191
191
|
evalInLocalScope: (codeArg: unknown, fileName?: string) => unknown;
|
|
192
|
-
processArgumentsBlocks: (fn: FunctionDef, args: unknown[]) =>
|
|
192
|
+
processArgumentsBlocks: (fn: FunctionDef, args: unknown[]) => void;
|
|
193
193
|
}
|
|
@@ -41,4 +41,16 @@ export declare function collectClassProperties(this: Interpreter, classInfo: Cla
|
|
|
41
41
|
};
|
|
42
42
|
export declare function isHandleClass(this: Interpreter, classInfo: ClassInfo): boolean;
|
|
43
43
|
export declare function evalInLocalScope(this: Interpreter, codeArg: unknown, fileName?: string): unknown;
|
|
44
|
-
|
|
44
|
+
/**
|
|
45
|
+
* Apply `arguments`-block defaults and build name-value struct parameters,
|
|
46
|
+
* binding the results into the *current* function environment.
|
|
47
|
+
*
|
|
48
|
+
* Must be called with `this.env` already set to the function scope and the
|
|
49
|
+
* caller-supplied positional arguments already bound to their parameters.
|
|
50
|
+
* Default expressions are evaluated in that scope so they can reference
|
|
51
|
+
* earlier arguments (e.g. `mergeIdx = surfaceop.defaultIdx(dom)`), matching
|
|
52
|
+
* MATLAB. Entries are matched to parameters by name via `fn.params`, which
|
|
53
|
+
* also handles the constructor case where the output variable is prepended
|
|
54
|
+
* to `params` (shifting argument positions by one).
|
|
55
|
+
*/
|
|
56
|
+
export declare function processArgumentsBlocks(this: Interpreter, fn: FunctionDef, args: unknown[]): void;
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* plot(X1,Y1,LineSpec1,...), and Name-Value pairs like 'Color','r','LineWidth',2.
|
|
6
6
|
*/
|
|
7
7
|
import { type RuntimeValue } from "./types.js";
|
|
8
|
-
export type { PlotTrace, Plot3Trace, SurfTrace, ImagescTrace, PcolorTrace, ContourTrace, BarTrace, Bar3Trace, ErrorBarTrace, BoxTrace, PieTrace, HeatmapTrace, QuiverTrace, } from "../../graphics/types.js";
|
|
9
|
-
import type { PlotTrace, Plot3Trace, SurfTrace, ImagescTrace, PcolorTrace, ContourTrace, BarTrace, Bar3Trace, ErrorBarTrace, BoxTrace, PieTrace, HeatmapTrace, QuiverTrace } from "../../graphics/types.js";
|
|
8
|
+
export type { PlotTrace, Plot3Trace, SurfTrace, ImagescTrace, PcolorTrace, ContourTrace, BarTrace, Bar3Trace, ErrorBarTrace, BoxTrace, PieTrace, HeatmapTrace, QuiverTrace, Quiver3Trace, } from "../../graphics/types.js";
|
|
9
|
+
import type { PlotTrace, Plot3Trace, SurfTrace, ImagescTrace, PcolorTrace, ContourTrace, BarTrace, Bar3Trace, ErrorBarTrace, BoxTrace, PieTrace, HeatmapTrace, QuiverTrace, Quiver3Trace } from "../../graphics/types.js";
|
|
10
10
|
export interface ParsedLineSpec {
|
|
11
11
|
color?: string;
|
|
12
12
|
lineStyle?: string;
|
|
@@ -75,6 +75,20 @@ export declare function parseImagescArgs(args: RuntimeValue[]): ImagescTrace;
|
|
|
75
75
|
* contour(..., Name, Value)
|
|
76
76
|
*/
|
|
77
77
|
export declare function parseContourArgs(args: RuntimeValue[], filled: boolean): ContourTrace;
|
|
78
|
+
/** Result of computing contour geometry: the MATLAB contour matrix `C`
|
|
79
|
+
* (column-major `2 × n` data) plus the level list actually used. */
|
|
80
|
+
export interface ContourMatrix {
|
|
81
|
+
/** Column-major `2 × n` data for a `RTV.tensor(data, [2, n])`. */
|
|
82
|
+
data: number[];
|
|
83
|
+
n: number;
|
|
84
|
+
levelList: number[];
|
|
85
|
+
}
|
|
86
|
+
/** Compute the MATLAB contour matrix for a parsed contour trace via marching
|
|
87
|
+
* squares. Each marching-squares segment is emitted as its own two-vertex
|
|
88
|
+
* contour line (header `[level; 2]` followed by the two `[x; y]` vertices) —
|
|
89
|
+
* a valid contour matrix whose geometry matches MATLAB's connected polylines
|
|
90
|
+
* segment-for-segment. */
|
|
91
|
+
export declare function computeContourMatrix(trace: ContourTrace): ContourMatrix;
|
|
78
92
|
/**
|
|
79
93
|
* Parse mesh() arguments — same as surf but with different default rendering.
|
|
80
94
|
*/
|
|
@@ -237,3 +251,15 @@ export declare function parseHeatmapArgs(args: RuntimeValue[]): HeatmapTrace;
|
|
|
237
251
|
* vectors, X and Y are expanded to a meshgrid.
|
|
238
252
|
*/
|
|
239
253
|
export declare function parseQuiverArgs(args: RuntimeValue[]): QuiverTrace[];
|
|
254
|
+
/**
|
|
255
|
+
* Parse quiver3() arguments.
|
|
256
|
+
*
|
|
257
|
+
* Supported forms:
|
|
258
|
+
* quiver3(Z, U, V, W)
|
|
259
|
+
* quiver3(X, Y, Z, U, V, W)
|
|
260
|
+
* quiver3(..., scale) — scale: nonnegative number or 'off'
|
|
261
|
+
* quiver3(..., LineSpec)
|
|
262
|
+
* quiver3(..., LineSpec, 'filled')
|
|
263
|
+
* quiver3(..., Name, Value) — Color, LineStyle, LineWidth, ShowArrowHead, …
|
|
264
|
+
*/
|
|
265
|
+
export declare function parseQuiver3Args(args: RuntimeValue[]): Quiver3Trace;
|
|
@@ -33,6 +33,9 @@ export declare function plotInstr(plotInstructions: PlotInstruction[], instr: {
|
|
|
33
33
|
type: "close_all";
|
|
34
34
|
} | {
|
|
35
35
|
type: "clf";
|
|
36
|
+
} | {
|
|
37
|
+
type: "cla";
|
|
38
|
+
reset: boolean;
|
|
36
39
|
} | {
|
|
37
40
|
type: "set_subplot";
|
|
38
41
|
rows: unknown;
|
|
@@ -66,6 +69,7 @@ export declare function viewCall(plotInstructions: PlotInstruction[], args: Runt
|
|
|
66
69
|
export declare function plotCall(plotInstructions: PlotInstruction[], args: RuntimeValue[]): void;
|
|
67
70
|
export declare function plot3Call(plotInstructions: PlotInstruction[], args: RuntimeValue[]): void;
|
|
68
71
|
export declare function surfCall(plotInstructions: PlotInstruction[], args: RuntimeValue[]): void;
|
|
72
|
+
export declare function surfaceCall(plotInstructions: PlotInstruction[], args: RuntimeValue[]): void;
|
|
69
73
|
export declare function imagescCall(plotInstructions: PlotInstruction[], args: RuntimeValue[]): void;
|
|
70
74
|
export declare function pcolorCall(plotInstructions: PlotInstruction[], args: RuntimeValue[]): void;
|
|
71
75
|
export declare function contourCall(plotInstructions: PlotInstruction[], args: RuntimeValue[], filled: boolean): void;
|
|
@@ -101,6 +105,7 @@ export declare function piechartCall(plotInstructions: PlotInstruction[], args:
|
|
|
101
105
|
export declare function donutchartCall(plotInstructions: PlotInstruction[], args: RuntimeValue[]): void;
|
|
102
106
|
export declare function heatmapCall(plotInstructions: PlotInstruction[], args: RuntimeValue[]): void;
|
|
103
107
|
export declare function quiverCall(plotInstructions: PlotInstruction[], args: RuntimeValue[]): void;
|
|
108
|
+
export declare function quiver3Call(plotInstructions: PlotInstruction[], args: RuntimeValue[]): void;
|
|
104
109
|
export declare function legendCall(plotInstructions: PlotInstruction[], args: RuntimeValue[]): void;
|
|
105
110
|
export declare function drawnow(plotInstructions: PlotInstruction[], options: ExecOptions): void;
|
|
106
111
|
export declare function pause(seconds: unknown): void;
|
|
@@ -116,13 +116,16 @@ export declare class RuntimeClassInstance extends Refcounted {
|
|
|
116
116
|
bindField(rt: RefcountRuntime, name: string, value: RuntimeValue): void;
|
|
117
117
|
protected _destroy(rt: RefcountRuntime): void;
|
|
118
118
|
}
|
|
119
|
-
/**
|
|
120
|
-
*
|
|
119
|
+
/** An array of class instances that all share the same class. Created by
|
|
120
|
+
* default horzcat/vertcat when the class doesn't overload them. `elements`
|
|
121
|
+
* are stored in column-major order; `shape` is the 2-D `[rows, cols]` size
|
|
122
|
+
* (defaults to a `1×N` row vector when omitted). */
|
|
121
123
|
export declare class RuntimeClassInstanceArray extends Refcounted {
|
|
122
124
|
readonly kind: "class_instance_array";
|
|
123
125
|
className: string;
|
|
124
126
|
elements: RuntimeClassInstance[];
|
|
125
|
-
|
|
127
|
+
shape: [number, number];
|
|
128
|
+
constructor(className: string, elements: RuntimeClassInstance[], shape?: [number, number]);
|
|
126
129
|
protected _destroy(rt: RefcountRuntime): void;
|
|
127
130
|
}
|
|
128
131
|
export declare class RuntimeComplexNumber extends Refcounted {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Numbl version, used for JIT disk cache invalidation. */
|
|
2
|
-
export declare const NUMBL_VERSION = "0.4.
|
|
2
|
+
export declare const NUMBL_VERSION = "0.4.1";
|