From 9a35b6b1adbf0cf6f178118413556ad19994f95b Mon Sep 17 00:00:00 2001 From: miner Date: Mon, 15 Jan 2024 21:58:29 -0500 Subject: [PATCH] modified: README.md deleted: docs/examples.html modified: docs/index.html --- README.md | 4 ++-- docs/examples.html | 23 ----------------------- docs/index.html | 26 +++++++++++++++++++++++--- 3 files changed, 25 insertions(+), 28 deletions(-) delete mode 100644 docs/examples.html diff --git a/README.md b/README.md index 4d16c52..8a63b4f 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Recently in 2024 we have introduced a new syntax for the Ceres js engine. The eq @@ -49,7 +49,11 @@

Introduction

About

- +

Ceres.js is a port of the Ceres solver. There are js libraries such as math.js and algebrite.js that do have some capabilities to solve LINEAR systems of equations. The purpose of Ceres.js is to have a robust solver for the non-linear equations. The authors are not aware of another js library that solves systems of non-linear equations numerically. Ceres js works best when you give it a set of equations F(x)=0 with an zero solution. If you need to do constrained maximization or minimization there is another library Alglib.js that can do that.

+

Key Questions:

+

Do you have a single equation or a system of multiple equations? Ceres.js will work with both but may be overkill for the single equation.

+

Are you trying to find the zeros of that system, F(x)=0, or seeing to minimize a cost function? Ceres.js finds the zeros of a system.

+

Are your equations linear or non-linear? Ceres.js will solve both linear and non-linear. If you only have linear equations there are likely more optimized solvers to do that job.

@@ -248,7 +252,23 @@

Rosebrock Function

Documentation

- +

The Ceres class starts an instance of the Ceres solver. It has several methods for configuration, interaction, and operation as detailed below.

+ +

Exported Modules:

+ +

Class: Ceres

+ +
    +
  • Ceres(): The constructor method takes no inputs and creates a new Solver instance.
  • +
  • addFunction(fn): Method takes a function that should return a residual. These functions (residuals) should equal zero at the solution point i.e. F(x) = 0.
  • +
  • addLowerbound(xNumber, lowerBound): Method to set a lower bound to a variable utilized in the solver.
  • +
  • addUpperbound(xNumber, upperBound): Method to set an upper bound to a variable within the solver.
  • +
  • addCallback(callback_handle): Method takes a callback function to run every time before a function evaluation. It can be used to print intermediate results.
  • +
  • reset(): Method removes the loaded functions and allows new functions to be assigned to the same object.
  • +
  • solve(initial_guesses, max_num_iterations = 2000, parameter_tolerance = 1e-10, function_tolerance = 1e-16, gradient_tolerance = 1e-16, max_solver_time_in_seconds = 100, initial_trust_region_radius = 1e4, max_trust_region_radius = 1e16, max_num_consecutive_invalid_steps = 5): Method requires an array that defines the solver starting point and returns an `x` solution array and a `report` variable with a full report of the solver output.
  • +
  • remove(): Method to delete the current solver instance.
  • +
  • run(jsonSystem): Asynchronous method to run the solver using configuration and equations specified in JSON format.
  • +