Sort all includes in src/gromacs
[alexxy/gromacs.git] / src / gromacs / analysisdata / dataframe.h
index 1205fe98e0c00100206c41bd41c87ececa8b5e9e..5502063042bdf347db0e104c194bfd92ea28c926 100644 (file)
@@ -1,10 +1,10 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013, by the GROMACS development team, led by
- * David van der Spoel, Berk Hess, Erik Lindahl, and including many
- * others, as listed in the AUTHORS file in the top-level source
- * directory and at http://www.gromacs.org.
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
  *
  * GROMACS is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
 
 #include <vector>
 
-#include "../legacyheaders/types/simple.h"
-
-#include "../utility/arrayref.h"
-#include "../utility/flags.h"
-#include "../utility/gmxassert.h"
+#include "gromacs/utility/arrayref.h"
+#include "gromacs/utility/flags.h"
+#include "gromacs/utility/gmxassert.h"
+#include "gromacs/utility/real.h"
 
 namespace gmx
 {
@@ -297,25 +296,29 @@ class AnalysisDataPointSetInfo
     public:
         //! Construct point set data object with the given values.
         AnalysisDataPointSetInfo(int valueOffset, int valueCount,
-                                 int firstColumn)
+                                 int dataSetIndex, int firstColumn)
             : valueOffset_(valueOffset), valueCount_(valueCount),
-              firstColumn_(firstColumn)
+              dataSetIndex_(dataSetIndex), firstColumn_(firstColumn)
         {
-            GMX_ASSERT(valueOffset >= 0, "Negative value offsets are invalid");
-            GMX_ASSERT(valueCount  >= 0, "Negative value counts are invalid");
-            GMX_ASSERT(firstColumn >= 0, "Negative column indices are invalid");
+            GMX_ASSERT(valueOffset  >= 0, "Negative value offsets are invalid");
+            GMX_ASSERT(valueCount   >= 0, "Negative value counts are invalid");
+            GMX_ASSERT(dataSetIndex >= 0, "Negative data set indices are invalid");
+            GMX_ASSERT(firstColumn  >= 0, "Negative column indices are invalid");
         }
 
         //! Returns the offset of the first value in the referenced value array.
         int valueOffset() const { return valueOffset_; }
         //! Returns the number of values in this point set.
         int valueCount() const { return valueCount_; }
+        //! Returns the data set index for this point set.
+        int dataSetIndex() const { return dataSetIndex_; }
         //! Returns the index of the first column in this point set.
         int firstColumn() const { return firstColumn_; }
 
     private:
         int                     valueOffset_;
         int                     valueCount_;
+        int                     dataSetIndex_;
         int                     firstColumn_;
 };
 
@@ -415,6 +418,11 @@ class AnalysisDataPointSetRef
         {
             return header_.dx();
         }
+        //! Returns zero-based index of the dataset that this set is part of.
+        int dataSetIndex() const
+        {
+            return dataSetIndex_;
+        }
         //! Returns zero-based index of the first column included in this set.
         int firstColumn() const
         {
@@ -487,6 +495,7 @@ class AnalysisDataPointSetRef
 
     private:
         AnalysisDataFrameHeader header_;
+        int                     dataSetIndex_;
         int                     firstColumn_;
         AnalysisDataValuesRef   values_;
 };