17 #ifndef L1TriggerGlobalMuonTrigger_L1MuGMTMatrix_h 18 #define L1TriggerGlobalMuonTrigger_L1MuGMTMatrix_h 68 void set(
int r,
int c,
T v);
83 bool isMax(
int r,
int c)
const;
86 bool isMin(
int r,
int c)
const;
104 std::unique_ptr<T[]>
p_;
129 assert(r >= 0 && r < r_size && c >= 0 && c <
c_size);
139 assert(r >= 0 && r < r_size && c >= 0 && c <
c_size);
159 assert(r >= 0 && r < r_size && c >= 0 && c <
c_size);
225 for (
int i = 0;
i <
c;
i++) {
226 max = max && (this->
get(
r,
c) > this->
get(r,
i));
229 max = max && (this->
get(
r,
c) >= this->
get(r,
i));
232 for (
int j = 0;
j <
r;
j++) {
233 max = max && (this->
get(
r,
c) > this->
get(
j, c));
236 max = max && (this->
get(
r,
c) >= this->
get(
j, c));
249 min = min && (this->
get(
r,
c) <= this->
get(r,
i));
252 min = min && (this->
get(
r,
c) <= this->
get(
j, c));
265 if (this->
get(
i, c) > 0)
279 if (this->
get(r,
i) > 0)
294 output <<
get(
r,
c) <<
"\t";
L1MuGMTMatrix & operator=(const L1MuGMTMatrix &m)
assignment operator
bool isMax(int r, int c) const
is the element (r,c) the max. entry in its row and column?
L1MuGMTMatrix & operator*=(const T &s)
scalar multiplication
void set(int r, int c, T v)
set matrix element
bool isMin(int r, int c) const
is the element (r,c) the min. entry in its row and column?
int rowAny(int r) const
is any element in row r > 0 ? return index or -1
T & operator()(int r, int c)
void reset(T v)
reset all elements
void print() const
print matrix
L1MuGMTMatrix(int r, int c, T v)
constructor
L1MuGMTMatrix & operator+=(const L1MuGMTMatrix &m)
matrix addition
virtual ~L1MuGMTMatrix()=default
destructor
int colAny(int c) const
is any element in column c > 0 ? return index or -1