Skip to content

Commit

Permalink
Merge pull request #200 from PauloCarvalhoRJ/FK_with_ThirdPartyLib
Browse files Browse the repository at this point in the history
Factorial Kriging
  • Loading branch information
PauloCarvalhoRJ authored Sep 19, 2018
2 parents 80e53d8 + 1e47ed5 commit 1948145
Show file tree
Hide file tree
Showing 103 changed files with 3,510 additions and 572 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# These files are kept by Qt Creator and does not actually belong to the source file set.
GammaRay.pro.user*
libCalcScripting.pro.user*

# Temporary file created by Microsoft Word when editing GammaRayManual.docx
docs/~*.docx
Expand Down
17 changes: 17 additions & 0 deletions GammaRay.pri
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#This is the configuration that must be shared amongst the .pro files
#used to build the different binaries (executables, libraries, ...)

CONFIG( release, debug|release ) {
DESTDIR = ../GammaRay_release/dist
OBJECTS_DIR = ../GammaRay_release/obj
MOC_DIR = ../GammaRay_release/moc
RCC_DIR = ../GammaRay_release/rcc
UI_DIR = ../GammaRay_release/ui
} else {
DESTDIR = ../GammaRay_debug/dist
OBJECTS_DIR = ../GammaRay_debug/obj
MOC_DIR = ../GammaRay_debug/moc
RCC_DIR = ../GammaRay_debug/rcc
UI_DIR = ../GammaRay_debug/ui
}
CONFIG += c++11
63 changes: 39 additions & 24 deletions GammaRay.pro
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,24 @@ greaterThan(QT_MAJOR_VERSION, 5): QT += widgets
TARGET = GammaRay
TEMPLATE = app

CONFIG( release, debug|release ) {
DESTDIR = ../GammaRay_release/dist
OBJECTS_DIR = ../GammaRay_release/obj
MOC_DIR = ../GammaRay_release/moc
RCC_DIR = ../GammaRay_release/rcc
UI_DIR = ../GammaRay_release/ui
} else {
DESTDIR = ../GammaRay_debug/dist
OBJECTS_DIR = ../GammaRay_debug/obj
MOC_DIR = ../GammaRay_debug/moc
RCC_DIR = ../GammaRay_debug/rcc
UI_DIR = ../GammaRay_debug/ui
}
CONFIG += c++11
include(GammaRay.pri)

#This prevents "string table overflow" errors when compiling .cpp's that include exprtk.hpp in debug mode
QMAKE_CXXFLAGS_DEBUG += -O1
#========for the separate calculator scripting library built with libCalcScripting.pro========
LIBPATH += $$DESTDIR
CALCSCRIPTING_LIB_NAME = CalcScripting
win32{
CALCSCRIPTING_LIB_NAME = CalcScripting1
}
LIBS += -l$$CALCSCRIPTING_LIB_NAME
#============================================================================================

#QMAKE_CXXFLAGS += -m64
win32 {
#-Wa,-mbig-obj not currently supported (or possibly not necessary) by GCC 4.8 (Linus)
#necessary for compiling svd.cpp in debug mode.
QMAKE_CXXFLAGS_DEBUG += -Wa,-mbig-obj
#Don't know why -Wa,-mbig-obj sticks... removing it for release mode.
QMAKE_CXXFLAGS_RELEASE -= -Wa,-mbig-obj
}

SOURCES += main.cpp\
mainwindow.cpp \
Expand Down Expand Up @@ -207,14 +206,20 @@ SOURCES += main.cpp\
imagejockey/widgets/ijvariableselector.cpp \
imagejockey/widgets/grcompass.cpp \
imagejockey/widgets/ijgridviewerwidget.cpp \
calculator/calcscripting.cpp \
calculator/icalcpropertycollection.cpp \
calculator/calculatordialog.cpp \
calculator/icalcproperty.cpp \
calculator/calclinenumberarea.cpp \
calculator/calccodeeditor.cpp \
imagejockey/vardecomp/variographicdecompositiondialog.cpp \
imagejockey/widgets/ijquick3dviewer.cpp
imagejockey/widgets/ijquick3dviewer.cpp \
dialogs/factorialkrigingdialog.cpp \
geostats/fkestimation.cpp \
geostats/searchstrategy.cpp \
geostats/fkestimationrunner.cpp \
geostats/datacell.cpp \
geostats/searchneighborhood.cpp \
geostats/searchellipsoid.cpp \
geostats/pointsetcell.cpp \
geostats/indexedspatiallocation.cpp

HEADERS += mainwindow.h \
domain/project.h \
Expand Down Expand Up @@ -403,7 +408,16 @@ HEADERS += mainwindow.h \
calculator/calclinenumberarea.h \
calculator/calccodeeditor.h \
imagejockey/vardecomp/variographicdecompositiondialog.h \
imagejockey/widgets/ijquick3dviewer.h
imagejockey/widgets/ijquick3dviewer.h \
dialogs/factorialkrigingdialog.h \
geostats/fkestimation.h \
geostats/searchstrategy.h \
geostats/fkestimationrunner.h \
geostats/datacell.h \
geostats/searchneighborhood.h \
geostats/searchellipsoid.h \
geostats/pointsetcell.h \
geostats/indexedspatiallocation.h


FORMS += mainwindow.ui \
Expand Down Expand Up @@ -478,7 +492,8 @@ FORMS += mainwindow.ui \
imagejockey/widgets/ijgridviewerwidget.ui \
calculator/calculatordialog.ui \
imagejockey/vardecomp/variographicdecompositiondialog.ui \
imagejockey/widgets/ijquick3dviewer.ui
imagejockey/widgets/ijquick3dviewer.ui \
dialogs/factorialkrigingdialog.ui

#==================== The Boost include path.==================
_BOOST_INCLUDE = $$(BOOST_INCLUDE)
Expand Down Expand Up @@ -582,7 +597,7 @@ win32 {
# The application version
# Don't forget to update the Util::importSettingsFromPreviousVersion() method to
# enable the import of registry/user settings of previous versions.
VERSION = 4.5.1
VERSION = 4.7

# Define a preprocessor macro so we can get the application version in application code.
DEFINES += APP_VERSION=\\\"$$VERSION\\\"
Expand Down
2 changes: 1 addition & 1 deletion algorithms/CART/cart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ double CART::getGiniImpurity(const std::vector<long> &rowIDs, int columnIndex) c
//get the number of rows
long numberOfRows = rowIDs.size();
//assumes total impurity
double factor = 1.0d;
double factor = 1.0;
//for each pair DataValue/count
std::vector<std::pair<DataValue, long> >::iterator it = valuesCounts.begin();
for(; it != valuesCounts.end(); ++it){
Expand Down
2 changes: 1 addition & 1 deletion algorithms/ialgorithmdatasource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void IAlgorithmDataSource::initZeroes(long rowCount, int columnCount)
reserve( rowCount, columnCount );
for( long iRow = 0; iRow < rowCount; ++iRow )
for( int iCol = 0; iCol < columnCount; ++iCol)
setDataValue( iRow, iCol, DataValue(0.0d));
setDataValue( iRow, iCol, DataValue(0.0));
}

void IAlgorithmDataSource::setDataFrom(int rowIndexInThisDataSource,
Expand Down
4 changes: 2 additions & 2 deletions algorithms/randomforest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ void RandomForest::regress(long rowIdOutput, int dependentVariableColumnID, Data
DecisionTree *tree = *itTree;

//regress the data using one decision tree
DataValue mean(0.0d);
DataValue mean(0.0);
double percent;
tree->regress( rowIdOutput, dependentVariableColumnID, mean, percent );

Expand All @@ -220,7 +220,7 @@ void RandomForest::regress(long rowIdOutput, int dependentVariableColumnID, Data

//compute the weighted mean
long count = estimatesFound.size();
DataValue total( 0.0d );
DataValue total( 0.0 );
for( long iEstimate = 0; iEstimate < count; ++iEstimate ){
total = total + estimatesFound[iEstimate] * percentsFound[iEstimate];
}
Expand Down
4 changes: 3 additions & 1 deletion calculator/calcscripting.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

#include <QString>

#include "libCalcScriptingDefs.h"

//ATTENTION: Compile in a 64-bit tool set since exprtk.hpp is too large resulting in
// "too many section" excpetion with MinGW 32-bit. Also it is necessary
// to enable the -Wa,-mbig-obj for MinGW or /bigobj for MSVC.
Expand All @@ -13,7 +15,7 @@ class ICalcPropertyCollection;
/**
* @brief The Scripting class encapsulates the scripting engine (currently the ExprTK header library).
*/
class CalcScripting
class CALCSCRIPT_LIB_COMMON_DLLSPEC CalcScripting
{
public:

Expand Down
4 changes: 3 additions & 1 deletion calculator/icalcproperty.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
#include <QString>
#include <QIcon>

#include "libCalcScriptingDefs.h"

/**
* The ICalcProperty class represents a variable or attribute, a series of values.
*/
class ICalcProperty
class CALCSCRIPT_LIB_COMMON_DLLSPEC ICalcProperty
{
public:
ICalcProperty();
Expand Down
4 changes: 3 additions & 1 deletion calculator/icalcpropertycollection.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@

#include <QString>

#include "libCalcScriptingDefs.h"

class ICalcProperty;

/**
* The ICalcPropertyCollection interface should be implemented by classes to be usable in the Calculator.
* ICalcPropertyCollection represents tabular data, that is, properties as columns with equal number of values each.
*/
class ICalcPropertyCollection
class CALCSCRIPT_LIB_COMMON_DLLSPEC ICalcPropertyCollection
{
public:
ICalcPropertyCollection();
Expand Down
5 changes: 5 additions & 0 deletions calculator/libCalcScriptingDefs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#if defined IS_COMPILING_CALCSCRIPT_LIB
#define CALCSCRIPT_LIB_COMMON_DLLSPEC Q_DECL_EXPORT
#else
#define CALCSCRIPT_LIB_COMMON_DLLSPEC Q_DECL_IMPORT
#endif
Loading

0 comments on commit 1948145

Please sign in to comment.