Skip to content

this is a fun algo implemented in java help this run more faster :)

Notifications You must be signed in to change notification settings

anfaas1618/gauss-jordan-algo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gauss-jordan-algo

` the output of this amazing algo

            enter the values : 
            2
            enter the values : 
            4
            enter the values : 
            5
            enter the values : 
            3
            enter the values : 
            5
            enter the values : 
            7
            enter the values : 
            3
            enter the values : 
            1
            enter the values : 
            6
            enter the values : 
            8
            enter the values : 
            5
            enter the values : 
            3


            2.0   4.0   5.0   3.0   
            5.0   7.0   3.0   1.0   
            6.0   8.0   5.0   3.0   

            ***********************************************************
            piviting  row 0by multiplying 1.0/2.0

            1.0   2.0   5.0/2.0   3.0/2.0   
            5.0   7.0   3.0   1.0   
            6.0   8.0   5.0   3.0   
            ***********************************************************
            multiplying  row 0by  5.0

            5.0   10.0   25.0/2.0   15.0/2.0   
            5.0   7.0   3.0   1.0   
            6.0   8.0   5.0   3.0   
            ***********************************************************
            substracting   row 1from  row 0

            5.0   10.0   25.0/2.0   15.0/2.0   
            0.0   -3.0   -19.0/2.0   -13.0/2.0   
            6.0   8.0   5.0   3.0   
            ***********************************************************
            restoring pivit  row 0by dividing  5.0

            1.0   2.0   5.0/2.0   3.0/2.0   
            0.0   -3.0   -19.0/2.0   -13.0/2.0   
            6.0   8.0   5.0   3.0   
            ***********************************************************
            multiplying  row 0by  6.0

            6.0   12.0   15.0   9.0   
            0.0   -3.0   -19.0/2.0   -13.0/2.0   
            6.0   8.0   5.0   3.0   
            ***********************************************************
            substracting   row 2from  row 0

            6.0   12.0   15.0   9.0   
            0.0   -3.0   -19.0/2.0   -13.0/2.0   
            0.0   -4.0   -10.0   -6.0   
            ***********************************************************
            restoring pivit  row 0by dividing  6.0

            1.0   2.0   5.0/2.0   3.0/2.0   
            0.0   -3.0   -19.0/2.0   -13.0/2.0   
            0.0   -4.0   -10.0   -6.0   
            ***********************************************************
            piviting  row 1by multiplying -1.0/3.0

            1.0   2.0   5.0/2.0   3.0/2.0   
            0.0   1.0   19.0/6.0   13.0/6.0   
            0.0   -4.0   -10.0   -6.0   
            ***********************************************************
            multiplying  row 1by  2.0

            1.0   2.0   5.0/2.0   3.0/2.0   
            0.0   2.0   19.0/3.0   13.0/3.0   
            0.0   -4.0   -10.0   -6.0   
            ***********************************************************
            substracting   row 0from  row 1

            1.0   0.0   -23.0/6.0   -17.0/6.0   
            0.0   2.0   19.0/3.0   13.0/3.0   
            0.0   -4.0   -10.0   -6.0   
            ***********************************************************
            restoring pivit  row 1by dividing  2.0

            1.0   0.0   -23.0/6.0   -17.0/6.0   
            0.0   1.0   19.0/6.0   13.0/6.0   
            0.0   -4.0   -10.0   -6.0   
            ***********************************************************
            multiplying  row 1by  -4.0

            1.0   0.0   -23.0/6.0   -17.0/6.0   
            0.0   -4.0   -38.0/3.0   -26.0/3.0   
            0.0   -4.0   -10.0   -6.0   
            ***********************************************************
            substracting   row 2from  row 1

            1.0   0.0   -23.0/6.0   -17.0/6.0   
            0.0   -4.0   -38.0/3.0   -26.0/3.0   
            0.0   0.0   8.0/3.0   8.0/3.0   
            ***********************************************************
            restoring pivit  row 1by dividing  -4.0

            1.0   0.0   -23.0/6.0   -17.0/6.0   
            0.0   1.0   19.0/6.0   13.0/6.0   
            0.0   0.0   8.0/3.0   8.0/3.0   
            ***********************************************************
            piviting  row 2by multiplying 3.0/8.0

            1.0   0.0   -23.0/6.0   -17.0/6.0   
            0.0   1.0   19.0/6.0   13.0/6.0   
            0.0   0.0   1.0   1.0   
            ***********************************************************
            multiplying  row 2by  -23.0/6.0

            1.0   0.0   -23.0/6.0   -17.0/6.0   
            0.0   1.0   19.0/6.0   13.0/6.0   
            0.0   0.0   -23.0/6.0   -23.0/6.0   
            ***********************************************************
            substracting   row 0from  row 2

            1.0   0.0   0.0   1.0   
            0.0   1.0   19.0/6.0   13.0/6.0   
            0.0   0.0   -23.0/6.0   -23.0/6.0   
            ***********************************************************
            restoring pivit  row 2by dividing  -23.0/6.0

            1.0   0.0   0.0   1.0   
            0.0   1.0   19.0/6.0   13.0/6.0   
            0.0   0.0   1.0   1.0   
            ***********************************************************
            multiplying  row 2by  19.0/6.0

            1.0   0.0   0.0   1.0   
            0.0   1.0   19.0/6.0   13.0/6.0   
            0.0   0.0   19.0/6.0   19.0/6.0   
            ***********************************************************
            substracting   row 1from  row 2

            1.0   0.0   0.0   1.0   
            0.0   1.0   0.0   -1.0   
            0.0   0.0   19.0/6.0   19.0/6.0   
            ***********************************************************
            restoring pivit  row 2by dividing  19.0/6.0

            1.0   0.0   0.0   1.0   
            0.0   1.0   0.0   -1.0   
            0.0   0.0   1.0   1.0   
            ***********************************************************
            value of x is 1.0
            value of y is -1.0
            value of z is 1.0

`

Releases

No releases published

Packages

No packages published

Languages