diff --git a/.gitignore b/.gitignore
index b8bd026..6941a19 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,28 +1,213 @@
-# Compiled Object files
-*.slo
-*.lo
-*.o
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+
+# User-specific files
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
+
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+build/
+bld/
+[Bb]in/
+[Oo]bj/
+
+# Visual Studio 2015 cache/options directory
+.vs/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+# NUNIT
+*.VisualState.xml
+TestResult.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+# DNX
+project.lock.json
+artifacts/
+
+*_i.c
+*_p.c
+*_i.h
+*.ilk
+*.meta
*.obj
-
-# Precompiled Headers
-*.gch
*.pch
+*.pdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
-# Compiled Dynamic libraries
-*.so
-*.dylib
-*.dll
+# Chutzpah Test files
+_Chutzpah*
-# Fortran module files
-*.mod
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opendb
+*.opensdf
+*.sdf
+*.cachefile
-# Compiled Static libraries
-*.lai
-*.la
-*.a
-*.lib
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
-# Executables
-*.exe
-*.out
-*.app
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# JustCode is a .NET coding add-in
+.JustCode
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+## TODO: Comment the next line if you want to checkin your
+## web deploy settings but do note that will include unencrypted
+## passwords
+#*.pubxml
+
+*.publishproj
+
+# NuGet Packages
+*.nupkg
+# The packages folder can be ignored because of Package Restore
+**/packages/*
+# except build/, which is used as an MSBuild target.
+!**/packages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/packages/repositories.config
+
+# Windows Azure Build Output
+csx/
+*.build.csdef
+
+# Windows Store app package directory
+AppPackages/
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!*.[Cc]ache/
+
+# Others
+ClientBin/
+[Ss]tyle[Cc]op.*
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.pfx
+*.publishsettings
+node_modules/
+orleans.codegen.cs
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+
+# SQL Server files
+*.mdf
+*.ldf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
+
+# LightSwitch generated files
+GeneratedArtifacts/
+_Pvt_Extensions/
+ModelManifest.xml
diff --git a/LICENSE b/LICENSE
index 853b46d..f55280f 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,21 +1,16 @@
-The MIT License (MIT)
+Copyright (c) 2016, David Alberto Jácome Nogueira
+All rights reserved.
-Copyright (c) 2016
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
+1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
+2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
+3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+--
+Additional Disclaimer:
+This project may include other projects which may contain their own licenses in their respective folders and/or in the respective header files. Please check 'deps' folder for further legal instruments.
\ No newline at end of file
diff --git a/MLP_MVS/MLP_MVS.vcxproj b/MLP_MVS/MLP_MVS.vcxproj
index 151acca..2ab1ae2 100644
--- a/MLP_MVS/MLP_MVS.vcxproj
+++ b/MLP_MVS/MLP_MVS.vcxproj
@@ -88,6 +88,8 @@
Level3DisabledWIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+
+ Console
@@ -101,6 +103,7 @@
Level3Disabled_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ $(SolutionDir)..\depsConsole
@@ -116,6 +119,8 @@
truetrueWIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+
+ Console
@@ -133,6 +138,7 @@
truetrueNDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ $(SolutionDir)..\depsConsole
@@ -142,6 +148,7 @@
+
diff --git a/MLP_MVS/MLP_MVS.vcxproj.filters b/MLP_MVS/MLP_MVS.vcxproj.filters
index 8822b46..f11f046 100644
--- a/MLP_MVS/MLP_MVS.vcxproj.filters
+++ b/MLP_MVS/MLP_MVS.vcxproj.filters
@@ -30,6 +30,9 @@
Header Files
+
+ Header Files
+
diff --git a/README.md b/README.md
index 26c581b..feaedab 100644
--- a/README.md
+++ b/README.md
@@ -3,4 +3,4 @@
Simple multilayer perceptron c++ implementation.
-David Nogueira, 2016.01.16
+David Nogueira, 2016.03.26
diff --git a/deps/microunit.h b/deps/microunit.h
new file mode 100644
index 0000000..0c5358a
--- /dev/null
+++ b/deps/microunit.h
@@ -0,0 +1,368 @@
+/**
+* @file microunit.h
+* @author Sebastiao Salvador de Miranda (ssm)
+* @brief Tiny library for cpp unit testing. Should work on any c++11 compiler.
+*
+* Simply include this header in your test implementation file (e.g., main.cpp)
+* and call microunit::UnitTester::Run() in the function main(). To register
+* a new unit test case, use the macro UNIT (See the example below). Inside the
+* test case body, you can use the following macros to control the result
+* of the test.
+*
+* @li PASS() : Pass the test and return.
+* @li FAIL() : Fail the test and return.
+* @li ASSERT_TRUE(condition) : If the condition does not hold, fail and return.
+* @li ASSERT_FALSE(condition) : If the condition holds, fail and return.
+*
+* @code{.cpp}
+* UNIT(Test_Two_Plus_Two) {
+* ASSERT_TRUE(2 + 2 == 4);
+* };
+* // ...
+* int main(){
+* return microunit::UnitTester::Run() ? 0 : -1;
+* }
+* @endcode
+*
+* @copyright Copyright (c) 2016, Sebastiao Salvador de Miranda.
+* All rights reserved. See licence below.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are
+* met:
+*
+* (1) Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+*
+* (2) Redistributions in binary form must reproduce the above copyright
+* notice, this list of conditions and the following disclaimer in
+* the documentation and/or other materials provided with the
+* distribution.
+*
+* (3) The name of the author may not be used to
+* endorse or promote products derived from this software without
+* specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef _MICROUNIT_MICROUNIT_H_
+#define _MICROUNIT_MICROUNIT_H_
+#include
+#include