Coder Social home page Coder Social logo

geronimo's Introduction

geronimo

Geronimo is a software that solves systems of linear equations.

โš ๏ธ These resolutions were developed by me and they're surely not the best method in terms of performance.

How it works?

I used 3 methods to solve systems os linear equations, which are:

Main properties

Method name Description
AddDimension Add system dimension. Corresponds to the number of variables in the equations.
AddEquation Add an equation to the system. The construction of a LinearEquation always demands the number of variables in your system (dimension) plus one parameters. Example: x + 2y - 3z = 42 -> This equation has 3 variables, thus it shall be part of a system with 3 equations. The construction should be new LinearEquation(1, 2, -3, 42).
AddErrorRate Add error rate. The smaller, the more accurate the result.
IsRound Whether the result should be rounded [in a specified number of decimal places] or not.

Examples

The examples below expects the following result:

x =  1 
y = -1
z =  1

Jacobi

LinearSystemResult result = new JacobiMethod()
    .AddDimension(3) // Make sure of defining this before set any equation
    .AddEquation(new LinearEquation(10, 2, -1, 7))
    .AddEquation(new LinearEquation(1, 8, 3, -4))
    .AddEquation(new LinearEquation(-2, -1, 10, 9))
    .AddErrorRate(0.000000000001)
    .IsRound(10)
    .SolveIt();
    
// It'll format the result :-)
Console.WriteLine(result.ToString());

Gauss-Siedel

LinearSystemResult result = new GaussSeidelMethod()
    .AddDimension(3) // Make sure of defining this before set any equation
    .AddEquation(new LinearEquation(10, 2, -1, 7))
    .AddEquation(new LinearEquation(1, 8, 3, -4))
    .AddEquation(new LinearEquation(-2, -1, 10, 9))
    .AddErrorRate(0.000000000001)
    .IsRound(10)
    .SolveIt();
    
// It'll format the result :-)
Console.WriteLine(result.ToString());

Gauss-Jordan

LinearSystemResult result = new GaussJordanMethod()
    .AddDimension(3) // Make sure of defining this before set any equation
    .AddEquation(new LinearEquation(10, 2, -1, 7))
    .AddEquation(new LinearEquation(1, 8, 3, -4))
    .AddEquation(new LinearEquation(-2, -1, 10, 9))
    .AddErrorRate(0.000000000001)
    .IsRound(10)
    .SolveIt();
    
// It'll format the result :-)
Console.WriteLine(result.ToString());

geronimo's People

Contributors

rohanaceres avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.