Home | Develop | Download | Contact
 Todo Estructuras de Datos Funciones Variables 'typedefs' Grupos Páginas
testprograma.c
1 /*
2  * testprograma.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 
31 #include <config.h>
32 #include <stdlib.h>
33 #include <pds/pdsca.h>
34 
35 int main(int argc, char** argv)
36 {
37  PdsCVector *V=NULL;
38  PdsComplex C;
39 
40  C.Real=1;
41  C.Imag=3.4;
42 
43  V=pds_cvector_new(10);
44 
46 
47  pds_cvector_set_real(V,2,3);
48  pds_cvector_set_imag(V,2,-2);
49 
51 
53 
54  return EXIT_SUCCESS;
55 }
PdsCVector * pds_cvector_new(PdsCaNatural Nel)
Crea un vector de tipo PdsCVector e inicia con cero todos los elementos.
La estructura tipo PdsCVector . Esta estructura genera un vector de Nel elementos. Para usar incluir pds/pdsca.h.
Definition: pdscvector.h:68
int pds_cvector_init_complex(PdsCVector *Vector, PdsComplex Val)
Inicia el vector de tipo puntero PdsCVector. Vector=Val.
void pds_cvector_free(PdsCVector *Vector)
Libera un vector de tipo puntero PdsCVector.
int pds_cvector_set_imag(PdsCVector *Vector, PdsCaNatural x, PdsCaReal m)
Escribe el valor m solo en la parte imaginaria de la posición (x) del vector Vector. (x) inicia con (0).
int pds_cvector_printf(const PdsCVector *Vector)
Imprime en pantalla un vector de tipo puntero PdsCVector.
int pds_cvector_set_real(PdsCVector *Vector, PdsCaNatural x, PdsCaReal m)
Escribe el valor m solo en la parte real de la posición (x) del vector Vector. (x) inicia con (0)...

Enlaces de interés

HomePage Bazaar Download Bug report Ayuda Developer Feed