Hitmap 1.3
 All Data Structures Namespaces Files Functions Variables Typedefs Friends Macros Groups Pages
hit_sigP.h
Go to the documentation of this file.
1 // @cond INTERNAL
15 // @endcond
16 
17 /*
18  * <license>
19  *
20  * Hitmap v1.2
21  *
22  * This software is provided to enhance knowledge and encourage progress in the scientific
23  * community. It should be used only for research and educational purposes. Any reproduction
24  * or use for commercial purpose, public redistribution, in source or binary forms, with or
25  * without modifications, is NOT ALLOWED without the previous authorization of the copyright
26  * holder. The origin of this software must not be misrepresented; you must not claim that you
27  * wrote the original software. If you use this software for any purpose (e.g. publication),
28  * a reference to the software package and the authors must be included.
29  *
30  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" AND ANY
31  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
32  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
33  * THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
34  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
35  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
36  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
37  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
38  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39  *
40  * Copyright (c) 2007-2015, Trasgo Group, Universidad de Valladolid.
41  * All rights reserved.
42  *
43  * More information on http://trasgo.infor.uva.es/
44  *
45  * </license>
46 */
47 
48 #ifndef _HitSigP_
49 #define _HitSigP_
50 
51 // @cond INTERNAL
52 #define HIT_SIG_NUM_FIELDS 3
53 
54 /* 2.1. Hit SIGNATURE NULL CONSTANT */
58 #define HIT_SIG_NULL_STATIC { -1, -2, 1 }
59 
60 /* 2.2. Hit SIGNATURE WHOLE CONSTANT */
64 #define HIT_SIG_WHOLE_STATIC { -2, -3, 1 }
65 
66 
67 /* 4. Hit SIGNATURE BLENDING */
85 static inline HitSig hit_sigBlend(HitSig s1, HitSig s2) {
86  HitSig newSig;
87  newSig.begin = s1.begin + s2.begin * s1.stride;
88  newSig.end = s1.begin + s2.end * s1.stride;
89  newSig.stride = s1.stride * s2.stride;
90  return newSig;
91 }
92 
93 // @endcond
94 
95 // @cond OLD
100 static inline HitSig hit_sigExpand(HitSig s1, HitSig s2) {
101  HitSig newSig;
102  newSig.begin = s1.begin + s2.begin;
103  newSig.end = s1.end + s2.end;
104  newSig.stride = s1.stride * s2.stride;
105  return newSig;
106 }
107 // @endcond
108 
109 
110 /* END OF HEADER FILE _HitSigP_ */
111 #endif
Definition: hit_sig.h:79
int begin
Definition: hit_sig.h:80
int end
Definition: hit_sig.h:81
int stride
Definition: hit_sig.h:82