33#include <boost/serialization/deque.hpp>
34#include <boost/serialization/split_member.hpp>
76 template<
typename NumT,
typename SystemT = System,
template<
typename>
class ObjManagementP =
policy::Copy >
79 using PointP = ObjManagementP<Vec<NumT>>;
80 using SliceP = ObjManagementP<Slice>;
81 using SystemP = ObjManagementP<SystemT>;
86 typename SliceP::HeldT slice_;
87 typename SystemP::HeldT system_;
103 WitnessSet(PointContT
const& pts,
typename SliceP::HeldT
const& slc,
typename SystemP::HeldT
const& sys) :
138 points_.push_back(p);
167 std::stringstream ss;
168 ss <<
"asking for point of index " << ind <<
", outside range [0,"<<
Degree()-1 <<
"].";
169 throw std::runtime_error(ss.str());
172 return PointP::AtGet(points_[ind]);
181 return PointP::AtGet(points_[ind]);
205 return SystemP::AtGet(system_);
224 return SliceP::AtGet(slice_);
238 friend class boost::serialization::access;
245 template <
typename Archive>
246 void save(Archive& ar,
const unsigned )
const
253 template <
typename Archive>
254 void load(Archive& ar,
const unsigned )
268 BOOST_SERIALIZATION_SPLIT_MEMBER()
A linear slice of affine or projective space: a stack of linear forms, M [x ; 1].
Definition slice.hpp:68
unsigned Dimension() const
The dimension of the slice – the number of linear forms.
Definition slice.hpp:372
const Slice & GetSlice() const
Gets (a const reference to) the slice for the witness set.
Definition witness_set.hpp:222
const SystemT & GetSystem() const
Gets a (const reference to) the system for the witness set.
Definition witness_set.hpp:203
const Vec< NumT > & operator[](IndexT ind) const
Non-range-checked accessor to get points from witness set.
Definition witness_set.hpp:179
void SetSlice(typename SliceP::HeldT const &s)
Sets the slice for the witness set.
Definition witness_set.hpp:214
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:103
const PointContT & GetPoints() const
Get (a const reference to) the set of points for the witness set.
Definition witness_set.hpp:155
WitnessSet()
The default constructor.
Definition witness_set.hpp:96
bool IsConsistent() const
Check whether the witness set makes sense, in terms of system size, number of variables,...
Definition witness_set.hpp:230
auto Degree() const
Get the degree of the witness set.
Definition witness_set.hpp:116
void SetSystem(typename SystemP::HeldT const &sys)
Sets the system for the witness set.
Definition witness_set.hpp:193
void SetPoints(PointContT const &pts)
Sets the set of points for the witness set.
Definition witness_set.hpp:145
const Vec< NumT > & GetPoint(IndexT ind) const
Range-checked version of point getter for witness set.
Definition witness_set.hpp:163
auto Dimension() const
Query the dimension of the witness set.
Definition witness_set.hpp:126
void AddPoint(typename PointP::HeldT const &p)
Adds a point to the witness set.
Definition witness_set.hpp:136
Bertini extensions of the Eigen linear algebra library.
Definition policies.hpp:9
typename PointCont< int >::size_type IndexT
The index type for point containers.
Definition witness_set.hpp:49
std::deque< T > PointCont
The container type used to hold points (a deque).
Definition witness_set.hpp:47
Definition algorithm_builder.hpp:36
Eigen::Matrix< NumT, Eigen::Dynamic, 1 > Vec
A dynamically-sized column vector of NumT.
Definition eigen_extensions.hpp:296
Provides the bertini::Slice class – a linear slice of affine or projective space.
Storage policy that holds objects by value (a copy).
Definition policies.hpp:16
Provides the bertini::System class.