Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Seitosh
Seitosh
Commits
99ad57c8
Commit
99ad57c8
authored
Feb 08, 2019
by
thomas.forbriger
Browse files
croposp [WP]: start to introduce triples
parent
61188689
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/ts/croposp/Makefile
View file @
99ad57c8
...
...
@@ -136,6 +136,7 @@ LIBTSIOXX=-ltsioxx -ltsxx -ltfxx $(LIBDATRWXX) -lgsl -lgslcblas
OBJFILES
=
pairs_adapter.o
\
pairs.o
\
triples.o
\
patsubst.o
\
report_collection.o
\
write_name_series.o
...
...
src/ts/croposp/croposp.h
View file @
99ad57c8
...
...
@@ -96,11 +96,31 @@ namespace croposp {
const
unsigned
int
&
l
)
const
;
unsigned
int
size
()
const
;
unsigned
int
pairs
()
const
;
unsigned
int
triples
()
const
;
private:
unsigned
int
Mn
;
};
// class Pairs
/* ---------------------------------------------------------------------- */
/*! provide index values to triples
*
* cycle through a complete set
*/
class
Triples
{
public:
Triples
(
const
Pairs
&
p
,
const
bool
&
pairs_first
=
false
);
unsigned
int
operator
()(
const
unsigned
int
&
k
,
const
unsigned
int
&
l
)
const
;
bool
swap
(
const
unsigned
int
&
k
,
const
unsigned
int
&
l
)
const
;
unsigned
int
size
()
const
;
unsigned
int
pairs
()
const
;
unsigned
int
triples
()
const
;
private:
Pairs
Mpairs
;
bool
Mpairs_first
;
};
// class Triples
/* ====================================================================== */
/* functions
* ---------
...
...
src/ts/croposp/triples.cc
0 → 100644
View file @
99ad57c8
/*! \file triples.cc
* \brief Handle index values for triples of time series (implementation)
*
* ----------------------------------------------------------------------------
*
* \author Thomas Forbriger
* \date 08/02/2019
*
* Handle index values for triples of time series (implementation)
*
* Copyright (c) 2019 by Thomas Forbriger (BFO Schiltach)
*
* ----
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* ----
*
* REVISIONS and CHANGES
* - 08/02/2019 V1.0 Thomas Forbriger
*
* ============================================================================
*/
#define TF_TRIPLES_CC_VERSION \
"TF_TRIPLES_CC V1.0"
#include "croposp.h"
#include<tfxx/error.h>
/*! \class croposp::Triples
*
* Handle triples of signals.
*
* The constructor takes the Pairs to be handled in the triples
* Index values must be positive (zero or larger than zero) and smaller than
* the size of the collection.
*/
namespace
croposp
{
Triples
::
Triples
(
const
Pairs
&
p
,
const
bool
&
pairs_first
=
false
)
:
Mpairs
(
p
),
Mpairs_first
(
pairs_first
)
{
TFXX_assert
(
this
->
size
()
>
2
,
"collection must have at least three elements to make a triple"
);
}
/* ---------------------------------------------------------------------- */
}
// namespace croposp
/* ----- END OF triples.cc ----- */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment