https://gitlab.opengeosys.org/ogs/ogs.git
Raw File
Tip revision: 0fde67c0ca8818233131619e1c07b8c4be4094a0 authored by Christoph Lehmann on 01 May 2016, 20:11:48 UTC
[TES] chaged reaction taming strategy
Tip revision: 0fde67c
TemplateWeightedPoint.h
/**
 * @file TemplateWeightedPoint.h
 * @date Sep 3, 2013
 * @brief Weighted point class.
 *
 * @copyright
 * Copyright (c) 2012-2016, OpenGeoSys Community (http://www.opengeosys.org)
 *            Distributed under a Modified BSD License.
 *              See accompanying file LICENSE.txt or
 *              http://www.opengeosys.org/LICENSE.txt
 */

#ifndef TEMPLATEWEIGHTEDPOINT_H_
#define TEMPLATEWEIGHTEDPOINT_H_

#include "TemplatePoint.h"

namespace MathLib
{

template <typename FP_T, typename W_T, std::size_t DIM>
class TemplateWeightedPoint : public TemplatePoint<FP_T, DIM>
{
public:
	TemplateWeightedPoint(std::array<FP_T, DIM> const& x, W_T weight) :
		TemplatePoint<FP_T, DIM>(x), _weight(weight)
	{}

	W_T getWeight() const
	{
		return _weight;
	}

private:
	W_T const _weight;
};

typedef TemplateWeightedPoint<double, double, 1> WeightedPoint1D;
typedef TemplateWeightedPoint<double, double, 2> WeightedPoint2D;
typedef TemplateWeightedPoint<double, double, 3> WeightedPoint3D;

} // end namespace MathLib


#endif /* TEMPLATEWEIGHTEDPOINT_H_ */
back to top