Gauss Jordan #

A simple package for finding Gaussian-Jordan style elimination of matrices.

Takes in a matrix and returns the Reduced Row Echelon Form. This package has no dependencies and only contains one simple method.

Example #

List<List<double>> matrix = [
[3.0, 0.0, -1.0, 0.0, 0.0],
[8.0, 0.0, 0.0, -2.0, 0.0],
[0.0, 2.0, -2.0, -1.0, 0.0]
];
print(GaussJordan.solve(matrix).toString());

prints

[[1.0, 0.0, 0.0, -0.25, 0.0], [0.0, 1.0, 0.0, -1.25, 0.0], [0.0, 0.0, 1.0, -0.75, 0.0]]

Full Example #

import "package:gauss_jordan/gauss_jordan.dart";
import 'dart:io';

main(List<String> arguments) {

print("Enter matrix rows:");
List<List<double>> matrix = List<List<double>>();
String input = "";

/*Formats input into List<List<double>>
Example input:
2 (matrix rows)
2.0 0.0 -1.0 0.0
0.0 2.0 -1.0 0.0
*/
for(int i = 0; i < rowSize; i++){
List<String> rowString = input.split(" ");
List<double> rows =  List<double>();
rowString.forEach((r){
});

}

List<List<double>> rref = GaussJordan.solve(matrix);
print(rref.toString());

}

Installation #

dependencies:
gauss_jordan: 1.0.2

import 'package:gauss_jordan/gauss_jordan.dart';

I apologize for any spaghetti code

1.0.2 #

• Fixed even more errors

1.0.1 #

• Fixed small errors

1.0.0 #

• Initial release

example/example.dart

import "package:gauss_jordan/gauss_jordan.dart";
import 'dart:io';

main(List<String> arguments) {

print("Enter matrix rows:");
List<List<double>> matrix = List<List<double>>();
String input = "";

for(int i = 0; i < rowSize; i++){
List<String> rowString = input.split(" ");
List<double> rows =  List<double>();
rowString.forEach((r){
});

}

List<List<double>> rref = GaussJordan.solve(matrix);
print(rref.toString());

}

Use this package as a library

1. Depend on it

dependencies:
gauss_jordan: ^1.0.2

2. Install it

You can install packages from the command line:

with pub:

\$ pub get

with Flutter:

\$ flutter pub get

3. Import it

Now in your Dart code, you can use:

import 'package:gauss_jordan/gauss_jordan.dart';

 Popularity: Describes how popular the package is relative to other packages. [more] 0 Health: Code health derived from static analysis. [more] 99 Maintenance: Reflects how tidy and up-to-date the package is. [more] 100 Overall: Weighted score of the above. [more] 50

We analyzed this package on Apr 4, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

• Dart: 2.7.1
• pana: 0.13.6

Health issues and suggestions

Document public APIs. (-1 points)

4 out of 4 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.5.0 <3.0.0
Dev dependencies
pedantic ^1.8.0
test ^1.6.0