MIDAPACK - MIcrowave Data Analysis PACKage  1.1b
Parallel software tools for high performance CMB DA analysis
 All Data Structures Files Functions Variables Typedefs Groups Pages
als.h File Reference

Declaration of subroutines handling sets of indices or sets of values. More...

Go to the source code of this file.

Functions

int card (int *A, int nA)
void merge (int *A, int nA, int *B)
int card_or (int *A1, int n1, int *A2, int n2)
int card_and (int *A1, int n1, int *A2, int n2)
int map_and (int *A1, int n1, int *A2, int n2, int *mapA1andA2)
 Compute map A1 and A2 / A1.
int set_or (int *A1, int n1, int *A2, int n2, int *A1orA2)
int set_and (int *A1, int n1, int *A2, int n2, int *A1andA2)
void subset2map (int *A, int nA, int *subA, int nsubA)

Detailed Description

Declaration of subroutines handling sets of indices or sets of values.

Note:
Copyright (C) 2010 APC CNRS Université Paris Diderot
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 3 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/gpl.html
Author:
Pierre Cargemel
Date:
April 2012

Definition in file als.h.


Function Documentation

int card ( int *  A,
int  nA 
)

Compute cardinal(A) Perform a loop onto elements of a set, counting different elements. The array should be in ascending order with possible redundancy.

Parameters:
nnumber of elemnets in A
Aset of indices
Returns:
number of elements in A

Definition at line 17 of file als.c.

void merge ( int *  A,
int  nA,
int *  B 
)

Merge redundant elements. Fill a new array containing elements of A, merging redundant elements. The array A should be in ascending order with possible redundancy. The array B has to be allocated.

Parameters:
nAnumber of elemnets in A
Aset of indices
Boutput array
Returns:
void

Definition at line 39 of file als.c.

int map_and ( int *  A1,
int  n1,
int *  A2,
int  n2,
int *  mapA1andA2 
)

Compute map A1 and A2 / A1.

Parameters:
n1number of elemnets in A1
A1set of indices
n2number of elemnets in A2
A2set of indices
addressto the set A1andA2
Returns:
number of elements in A1andA2

Definition at line 188 of file als.c.

void subset2map ( int *  A,
int  nA,
int *  subA,
int  nsubA 
)

Transform a subset into a mapper array Parse a subset and replace element by his index in the larger set. A and subA should be two monotony sets in ascending ordered. subA has to belong to A.

Parameters:
Aa set of indices(monotony)
nAnumber of elemnets in A
subAa subset of A(monotony)
nsubAnumber of elemnets in A
Returns:
void

Definition at line 217 of file als.c.