17 #ifndef L1TriggerGlobalMuonTrigger_L1MuGMTMatrix_h 18 #define L1TriggerGlobalMuonTrigger_L1MuGMTMatrix_h 70 void set(
int r,
int c,
T v);
85 bool isMax(
int r,
int c)
const;
88 bool isMin(
int r,
int c)
const;
115 for (
int i = 0;
i <
r;
i++) {
135 for (
int j = 0; j <
c_size; j++)
p[
i][j] = mat.
p[
i][j];
162 assert( r >= 0 && r < r_size && c >= 0 && c <
c_size );
175 assert( r >= 0 && r < r_size && c >= 0 && c <
c_size );
201 assert( r >= 0 && r < r_size && c >= 0 && c <
c_size );
284 for (
int i = 0;
i <
c;
i++) {
285 max = max && ( this->
p[
r][
c] > this->
p[
r][
i]);
288 max = max && ( this->
p[
r][
c] >= this->p[
r][
i]);
291 for (
int j = 0; j <
r; j++) {
292 max = max && ( this->
p[
r][
c] > this->
p[j][
c]);
294 for (
int j = r+1; j <
r_size; j++) {
295 max = max && ( this->
p[
r][
c] >= this->p[j][
c]);
311 min = min && ( this->
p[
r][
c] <= this->p[
r][
i]);
313 for (
int j = 0; j <
r_size; j++) {
314 min = min && ( this->
p[
r][
c] <= this->p[j][
c]);
330 if ( this->
p[
i][c] > 0 ) stat =
i;
346 if ( this->
p[r][
i] > 0 ) stat =
i;
362 for (
int c = 0;
c <
c_size;
c++) output <<
p[
r][
c] <<
"\t";
L1MuGMTMatrix & operator=(const L1MuGMTMatrix &m)
assignment operator
virtual ~L1MuGMTMatrix()
destructor
void init(T v=0)
initialize matrix
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)
L1MuGMTMatrix(int r, int c)
constructor
void print() const
print matrix
L1MuGMTMatrix & operator+=(const L1MuGMTMatrix &m)
matrix addition
int colAny(int c) const
is any element in column c > 0 ? return index or -1