Home | Develop | Download | Contact
testprog1.c
1 /*
2  * testprog1.c
3  *
4  * Copyright 2011 Fernando Pujaico Rivera <fernando.pujaico.rivera@gmail.com>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19  * MA 02110-1301, USA.
20  *
21  */
22 
29 #include <config.h>
30 #include <stdlib.h>
31 #include <pds/pdscm.h>
32 
33 int main(int argc, char** argv)
34 {
35  PdsBVector *X=NULL;
36  PdsVector *Y=NULL;
37  PdsBiAwgn *Channel=NULL;
38 
39  X=pds_bvector_new(20);
40  Y=pds_vector_new(20);
41  Channel=pds_biawgn_new(2.0,0.3);
42  printf("BIAWGN\nA : 2.0\nSigma: 0.3\n\n");
43 
44  pds_bvector_init_rand(X,0.5);
45 
46  pds_biawgn_evaluate(Channel,X,Y);
47 
48  printf("Input :\n");
49  pds_bvector_printf(X);
50  printf("Output:\n");
51  pds_vector_printf(Y);
52 
53  pds_biawgn_free(Channel);
54  pds_vector_free(Y);
55  pds_bvector_free(X);
56 
57  printf("\n");
58 
59  return EXIT_SUCCESS;
60 }
int pds_biawgn_evaluate(PdsBiAwgn *Channel, const PdsBVector *BVectorInput, PdsVector *VectorOutput)
Evalua un vector binario en un canal BIAWGN.
PdsBiAwgn * pds_biawgn_new(PdsCmReal A, PdsCmReal Sigma)
Crea un canal de tipo PdsBiAwgn.
void pds_biawgn_free(PdsBiAwgn *Channel)
Libera un canal de tipo puntero PdsBiAwgn.
La estructura tipo PdsBiAwgn . Esta estructura genera una canal AWGN. Para usar incluir pds/pdsbiawgn...
Definition: pdsbiawgn.h:68

Enlaces de interés

HomePage Bazaar Download Bug report Ayuda Developer Feed