StructuredC.h
Go to the documentation of this file.
1 /* Copyright 2020-2021 CNRS-AIST JRL */
2 
3 #pragma once
4 
5 #include <iosfwd>
6 #include <vector>
7 
8 #include <jrl-qp/api.h>
9 #include <jrl-qp/defs.h>
10 
12 
14 {
16 {
17 public:
18  enum class Type
19  {
20  Diagonal,
21  };
22 
23  StructuredC();
24 
25  StructuredC(std::vector<MatrixConstRef> C);
26 
27  StructuredC & operator=(const StructuredC & other);
28 
29  const MatrixConstRef & diag(int i) const;
30  // const MatrixConstRef & offDiag(int i) const;
31  int nbVar() const;
32  int nbVar(int i) const;
33  int nbCstr() const;
34  int nbCstr(int i) const;
35  internal::SingleNZSegmentVector col(int i) const;
36 
37  void transposeMult(VectorRef out, const VectorConstRef & in) const;
38 
39  friend std::ostream & operator<<(std::ostream & os, const StructuredC & /*C*/)
40  {
41  // TODO
42  return os;
43  }
44 
45 private:
46  Type type_;
47  std::vector<MatrixConstRef> diag_;
48  // std::vector<MatrixConstRef> offDiag_;
49  std::vector<int> cumulNbVar_;
50  std::vector<int> cumulNbCstr_;
51  std::vector<int> toBlock_;
52  int nbVar_;
53  int nbCstr_;
54 };
55 } // namespace jrl::qp::structured
jrl::qp::structured::StructuredC::Type
Type
Definition: StructuredC.h:18
jrl::qp::VectorConstRef
Eigen::Ref< const Eigen::VectorXd > VectorConstRef
Definition: defs.h:13
SingleNZSegmentVector.h
jrl::qp::structured::StructuredC::operator<<
friend std::ostream & operator<<(std::ostream &os, const StructuredC &)
Definition: StructuredC.h:39
jrl::qp::MatrixConstRef
Eigen::Ref< const Eigen::MatrixXd > MatrixConstRef
Definition: defs.h:11
jrl::qp::structured::StructuredC
Definition: StructuredC.h:15
jrl::qp::structured
Definition: StructuredC.h:13
JRLQP_DLLAPI
#define JRLQP_DLLAPI
Definition: api.h:35
jrl::qp::internal::SingleNZSegmentVector
Definition: SingleNZSegmentVector.h:10
defs.h
jrl::qp::VectorRef
Eigen::Ref< Eigen::VectorXd > VectorRef
Definition: defs.h:14
api.h