|
||||
File indexing completed on 2025-01-18 09:28:08
0001 // -*- C++ -*- 0002 // AID-GENERATED 0003 // ========================================================================= 0004 // This class was generated by AID - Abstract Interface Definition 0005 // DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it. 0006 // ========================================================================= 0007 #ifndef AIDA_IDATAPOINTSET_H 0008 #define AIDA_IDATAPOINTSET_H 1 0009 0010 // This file is part of the AIDA library 0011 // Copyright (C) 2002 by the AIDA team. All rights reserved. 0012 // This library is free software and under the terms of the 0013 // GNU Library General Public License described in the LGPL.txt 0014 0015 #include <string> 0016 #include <vector> 0017 0018 namespace AIDA { 0019 0020 class IAnnotation; 0021 class IDataPoint; 0022 0023 /** 0024 * Basic user-level interface class for holding and managing 0025 * a single set of "data points". 0026 * 0027 * @author The AIDA team (http://aida.freehep.org/) 0028 * 0029 */ 0030 0031 class IDataPointSet { 0032 0033 public: 0034 /// Destructor. 0035 virtual ~IDataPointSet() { /* nop */; } 0036 0037 /** 0038 * Get the IAnnotation of the IDataPointSet. 0039 * @return The IAnnotation. 0040 * 0041 */ 0042 virtual IAnnotation & annotation() = 0; 0043 0044 virtual const IAnnotation & annotation() const = 0; 0045 0046 /** 0047 * Get the title of the IDataPointSet. 0048 * @return The title. 0049 * 0050 */ 0051 virtual std::string title() const = 0; 0052 0053 /** 0054 * Set the title of the IDataPointSet. 0055 * @param title The new title. 0056 * @return false If the title cannot be set. 0057 * 0058 */ 0059 virtual bool setTitle(const std::string & title) = 0; 0060 0061 /** 0062 * Get the dimension of the IDataPoints that can be stored in the set. 0063 * @return The dimension of the IDataPoints storable in the set. 0064 * 0065 */ 0066 virtual int dimension() const = 0; 0067 0068 /** 0069 * Remove all the IDataPoints in the set. 0070 * After this the IDataPointSet is as just created. 0071 * 0072 */ 0073 virtual void clear() = 0; 0074 0075 /** 0076 * Get the current size of the IDataPointSet, i.e. the number 0077 * of IDataPoints contained in the set. 0078 * @return The size of the IDataPointSet. 0079 * 0080 */ 0081 virtual int size() const = 0; 0082 0083 /** 0084 * Get the IDataPoint at a give index in the set. 0085 * @param index The IDataPoint index. 0086 * @return The corresponding IDataPoint. 0087 * 0088 */ 0089 virtual IDataPoint * point(int index) = 0; 0090 0091 /** 0092 * Set the values and errors of a given coordinate all at once. 0093 * If this method is called on an empty IDataPointSet, a number of points equal 0094 * to the size of the arrays provided is created; if the IDataPointSet is not empty 0095 * the dimension of the array must match with the size of the IDataPointSet. 0096 * @param coord The coordinate's index 0097 * @param val The array of the values for the given coordinate 0098 * @param err The array with the symmetric errors. 0099 * @return false if an illegal coordinate is provided or if 0100 * there is a mismatch between the size of the array and the size of the IDataPointSet. 0101 * 0102 */ 0103 virtual bool setCoordinate(int coord, const std::vector<double> & val, const std::vector<double> & err) = 0; 0104 0105 /** 0106 * Set the values and errors of a given coordinate all at once. 0107 * If this method is called on an empty IDataPointSet, a number of points equal 0108 * to the size of the arrays provided is created; if the IDataPointSet is not empty 0109 * the dimension of the array must match with the size of the IDataPointSet. 0110 * @param coord The coordinate's index 0111 * @param val The array of the values for the given coordinate 0112 * @param errp The array with the plus errors. 0113 * @param errm The array with the minus errors. 0114 * @return false if an illegal coordinate is provided or if 0115 * there is a mismatch between the size of the array and the size of the IDataPointSet. 0116 * 0117 */ 0118 virtual bool setCoordinate(int coord, const std::vector<double> & val, const std::vector<double> & errp, const std::vector<double> & errm) = 0; 0119 0120 virtual const IDataPoint * point(int index) const = 0; 0121 0122 /** 0123 * Add a new empty IDataPoint at the end of the set. 0124 * @return The newly added point. 0125 * 0126 */ 0127 virtual IDataPoint * addPoint() = 0; 0128 0129 /** 0130 * Add a copy of an IDataPoint at the end of the set. 0131 * @param point The IDataPoint to be added. 0132 * @return false If the point has the wrong dimension or 0133 * if the point cannot be added. 0134 * 0135 */ 0136 virtual bool addPoint(const IDataPoint & point) = 0; 0137 0138 /** 0139 * Remove the IDataPoint at a given index. 0140 * @param index The index of the IDataPoint to be removed. 0141 * @return false If the index is < 0 or >= size(). 0142 * 0143 */ 0144 virtual bool removePoint(int index) = 0; 0145 0146 /** 0147 * Get the lower value for a give axis. 0148 * @param coord The coordinate of the axis. 0149 * @return The lower edge of the corresponding axis. 0150 * If coord < 0 or coord >= dimension(), or if the set is empty NaN is returned. 0151 * 0152 */ 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 virtual double lowerExtent(int coord) const = 0; 0164 0165 /** 0166 * Get the upper value for a give axis. 0167 * @param coord The coordinate of the axis. 0168 * @return The upper edge of the corresponding axis. 0169 * If coord < 0 or coord >= dimension(), or if the set is empty NaN is returned. 0170 * 0171 */ 0172 0173 0174 0175 0176 0177 0178 0179 0180 0181 0182 virtual double upperExtent(int coord) const = 0; 0183 0184 /** 0185 * Scales the values and the errors of all the measurements 0186 * of each point by a given factor. 0187 * @param scaleFactor The scale factor. 0188 * @return false If an illegal scaleFactor is provided. 0189 * 0190 */ 0191 virtual bool scale(double scaleFactor) = 0; 0192 0193 /** 0194 * Scales the values of all the measurements 0195 * of each point by a given factor. 0196 * @param scaleFactor The scale factor. 0197 * @return false If an illegal scaleFactor is provided. 0198 * 0199 */ 0200 virtual bool scaleValues(double scaleFactor) = 0; 0201 0202 /** 0203 * Scales the errors of all the measurements 0204 * of each point by a given factor. 0205 * @param scaleFactor The scale factor. 0206 * @return false If an illegal scaleFactor is provided. 0207 * 0208 */ 0209 virtual bool scaleErrors(double scaleFactor) = 0; 0210 0211 /** 0212 * See IManagedObject for a description. 0213 * @param className The name of the class to cast on. 0214 * @return The right pointer. Return 0 if failure. 0215 */ 0216 virtual void * cast(const std::string & className) const = 0; 0217 }; // class 0218 } // namespace AIDA 0219 #endif /* ifndef AIDA_IDATAPOINTSET_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |