IAP GITLAB

Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • AirShowerPhysics/corsika
  • rulrich/corsika
  • AAAlvesJr/corsika
  • Andre/corsika
  • arrabito/corsika
  • Nikos/corsika
  • olheiser73/corsika
  • AirShowerPhysics/papers/corsika
  • pranav/corsika
9 results
Show changes
Showing
with 349 additions and 162 deletions
/* /*
* (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
* *
* This software is distributed under the terms of the GNU General Public * This software is distributed under the terms of the 3-clause BSD license.
* Licence version 3 (GPL Version 3). See file LICENSE for a full version of * See file LICENSE for a full version of the license.
* the license.
*/ */
#pragma once #pragma once
......
/* /*
* (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
* *
* This software is distributed under the terms of the GNU General Public * This software is distributed under the terms of the 3-clause BSD license.
* Licence version 3 (GPL Version 3). See file LICENSE for a full version of * See file LICENSE for a full version of the license.
* the license.
*/ */
#pragma once #pragma once
......
/* /*
* (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu * (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu
* *
* This software is distributed under the terms of the GNU General Public * This software is distributed under the terms of the 3-clause BSD license.
* Licence version 3 (GPL Version 3). See file LICENSE for a full version of * See file LICENSE for a full version of the license.
* the license.
*/ */
#pragma once #pragma once
#include <deque> #include <deque>
#include <corsika/framework/geometry/Point.hpp>
namespace corsika { namespace corsika {
Path::Path(Point const& point) { points_.push_front(point); } inline Path::Path(Point const& point) { points_.push_front(point); }
Path::Path(std::deque<Point> const& points) inline Path::Path(std::deque<Point> const& points)
: points_(points) { : points_(points) {
int dequesize_ = points.size(); int dequesize_ = points.size();
if (dequesize_ == 0 || dequesize_ == 1) { if (dequesize_ == 0 || dequesize_ == 1) {
...@@ -51,15 +49,21 @@ namespace corsika { ...@@ -51,15 +49,21 @@ namespace corsika {
inline LengthType Path::getLength() const { return length_; } inline LengthType Path::getLength() const { return length_; }
inline Point Path::getStart() const { return points_.front(); } inline Point const& Path::getStart() const { return points_.front(); }
inline Point Path::getEnd() const { return points_.back(); } inline Point const& Path::getEnd() const { return points_.back(); }
inline Point Path::getPoint(std::size_t const index) const { return points_.at(index); } inline Point const& Path::getPoint(std::size_t const index) const {
return points_.at(index);
}
inline Path::const_iterator Path::begin() const { return points_.cbegin(); }
inline Path::const_iterator Path::end() const { return points_.cend(); }
inline auto Path::begin() { return points_.begin(); } inline Path::iterator Path::begin() { return points_.begin(); }
inline auto Path::end() { return points_.end(); } inline Path::iterator Path::end() { return points_.end(); }
inline int Path::getNSegments() const { return points_.size() - 1; } inline int Path::getNSegments() const { return points_.size() - 1; }
......
This diff is collapsed.
This diff is collapsed.