This very simple program was written in C++ to calculate least squares method (for regression analysis). It's based on main matrix class to estimate line regresion of inputed data into matrices.
This little project has been built with NetBeans IDE 7.4.
Features:
- Overwritten minor group of operators
()
,=
,+
,+=
,-
,-=
,<<
,*
,^
, - Added some specyfic functions to the class Matrix like
transpose
ordeterminant
, - Added some helper functions to glue all friend and build-in functions together, like:
- isEvenNumber
- isNegativeNumber
- highestValue
- isMatrixSizeEqual
- etc. ;)
What more TODO:
- To improve creating objects, constructor can be overwritten in ex: A("1,2;3,4;5,6;") and it should create matrix A with dimension of 3x2 and filled cells with data. Some scratch of implementation is all ready and put in the comments in the class Matrix.
It's two way to download.
- Recommended: Use Git and run
git clone [email protected]:egel/lsm.git
in terminal - Download all files in package and extract it.
Before you install this repo, first need to install or update your software:
sudo apt-get install libboost-all-dev
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
sudo apt-get install -y oracle-jdk7-installer
update-alternatives --display java
Check java version
java -version
Next, this is my article to update g++ compiler use it first. How to update g++ in Ubuntu
cd ~/Pulpit/
git clone [email protected]:egel/lsm.git
cd ~/Pulpit/lsm/
-
Download and install from this site
-
Open Netbeans and open project (Open -> project)
In some cases need to add main files like class and headers to the project in order to run it properly.
- F6 - Compile and run project
Happy hacking :)
Minor and simple tests of basic functions and Least Square Method are all ready written in main file.
All improvements wide or minor are welcome :)
The code is released under the GNU General Public License 3 - Link to local license.