The Fib multimedia system
Fib is a system for storing multimedia data (like images or films).
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
cDomainVectorBasis.h
Go to the documentation of this file.
1
/**
2
* @class cDomainVectorBasis
3
* file name: cDomainVectorBasis.h
4
* @author Betti Oesterholz
5
* @date 06.07.2009
6
* @mail webmaster@BioKom.info
7
*
8
* System: C++
9
*
10
* This class represents a vector domains.
11
* Copyright (C) @c LGPL3 2009 Betti Oesterholz
12
*
13
* This program is free software: you can redistribute it and/or modify
14
* it under the terms of the GNU Lesser General Public License (LGPL) as
15
* published by the Free Software Foundation, either version 3 of the
16
* License, or any later version.
17
*
18
* This program is distributed in the hope that it will be useful,
19
* but WITHOUT ANY WARRANTY; without even the implied warranty of
20
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
* GNU Lesser General Public License for more details.
22
*
23
* You should have received a copy of the GNU Lesser General Public License
24
* along with this program. If not, see <http://www.gnu.org/licenses/>.
25
*
26
*
27
* This file contains the basis class of all vector Fib domains.
28
* It's not possible to create instances from this class.
29
*
30
*/
31
/*
32
History:
33
06.07.2009 Oesterholz created
34
01.12.2011 Oesterholz method isInBoundaries() added;
35
Elements can have any domain type -> cDomainSingle to cDomain
36
*/
37
38
#ifndef ___C_DOMAIN_VECTOR_BASIS_H__
39
#define ___C_DOMAIN_VECTOR_BASIS_H__
40
41
42
#include "version.h"
43
#include "
fibDatatyps.h
"
44
#include "
cFibVector.h
"
45
46
#include "
cDomain.h
"
47
48
namespace
fib{
49
50
51
class
cDomainVectorBasis
:
public
cDomain
{
52
53
public
:
54
55
/**
56
* @return true if the object represents a scalar domain, else false
57
*/
58
virtual
bool
isScalar
()
const
;
59
60
/**
61
* @return true if the object represents a vector domain, else false
62
*/
63
virtual
bool
isVector
()
const
;
64
65
66
/**
67
* This method checks if the given vector is an element of the
68
* domain. If the value dValue is an element of the
69
* domain true is returned, else false.
70
*
71
* @param fibVector the vector for which to check, if it is an element
72
* of the domain
73
* @return if the vector fibVector is an element of the domain true
74
* is returned, else false
75
*/
76
virtual
bool
isElement
(
const
cFibVector
&fibVector )
const
= 0;
77
78
/**
79
* This method checks if the given vector is inside the domain
80
* boundaries. If the value dValue is inside of the domain boundaries
81
* true is returned, else false.
82
* A vector is inside of the vector domain boudaries, if all its
83
* elements are inside ther correspondending element domain boundaries.
84
*
85
* @param fibVector the vector for which to check, if it is inside of
86
* the domain boundaries
87
* @return if the vector fibVector is inside of the domain boundaries
88
* true is returned, else false
89
*/
90
virtual
bool
isInBoundaries
(
const
cFibVector
&fibVector )
const
= 0;
91
92
/**
93
* This method round the given value vector to an vector in the
94
* domain of this object.
95
* The rounded vector will be the vector, wich elements have the minimal
96
* summed distance to the elements of the given vector fibVector. If more
97
* than one such vector exists, the vector wich first n elements have
98
* the minimal summed distance to the first n elements of the given
99
* vector fibVector. Wher n is first the number of elements in the
100
* vector, and than is decrased to 1 in steps of 1. If again more such
101
* vectors exists, the one with the smalest k elements is choosen, wher
102
* k begins with 1 and is incrased to the number of vectorelements in
103
* the input vector.
104
* ATTENTION: The returned vector will not be deleted automaticly, you
105
* have to delete it.
106
*
107
* @param fibVector the vector which should be rounded
108
* @return the rounded vector of fibVector
109
*/
110
virtual
cFibVector
*
round
(
cFibVector
&fibVector )
const
= 0;
111
112
113
/**
114
* This method returns the number of elements in the vectors of the
115
* domain.
116
*
117
* @return the number of elements in the vectors of the domain
118
*/
119
virtual
unsignedIntFib
getNumberOfElements
()
const
= 0;
120
121
/**
122
* This method returns the domain of the iNumberOfElement'th element in
123
* the vectors of the domain.
124
*
125
* @param iNumberOfElement the elementnumber for which the domain is to
126
* return
127
* @return domain of the iNumberOfElement'th element in the vectors of
128
* the domain
129
*/
130
virtual
cDomain
*
getElementDomain
(
131
const
unsignedIntFib
iNumberOfElement ) = 0;
132
133
/**
134
* This method returns the domain of the iNumberOfElement'th element in
135
* the vectors of the domain.
136
*
137
* @param iNumberOfElement the elementnumber for which the domain is to
138
* return
139
* @return domain of the iNumberOfElement'th element in the vectors of
140
* the domain
141
*/
142
virtual
const
cDomain
*
getElementDomain
(
143
const
unsignedIntFib
iNumberOfElement )
const
= 0;
144
145
/**
146
* This Method clones this object.
147
*
148
* @return a clone of this object
149
*/
150
virtual
cDomainVectorBasis
*
clone
()
const
= 0;
151
152
153
/**
154
* This function creates creates a good domain wich contains all the
155
* vectors of the given list liVectors .
156
* A domain is better than an other domain, if it takes less storage bits
157
* to store the numbers and the domain.
158
* Beware: You have to care that the returned domain is deleted. (if
159
* one was returned)
160
*
161
* @param liVectors the list with the vectors, for which a domain is to create
162
* @return a new domain which contains all the given vectors liVectors
163
*/
164
static
cDomainVectorBasis
*
createGoodDomain
(
const
list< cFibVector * > & liVectors );
165
166
};
//end class cDomainVectorBasis
167
168
169
}
//end namespace fib
170
171
#endif
172
fib
incl
cDomainVectorBasis.h
Generated on Thu Feb 14 2013 14:06:56 for The Fib multimedia system by
1.8.1