Jpp  16.0.2
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
FITL1DT Namespace Reference

Functions

JMatrixNS removeRowColumn (const JMatrixNS &A, int C)
 
vector< double > dotprod (const JMatrixNS &A, const vector< double > &x)
 

Function Documentation

JMatrixNS FITL1DT::removeRowColumn ( const JMatrixNS A,
int  C 
)

Definition at line 26 of file JFitL1dt.cc.

26  {
27  const int N = A.size() - 1;
28  JMatrixNS ret(N);
29  int k = 0;
30  for (int i = 0; i < N+1; i++) {
31  if (i == C) {
32  continue;
33  }
34  int l = 0;
35  for (int j = 0; j < N+1; j++) {
36  if (j == C) {
37  continue;
38  }
39  ret.at(k,l) = A.at(i,j);
40  l++;
41  }
42  k++;
43  }
44  return ret;
45  }
then fatal No hydrophone data file $HYDROPHONE_TXT fi sort gr k
double at(size_t row, size_t col) const
Get matrix element.
Definition: JMatrixND.hh:264
then JShowerPostfit f $INPUT_FILE o $OUTPUT_FILE N
static const double C
Physics constants.
N x N symmetric matrix.
Definition: JMatrixNS.hh:27
size_t size() const
Get dimension of matrix.
Definition: JMatrixND.hh:157
int j
Definition: JPolint.hh:682
vector<double> FITL1DT::dotprod ( const JMatrixNS A,
const vector< double > &  x 
)

Definition at line 48 of file JFitL1dt.cc.

48  {
49  if (A.size() != x.size()) {
50  cout << "Can not evaluate dot product: dimensions dont match" << endl;
51  return vector<double>(0, 0.0);
52  }
53  vector<double> ret(A.size(), 0.0);
54  for (unsigned int i = 0; i < A.size(); ++i) {
55  for (unsigned int j = 0; j < A.size(); ++j) {
56  ret.at(i) += A.at(i,j) * x.at(j);
57  }
58  }
59  return ret;
60  }
double at(size_t row, size_t col) const
Get matrix element.
Definition: JMatrixND.hh:264
size_t size() const
Get dimension of matrix.
Definition: JMatrixND.hh:157
int j
Definition: JPolint.hh:682