Main Lemma Repository
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

TEMSurveyLineRecordData.h 3.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. /* This file is part of Lemma, a geophysical modelling and inversion API.
  2. * More information is available at http://lemmasoftware.org
  3. */
  4. /* This Source Code Form is subject to the terms of the Mozilla Public
  5. * License, v. 2.0. If a copy of the MPL was not distributed with this
  6. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  7. */
  8. /**
  9. * @file
  10. * @date 03/03/2015 10:29:01
  11. * @version $Id$
  12. * @author Trevor Irons (ti)
  13. * @email Trevor.Irons@xri-geo.com
  14. * @copyright Copyright (c) 2015, XRI Geophysics, LLC
  15. * @copyright Copyright (c) 2015, Trevor Irons
  16. */
  17. #ifndef TEMSURVEYLINERECORDDATA_INC
  18. #define TEMSURVEYLINERECORDDATA_INC
  19. #include "LemmaObject.h"
  20. namespace Lemma {
  21. /**
  22. \brief
  23. \details
  24. */
  25. class TEMSurveyLineRecordData : public LemmaObject {
  26. friend std::ostream &operator<<(std::ostream &stream,
  27. const TEMSurveyLineRecordData &ob);
  28. friend class TEMSurveyLineRecord;
  29. public:
  30. // ==================== LIFECYCLE =======================
  31. /**
  32. * @copybrief LemmaObject::New()
  33. * @copydetails LemmaObject::New()
  34. */
  35. static TEMSurveyLineRecordData* New();
  36. /** Provides deep copy
  37. */
  38. TEMSurveyLineRecordData* Clone();
  39. /**
  40. * @copybrief LemmaObject::Delete()
  41. * @copydetails LemmaObject::Delete()
  42. */
  43. void Delete();
  44. // ==================== OPERATORS =======================
  45. /**
  46. * Records can be added
  47. */
  48. TEMSurveyLineRecordData* operator + (const TEMSurveyLineRecordData&);
  49. /**
  50. * Records can be subtracted
  51. */
  52. TEMSurveyLineRecordData* operator - (const TEMSurveyLineRecordData&);
  53. /**
  54. * Records can be added in place
  55. */
  56. void operator += (const TEMSurveyLineRecordData&);
  57. /**
  58. * Records can be subtracted in place
  59. */
  60. void operator -= (const TEMSurveyLineRecordData&);
  61. // ==================== OPERATIONS =======================
  62. // ==================== ACCESS =======================
  63. /** @return a VectorXr of the merged data (all moments)
  64. * @todo TODO this is actually a copy? is this intended?
  65. */
  66. VectorXr GetCombinedData();
  67. /** @return a VectorXr of the combined gate centres alligned with
  68. * GetCombinedData();
  69. */
  70. VectorXr GetCombinedGateCentres();
  71. // ==================== INQUIRY =======================
  72. #ifdef HAVE_YAMLCPP
  73. /**
  74. * Uses YAML to serialize this object.
  75. * @return a YAML::Node
  76. */
  77. YAML::Node Serialize() const;
  78. /**
  79. * Constructs an object from a YAML::Node.
  80. */
  81. static TEMSurveyLineRecordData* DeSerialize(const YAML::Node& node);
  82. #endif
  83. protected:
  84. // ==================== LIFECYCLE =======================
  85. /** Default protected constructor, use New */
  86. TEMSurveyLineRecordData (const std::string& name);
  87. #ifdef HAVE_YAMLCPP
  88. /** Protected DeDerializing constructor, use factory DeSerialize method*/
  89. TEMSurveyLineRecordData (const YAML::Node& node);
  90. #endif
  91. /** Default protected destructor, use Delete */
  92. ~TEMSurveyLineRecordData ();
  93. /**
  94. * @copybrief LemmaObject::Release()
  95. * @copydetails LemmaObject::Release()
  96. */
  97. void Release();
  98. private:
  99. // ==================== DATA MEMBERS =========================
  100. std::vector<VectorXr> DataSeries;
  101. std::vector<VectorXr> GateCentres;
  102. }; // ----- end of class TEMSurveyLineRecordData -----
  103. } // ----- end of Lemma name -----
  104. #endif // ----- #ifndef TEMSURVEYLINERECORDDATA_INC -----