|
|
Go to the documentation of this file.
17 #ifndef L1TriggerGlobalMuonTrigger_L1MuGMTMatrix_h
18 #define L1TriggerGlobalMuonTrigger_L1MuGMTMatrix_h
104 std::unique_ptr<T[]>
p_;
118 : r_size(mat.r_size), c_size(mat.c_size), p_(new
T[r_size * c_size]) {
129 assert(
r >= 0 && r < r_size && c >= 0 &&
c < c_size);
139 assert(
r >= 0 && r < r_size && c >= 0 &&
c < c_size);
149 for (
int i = 0;
i < r_size * c_size; ++
i) {
159 assert(
r >= 0 && r < r_size && c >= 0 &&
c < c_size);
170 assert(
m.c_size == c_size &&
m.r_size == r_size);
172 for (
int i = 0;
i < r_size * c_size; ++
i) {
185 assert(
m.c_size == c_size &&
m.r_size == r_size);
187 for (
int i = 0;
i < r_size * c_size; ++
i) {
199 for (
int i = 0;
i < r_size * c_size; ++
i) {
211 for (
int i = 0;
i < r_size * c_size; ++
i) {
225 for (
int i = 0;
i <
c;
i++) {
228 for (
int i =
c + 1;
i < c_size;
i++) {
232 for (
int j = 0;
j <
r;
j++) {
235 for (
int j =
r + 1;
j < r_size;
j++) {
248 for (
int i = 0;
i < c_size;
i++) {
251 for (
int j = 0;
j < r_size;
j++) {
264 for (
int i = 0;
i < r_size;
i++) {
265 if (this->
get(
i, c) > 0)
278 for (
int i = 0;
i < c_size;
i++) {
279 if (this->
get(r,
i) > 0)
291 for (
int r = 0;
r < r_size;
r++) {
293 for (
int c = 0;
c < c_size;
c++)
int colAny(int c) const
is any element in column c > 0 ? return index or -1
L1MuGMTMatrix & operator*=(const T &s)
scalar multiplication
virtual ~L1MuGMTMatrix()=default
destructor
T & operator()(int r, int c)
L1MuGMTMatrix & operator+=(const L1MuGMTMatrix &m)
matrix addition
L1MuGMTMatrix(int r, int c, T v)
constructor
void set(int r, int c, T v)
set matrix element
int rowAny(int r) const
is any element in row r > 0 ? return index or -1
T const & get(int r, int c) const
Log< level::Info, true > LogVerbatim
bool isMin(int r, int c) const
is the element (r,c) the min. entry in its row and column?
bool isMax(int r, int c) const
is the element (r,c) the max. entry in its row and column?
void print() const
print matrix
L1MuGMTMatrix & operator=(const L1MuGMTMatrix &m)
assignment operator
void reset(T v)
reset all elements