English     Español
[Main Index] : Programming : Languages : Perl : CPAN Modules : Data Type Utilities : Math
 Math::Systems CPAN (Perl) Module 

Search

 

Documents

Math::Systems - Perl extension solving systems of Equations. (Displayed)
README 

Math::Systems - Perl extension solving systems of Equations.


NAME

Math::Systems - Perl extension solving systems of Equations.


SYNOPSIS

  use Math::Systems;
  $a = Math::Systems->new(
     [1,  2,   3],
     [1,  -2 ,  -3],
  )
  @solutions = $a->solve;


DESCRIPTION

Solves systems of equations using Krammer's rule. If you look at the Solve method you'll understand Krammer's rule (I think?)

Basically a system of equations is more than one equation/variable your solving. This module REQUIRES you have 1 equation per each coefficent. Try not to use too many equations. 3 equations is probably the limit of reason. But if you don't mind long compilation time, go for as many as you want.

This module uses (and ovbiously requires you have) Math::Matrix to do all the Matrix work. Please take a look at that module for details do you can see exactly what is happening. There are no arguements in this module except for the Matrix which will be brought to Math::Matrix.

Also, keep in mind, there are no error messenging. I will of course change that someday, but for now I'm satisfied that I can solve systems of equations. Don't allow error-prone things to be written in. But, there are of course times when you won't be able to figure out the stupid answer and this module will absolutly act like it did a great job, and at the same time, fail. So, keep that in mind.

BETA means something. It's not good.


METHODS

new

Pass the Equation coeffients/answers to this. The same way you do it in Math::Matrix. This is the constructor. If the equations are 2x + 3y = 10 and 3x + 2y = 10 then

     Math::Systems->new(
           [2, 3, 10],
           [3, 2, 10]
     );

solve

Solves it. Returns list of solutions in order. Take no arguements. Ever.


AUTHOR

Will Gunther <lt>williamgunther@aol.com


SEE ALSO

perl. the Math::Matrix manpage

Information

This site is currently in testing, it is not yet operating using the full database. Until it is officially launched you may wish to visit Help-Site Computer Manuals. After launch, this site (HelpSpy) will replace Help-Site. Information about the spider which is currently trawling the Internet looking for links to add to this directory can be found here.
   

©Copyright Nicholas Reynolds 2004