Skip to content
/ lsm Public

Simple program written in C++ to calculate matrices by least squares method

License

Notifications You must be signed in to change notification settings

egel/lsm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Least Squares Method

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.

IDE

This little project has been built with NetBeans IDE 7.4.

Matrix Class

Features:

  • Overwritten minor group of operators (), =, +, +=, -, -=, <<, *, ^,
  • Added some specyfic functions to the class Matrix like transpose or determinant,
  • 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.

Download

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.

Install for Linux Ubuntu

Before you install this repo, first need to install or update your software:

Install boost library

sudo apt-get install libboost-all-dev

Update/Install Java Development Kit 7

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

g++ compiler

Next, this is my article to update g++ compiler use it first. How to update g++ in Ubuntu

Now you can install repo:

cd ~/Pulpit/
git clone [email protected]:egel/lsm.git
cd ~/Pulpit/lsm/

Install Netbeans

  • 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 :)

Tests

Minor and simple tests of basic functions and Least Square Method are all ready written in main file.

Improvements

All improvements wide or minor are welcome :)

License

The code is released under the GNU General Public License 3 - Link to local license.

About

Simple program written in C++ to calculate matrices by least squares method

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages