"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "saga-gis/src/tools/statistics/statistics_kriging/variogram_dialog.cpp" between
saga-7.6.2_src.zip and saga-7.6.3_src.zip

About: SAGA (System for Automated Geoscientific Analyses) is a Geographic Information System (GIS) software for geodata processing and analysis. All source codes.

variogram_dialog.cpp  (saga-7.6.2_src):variogram_dialog.cpp  (saga-7.6.3_src)
skipping to change at line 420 skipping to change at line 420
m_nPoints = 0; m_nPoints = 0;
m_Field = 0; m_Field = 0;
m_zField = -2; m_zField = -2;
m_pVariogram = NULL; m_pVariogram = NULL;
m_pModel = NULL; m_pModel = NULL;
m_Distance = -1; m_Distance = -1;
//----------------------------------------------------- //-----------------------------------------------------
wxArrayString Formulas; wxArrayString Formulas;
Formulas.Add("linear" );
Formulas.Add("linear (no nugget)"); Formulas.Add("linear (no nugget)");
Formulas.Add("linear" );
Formulas.Add("power" );
Formulas.Add("square root" ); Formulas.Add("square root" );
Formulas.Add("logarithmic" ); Formulas.Add("logarithmic" );
Formulas.Add("exponential" ); Formulas.Add("exponential" );
Formulas.Add("stable (0 < k < 2)");
Formulas.Add("gaussian" ); Formulas.Add("gaussian" );
Formulas.Add("cubic" );
Formulas.Add("spherical" ); Formulas.Add("spherical" );
//----------------------------------------------------- //-----------------------------------------------------
Add_Button(_TL("Ok" ), wxID_OK); Add_Button(_TL("Ok" ), wxID_OK);
Add_Button(_TL("Cancel"), wxID_CANCEL); Add_Button(_TL("Cancel"), wxID_CANCEL);
Add_Spacer(); m_pSettings = Add_Button (_TL("Settings" ), wxID_ANY); Add_Spacer(); m_pSettings = Add_Button (_TL("Settings" ), wxID_ANY);
Add_Spacer(); m_pPairs = Add_CheckBox(_TL("Number of Pairs" ), false); Add_Spacer(); m_pPairs = Add_CheckBox(_TL("Number of Pairs" ), false);
Add_Spacer(); m_pFormulas = Add_Choice (_TL("Predefined Functions" ), Formulas, 0); Add_Spacer(); m_pFormulas = Add_Choice (_TL("Predefined Functions" ), Formulas, 1);
Add_Spacer(); m_pDistance = Add_Slider (_TL("Function Fitting Range"), 1, 0, 1); Add_Spacer(); m_pDistance = Add_Slider (_TL("Function Fitting Range"), 1, 0, 1);
Add_Spacer(); m_pSummary = Add_TextCtrl(_TL("Summary" ), wxTE_MULTILINE|wxTE_READONLY); Add_Spacer(); m_pSummary = Add_TextCtrl(_TL("Summary" ), wxTE_MULTILINE|wxTE_READONLY);
//----------------------------------------------------- //-----------------------------------------------------
Add_Output( Add_Output(
m_pDiagram = new CVariogram_Diagram(this), m_pDiagram = new CVariogram_Diagram(this),
m_pFormula = new wxTextCtrl(this, wxID_ANY, Get_Formula(0), wxDef aultPosition, wxDefaultSize, wxTE_PROCESS_ENTER), m_pFormula = new wxTextCtrl(this, wxID_ANY, Get_Formula(1), wxDef aultPosition, wxDefaultSize, wxTE_PROCESS_ENTER),
1, 0 1, 0
); );
//----------------------------------------------------- //-----------------------------------------------------
m_Settings.Set_Name(_TL("Variogram Settings")); m_Settings.Set_Name(_TL("Variogram Settings"));
m_Settings.Add_Int ("", "SKIP" , _TL("Skip" ), _TL(""), 1, 1, true); m_Settings.Add_Int ("", "SKIP" , _TL("Skip" ), _TL(""), 1, 1, true);
m_Settings.Add_Double("", "LAGDIST", _TL("Lag Distance" ), _TL(""), 1, 0.0, true); m_Settings.Add_Double("", "LAGDIST", _TL("Lag Distance" ), _TL(""), 1, 0.0, true);
m_Settings.Add_Double("", "MAXDIST", _TL("Maximum Distance"), _TL(""), 1, 0.0, true); m_Settings.Add_Double("", "MAXDIST", _TL("Maximum Distance"), _TL(""), 1, 0.0, true);
m_Settings.Add_String("", "MODEL" , _TL("Model" ), _TL(""), &F ormulas[0]); m_Settings.Add_String("", "MODEL" , _TL("Model" ), _TL(""), &F ormulas[0]);
skipping to change at line 606 skipping to change at line 609
m_pDiagram->Refresh(true); m_pDiagram->Refresh(true);
SG_UI_Process_Set_Okay(); SG_UI_Process_Set_Okay();
} }
//--------------------------------------------------------- //---------------------------------------------------------
const char * CVariogram_Dialog::Get_Formula(int Index) const char * CVariogram_Dialog::Get_Formula(int Index)
{ {
switch( Index ) switch( Index )
{ {
default: return( "a + b * x" default: return( "b * x"
); // linear ); // linear (no nugget)
case 1: return( "b * x" case 1: return( "a + b * x"
); // linear (no nugget) ); // linear
case 2: return( "a + b * sqrt(x)" case 2: return( "a + b * x^k"
); // square root ); // power
case 3: return( "a + b * ln(1 + x)" case 3: return( "a + b * sqrt(x)"
); // logarithmic ); // square root
case 4: return( "n + (s - n) * (1 - exp(-(x / r)); n=n; s=s; r=r" case 4: return( "a + b * ln(1 + x)"
); // exponential ); // logarithmic
case 5: return( "n + (s - n) * (1 - exp(-(x / r)^2)); n=n; s=s; r=r" case 5: return( "n + (s-n) * (1 - exp(-k * x/r)); n=n; s=s; r=r; k=3"
); // gaussian ); // exponential
case 6: return( "n + (s - n) * ifelse(x > r, 1, 1.5 * x / r - 0.5 * x^3 case 6: return( "n + (s-n) * (1 - exp(-(x/r)^k)); n=n; s=s; r=r; k=1"
/ r^3); n=n; s=s; r=r" ); // spherical ); // stable (0 < k <= 2), a.k.a. powered ex
ponential
case 7: return( "n + (s-n) * (1 - exp(-(x/r)^2)); n=n; s=s; r=r"
); // gaussian
case 8: return( "n + (s-n) * ifelse(x>r, 1, 7*d^2 - 8.75*d^3 + 3.5*d^5 -
0.75*d^7); n=n; s=s; r=r; d=(x/r)" ); // cubic
case 9: return( "n + (s-n) * ifelse(x>r, 1, 1.5*d - 0.5*d^3); n=n; s=s;
r=r; d=(x/r)" ); // spherical
} }
} }
//--------------------------------------------------------- //---------------------------------------------------------
CSG_String CVariogram_Dialog::Get_Formula(void) CSG_String CVariogram_Dialog::Get_Formula(void)
{ {
CSG_String_Tokenizer Tokens(m_pFormula->GetValue().wx_str(), ";"); CSG_String_Tokenizer Tokens(m_pFormula->GetValue().wx_str(), ";");
CSG_String Formula; CSG_String Formula;
 End of changes. 7 change blocks. 
17 lines changed or deleted 27 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)