34#include "bertini2/nag_datatypes/common/policies.hpp"
41 namespace nag_datatype {
44 using PointCont = std::deque<T>;
46 using IndexT =
typename PointCont<int>::size_type;
73 template<
typename NumT,
typename SystemT = System,
template<
typename>
class ObjManagementP = policy::Copy >
76 using PointP = ObjManagementP<Vec<NumT>>;
77 using SliceP = ObjManagementP<LinearSlice>;
78 using SystemP = ObjManagementP<SystemT>;
80 using PointContT = PointCont<typename PointP::HeldT>;
83 typename SliceP::HeldT slice_;
84 typename SystemP::HeldT system_;
100 WitnessSet(PointContT
const& pts,
typename SliceP::HeldT
const& slc,
typename SystemP::HeldT
const& sys) :
135 points_.push_back(p);
164 std::stringstream ss;
165 ss <<
"asking for point of index " << ind <<
", outside range [0,"<<
Degree()-1 <<
"].";
166 throw std::runtime_error(ss.str());
169 return PointP::AtGet(points_[ind]);
178 return PointP::AtGet(points_[ind]);
202 return SystemP::AtGet(system_);
221 return SliceP::AtGet(slice_);
Slice an affine or projective space with a LinearSlice today!
Definition slice.hpp:59
unsigned Dimension() const
Get the dimension of the slice.
Definition slice.hpp:188
const SystemT & GetSystem() const
Gets a (const reference to) the system for the witness set.
Definition witness_set.hpp:200
const Vec< NumT > & operator[](IndexT ind) const
Non-range-checked accessor to get points from witness set.
Definition witness_set.hpp:176
void SetSlice(typename SliceP::HeldT const &s)
Sets the slice for the witness set.
Definition witness_set.hpp:211
WitnessSet(PointContT const &pts, typename SliceP::HeldT const &slc, typename SystemP::HeldT const &sys)
Construct a witness set from points, slice, and system.
Definition witness_set.hpp:100
const PointContT & GetPoints() const
Get (a const reference to) the set of points for the witness set.
Definition witness_set.hpp:152
WitnessSet()
The default constructor.
Definition witness_set.hpp:93
const LinearSlice & GetSlice() const
Definition witness_set.hpp:219
bool IsConsistent() const
Check whether the witness set makes sense, in terms of system size, number of variables,...
Definition witness_set.hpp:227
auto Degree() const
Get the degree of the witness set.
Definition witness_set.hpp:113
void SetSystem(typename SystemP::HeldT const &sys)
Definition witness_set.hpp:190
void SetPoints(PointContT const &pts)
Sets the set of points for the witness set.
Definition witness_set.hpp:142
const Vec< NumT > & GetPoint(IndexT ind) const
Range-checked version of point getter for witness set.
Definition witness_set.hpp:160
auto Dimension() const
Query the dimension of the witness set. Fundamentally, this is the dimension of the slice.
Definition witness_set.hpp:123
void AddPoint(typename PointP::HeldT const &p)
Adds a point to the witness set.
Definition witness_set.hpp:133
Bertini extensions of the Eigen linear algebra library.
Provides the bertini::LinearSlice class.
Provides the bertini::System class.