[chronojump] Fixed 652844 - add reactivity index
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Fixed 652844 - add reactivity index
- Date: Tue, 8 Jan 2013 20:45:25 +0000 (UTC)
commit d9675416c6599f2a5f3fcbf6c53933b32e551d28
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Jan 8 21:43:44 2013 +0100
Fixed 652844 - add reactivity index
src/Makefile.am | 4 +-
src/constants.cs | 2 +
src/gui/stats.cs | 10 ++++++++
src/sqlite/stat.cs | 2 +-
src/statType.cs | 11 +++++++--
src/stats/fv.cs | 2 +-
src/stats/graphs/{ieIub.cs => jumpIndexes.cs} | 21 +++++++++++++----
src/stats/{ieIub.cs => jumpIndexes.cs} | 29 ++++++++++++++++--------
8 files changed, 59 insertions(+), 22 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 27a13cc..f3c65ed 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -114,7 +114,7 @@ FILES = \
stats/rjIndex.cs\
stats/rjPotencyBosco.cs\
stats/rjEvolution.cs\
- stats/ieIub.cs\
+ stats/jumpIndexes.cs\
stats/fv.cs\
stats/potency.cs\
stats/rjAVGSD.cs\
@@ -131,7 +131,7 @@ FILES = \
stats/graphs/rjIndex.cs\
stats/graphs/rjPotencyBosco.cs\
stats/graphs/rjEvolution.cs\
- stats/graphs/ieIub.cs\
+ stats/graphs/jumpIndexes.cs\
stats/graphs/fv.cs\
stats/graphs/potency.cs\
stats/graphs/rjAVGSD.cs\
diff --git a/src/constants.cs b/src/constants.cs
index 16b533e..8cfe481 100644
--- a/src/constants.cs
+++ b/src/constants.cs
@@ -58,6 +58,8 @@ public class Constants
public const string FvIndexFormula = "F/V sj+(100%)/sj *100";
public const string IeIndexFormula = "IE (cmj-sj)/sj *100";
public const string IubIndexFormula = "IUB (abk-cmj)/cmj *100";
+ public const string IRnaIndexFormula = "IRna (djna-cmj)/cmj *100";
+ public const string IRaIndexFormula = "IRa (dja-cmj)/cmj *100";
public const string SubtractionBetweenTests = "Subtraction between tests";
//tests types (dont' use character '-' will be used multimedia file names)
diff --git a/src/gui/stats.cs b/src/gui/stats.cs
index 03225a8..7fc9f38 100644
--- a/src/gui/stats.cs
+++ b/src/gui/stats.cs
@@ -190,6 +190,8 @@ public partial class ChronoJumpWindow {
Constants.FvIndexFormula,
Constants.IeIndexFormula,
Constants.IubIndexFormula,
+ Constants.IRnaIndexFormula,
+ Constants.IRaIndexFormula,
Catalog.GetString(Constants.SubtractionBetweenTests),
Constants.PotencyLewisFormulaShort,
Constants.PotencyHarmanFormulaShort,
@@ -662,6 +664,14 @@ public partial class ChronoJumpWindow {
UtilGtk.ComboUpdate(combo_stats_stat_apply_to, "ABK, CMJ");
combo_stats_stat_apply_to.Active = 0;
combo_stats_stat_apply_to.Sensitive = false;
+ } else if (UtilGtk.ComboGetActive(combo_stats_stat_subtype) == Constants.IRnaIndexFormula) {
+ UtilGtk.ComboUpdate(combo_stats_stat_apply_to, "DJna, CMJ");
+ combo_stats_stat_apply_to.Active = 0;
+ combo_stats_stat_apply_to.Sensitive = false;
+ } else if (UtilGtk.ComboGetActive(combo_stats_stat_subtype) == Constants.IRaIndexFormula) {
+ UtilGtk.ComboUpdate(combo_stats_stat_apply_to, "DJa, CMJ");
+ combo_stats_stat_apply_to.Active = 0;
+ combo_stats_stat_apply_to.Sensitive = false;
} else if (UtilGtk.ComboGetActive(combo_stats_stat_subtype) == Constants.FvIndexFormula) {
//"F/V sj+(100%)/sj *100", //fvIndexFormula
UtilGtk.ComboUpdate(combo_stats_stat_apply_to, "SJl(100%), SJ");
diff --git a/src/sqlite/stat.cs b/src/sqlite/stat.cs
index 361908d..df67f5f 100644
--- a/src/sqlite/stat.cs
+++ b/src/sqlite/stat.cs
@@ -848,7 +848,7 @@ Log.WriteLine(intervalSpeeds);
return myArray;
}
- public static ArrayList IeIub (string sessionString, bool multisession, string ini, string end, string jump1, string jump2, bool showSex)
+ public static ArrayList JumpIndexes (string sessionString, bool multisession, string ini, string end, string jump1, string jump2, bool showSex)
{
string tp = Constants.PersonTable;
diff --git a/src/statType.cs b/src/statType.cs
index d11100c..8c1b891 100644
--- a/src/statType.cs
+++ b/src/statType.cs
@@ -240,6 +240,10 @@ public class StatType {
indexType = "IE";
else if(statisticSubType == Constants.IubIndexFormula)
indexType = "IUB";
+ else if(statisticSubType == Constants.IRnaIndexFormula)
+ indexType = "IRna";
+ else if(statisticSubType == Constants.IRaIndexFormula)
+ indexType = "IRa";
else if(statisticSubType == Constants.FvIndexFormula)
indexType = "F/V";
else if(
@@ -264,11 +268,12 @@ public class StatType {
myStat = new GraphJumpSimpleSubtraction(myStatTypeStruct);
else
myStat = new StatJumpSimpleSubtraction(myStatTypeStruct, treeview_stats);
- } else if(indexType == "IE" || indexType == "IUB") {
+ } else if(indexType == "IE" || indexType == "IUB" ||
+ indexType == "IRna" || indexType == "IRa") {
if(graph)
- myStat = new GraphIeIub (myStatTypeStruct, indexType);
+ myStat = new GraphJumpIndexes (myStatTypeStruct, indexType);
else
- myStat = new StatIeIub(myStatTypeStruct, treeview_stats, indexType);
+ myStat = new StatJumpIndexes(myStatTypeStruct, treeview_stats, indexType);
} else if(indexType == "F/V") {
if(graph)
myStat = new GraphFv (myStatTypeStruct, indexType);
diff --git a/src/stats/fv.cs b/src/stats/fv.cs
index c86eee5..99d8039 100644
--- a/src/stats/fv.cs
+++ b/src/stats/fv.cs
@@ -25,7 +25,7 @@ using System.Collections; //ArrayList
using Mono.Unix;
-public class StatFv : StatIeIub
+public class StatFv : StatJumpIndexes
{
public StatFv () {
}
diff --git a/src/stats/graphs/ieIub.cs b/src/stats/graphs/jumpIndexes.cs
similarity index 88%
rename from src/stats/graphs/ieIub.cs
rename to src/stats/graphs/jumpIndexes.cs
index 512ea25..59bf836 100644
--- a/src/stats/graphs/ieIub.cs
+++ b/src/stats/graphs/jumpIndexes.cs
@@ -27,7 +27,7 @@ using System.Drawing.Imaging;
using Mono.Unix;
-public class GraphIeIub : StatIeIub
+public class GraphJumpIndexes : StatJumpIndexes
{
protected string operation;
@@ -36,21 +36,28 @@ public class GraphIeIub : StatIeIub
GraphSerie serieJump1;
GraphSerie serieJump2;
- public GraphIeIub (StatTypeStruct myStatTypeStruct, string indexType)
+ public GraphJumpIndexes (StatTypeStruct myStatTypeStruct, string indexType)
{
completeConstruction (myStatTypeStruct, treeview);
this.dataColumns = 3; //for Simplesession (index, jump1, jump2)
- this.indexType = indexType; //"IE" or "IUB"
+ this.indexType = indexType; //"IE" or "IUB" or "IR"
if(indexType == "IE") {
jump1="CMJ";
jump2="SJ";
- } else { //IUB
+ } else if(indexType == "IUB") {
jump1="ABK";
jump2="CMJ";
+ } else if(indexType == "IRna") { //reactivity DJna
+ jump1="DJna";
+ jump2="CMJ";
+ } else { //IRa //reactivity
+ jump1="DJa";
+ jump2="CMJ";
}
+
columnsString[0] = "Jumper";
columnsString[1] = indexType;
columnsString[2] = jump1;
@@ -70,8 +77,12 @@ public class GraphIeIub : StatIeIub
//CurrentGraphData.GraphTitle = this.ToString();
if(indexType == "IE")
CurrentGraphData.GraphTitle = Constants.IeIndexFormula;
- else
+ else if(indexType == "IUB")
CurrentGraphData.GraphTitle = Constants.IubIndexFormula;
+ else if(indexType == "IRna")
+ CurrentGraphData.GraphTitle = Constants.IRnaIndexFormula;
+ else // indexType == "IRa"
+ CurrentGraphData.GraphTitle = Constants.IRaIndexFormula;
}
diff --git a/src/stats/ieIub.cs b/src/stats/jumpIndexes.cs
similarity index 79%
rename from src/stats/ieIub.cs
rename to src/stats/jumpIndexes.cs
index 47a8701..628e60a 100644
--- a/src/stats/ieIub.cs
+++ b/src/stats/jumpIndexes.cs
@@ -25,7 +25,7 @@ using System.Collections; //ArrayList
using Mono.Unix;
-public class StatIeIub : Stat
+public class StatJumpIndexes : Stat
{
protected string indexType;
protected string jump1;
@@ -33,26 +33,31 @@ public class StatIeIub : Stat
protected string [] columnsString = new String[4];
//if this is not present i have problems like (No overload for method `xxx' takes `0' arguments) with some inherited classes
- public StatIeIub ()
+ public StatJumpIndexes ()
{
this.showSex = false;
this.statsJumpsType = 0;
this.limit = 0;
}
- public StatIeIub (StatTypeStruct myStatTypeStruct, Gtk.TreeView treeview, string indexType)
+ public StatJumpIndexes (StatTypeStruct myStatTypeStruct, Gtk.TreeView treeview, string indexType)
{
completeConstruction (myStatTypeStruct, treeview);
this.dataColumns = 3; //for simplesession (IE, cmj, sj)
- this.indexType = indexType; //"IE" or "IUB" or "FV"
-
+ this.indexType = indexType; //"IE", "IUB", "IRna", "IRa"
if(indexType == "IE") {
jump1="CMJ";
jump2="SJ";
- } else { //IUB
+ } else if(indexType == "IUB") {
jump1="ABK";
jump2="CMJ";
+ } else if(indexType == "IRna") { //reactivity no arms
+ jump1="DJna";
+ jump2="CMJ";
+ } else { //IRa //reactivity no arms
+ jump1="DJa";
+ jump2="CMJ";
}
if(sessions.Count > 1) {
@@ -85,11 +90,11 @@ public class StatIeIub : Stat
if(statsJumpsType == 3) { //avg of each jumper
if(multisession) {
processDataMultiSession (
- SqliteStat.IeIub(sessionString, multisession, "AVG(", ")", jump1, jump2, showSex),
+ SqliteStat.JumpIndexes(sessionString, multisession, "AVG(", ")", jump1, jump2, showSex),
true, sessions.Count);
} else {
processDataSimpleSession ( cleanDontWanted (
- SqliteStat.IeIub(sessionString, multisession, "AVG(", ")", jump1, jump2, showSex),
+ SqliteStat.JumpIndexes(sessionString, multisession, "AVG(", ")", jump1, jump2, showSex),
statsJumpsType, limit),
true, dataColumns);
}
@@ -97,10 +102,10 @@ public class StatIeIub : Stat
//if more than on session, show only the avg or max of each jump/jumper
//some of this options are never called becase we don't allow radiobutton all and limit (only avg and best)
if(multisession) {
- processDataMultiSession ( SqliteStat.IeIub(sessionString, multisession, "MAX(", ")", jump1, jump2, showSex),
+ processDataMultiSession ( SqliteStat.JumpIndexes(sessionString, multisession, "MAX(", ")", jump1, jump2, showSex),
true, sessions.Count);
} else {
- processDataSimpleSession ( SqliteStat.IeIub(sessionString, multisession, "MAX(", ")", jump1, jump2, showSex),
+ processDataSimpleSession ( SqliteStat.JumpIndexes(sessionString, multisession, "MAX(", ")", jump1, jump2, showSex),
true, dataColumns);
}
}
@@ -133,6 +138,10 @@ public class StatIeIub : Stat
string indexString = "IE [(cmj-sj)/sj * 100]";
if(indexType == "IUB") {
indexString = "IUB [(abk-cmj)/cmj * 100]";
+ } else if(indexType == "IRna") {
+ indexString = "IRna [(djna-cmj)/cmj * 100]";
+ } else if(indexType == "IRa") {
+ indexString = "IRa [(dja-cmj)/cmj * 100]";
}
return string.Format(Catalog.GetString("{0} in index {1} on {2}"), selectedValuesString, indexString, mySessionString);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]