Lines Matching defs:Vector

1 //===------ Math.h - PBQP Vector and Matrix classes -------------*- C++ -*-===//
21 /// \brief PBQP Vector class.
22 class Vector {
27 explicit Vector(unsigned Length)
29 // llvm::dbgs() << "Constructing PBQP::Vector "
34 Vector(unsigned Length, PBQPNum InitVal)
36 // llvm::dbgs() << "Constructing PBQP::Vector "
43 Vector(const Vector &V)
45 // llvm::dbgs() << "Copy-constructing PBQP::Vector " << this
46 // << " from PBQP::Vector " << &V << "\n";
51 Vector(Vector &&V)
58 ~Vector() {
59 // llvm::dbgs() << "Deleting PBQP::Vector " << this << "\n";
64 Vector& operator=(const Vector &V) {
65 // llvm::dbgs() << "Assigning to PBQP::Vector " << this
66 // << " from PBQP::Vector " << &V << "\n";
75 Vector& operator=(Vector &&V) {
85 bool operator==(const Vector &V) const {
101 assert(Index < Length && "Vector element access out of bounds.");
108 assert(Index < Length && "Vector element access out of bounds.");
113 Vector& operator+=(const Vector &V) {
115 assert(Length == V.Length && "Vector length mismatch.");
121 Vector& operator-=(const Vector &V) {
123 assert(Length == V.Length && "Vector length mismatch.");
141 bool operator()(const Vector &A, const Vector &B) {
158 OStream& operator<<(OStream &OS, const Vector &V) {
259 Vector getRowAsVector(unsigned R) const {
261 Vector V(Cols);
268 Vector getColAsVector(unsigned C) const {
270 Vector V(Rows);
313 Vector diagonalize() const {
316 Vector V(Rows);
417 class MDVector : public Vector {
419 MDVector(const Vector &v) : Vector(v), md(*this) { }
420 MDVector(Vector &&v) : Vector(std::move(v)), md(*this) { }