Methods
(generator) solutionGenerator(matrix, optionsopt) → {Solution}
Creates an ES2015 Generator object that can be used to iterate over the solutions to the matrix.
Parameters:
Name | Type | Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
matrix |
Matrix | The matrix to be solved. | |||||||||
options |
object |
<optional> |
Additional options object.
Properties
|
Fires:
Yields:
The next solution.
- Type
- Solution
solve(matrix, optionsopt) → {Array.<Solution>}
Solves the matrix and returns an array of solutions.
Parameters:
Name | Type | Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
matrix |
Matrix | The matrix to be solved. | |||||||||||||
options |
object |
<optional> |
Additional options object.
Properties
|
Fires:
Returns:
The solutions that were found.
- Type
- Array.<Solution>
Events
solution
Properties:
Name | Type | Description |
---|---|---|
solution |
Solution | A solution to the matrix. |
solutionIndex |
number | The index of this solution (0, 1, 2, ...). |
Solution event - fired for each solution found.
Type:
- object
step
Properties:
Name | Type | Description |
---|---|---|
partialSolution |
PartialSolution | The current partial solution at this step of the algorithm. |
stepIndex |
number | The index of this step of the algorithm (0, 1, 2, ...). |
Step event - fired for each step of the algorithm.
Type:
- object