Home | Develop | Download | Contact
pdslvector.h
1 /*
2  * pdslvector.h
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 
32 #ifndef __PDSLVECTOR_H__
33 #define __PDSLVECTOR_H__
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
39 #include <stdio.h>
40 #include <stdlib.h>
41 #include <pds/pdsraglobal.h>
42 
43 
44 
53 #ifndef PDS_OK
54 
58  #define PDS_OK 1
59 #endif
60 
61 #ifndef PDS_WRONG
62 
66  #define PDS_WRONG 0
67 #endif
68 
70 
79 {
80  // Dirección del nodo anterios de la lista.
82  // Vector real asociado; dentro;del nodo.
84  // Direccion del nodo siguiente en la lista.
86 };
87 
88 
89 
101 
102 
104 
118 
119 
127 
128 
136 
137 
146 
147 
155 
156 
164 
166 
179 
180 
188 
189 
191 
204 
205 
213 
215 
220 #ifdef __cplusplus
221 }
222 #endif
223 
224 #endif
225 
226 
unsigned int PdsRaNatural
Definition: pdsraglobal.h:59
int pds_list_vector_printf(const PdsListVector *L)
Imprime en pantalla los datos de un nodo de tipo puntero PdsListVector.
PdsListVector * pds_list_vector_new(void)
Crea una lista de tipo PdsListVector vacia.
int pds_list_vector_shift(PdsListVector **L)
Quita el elemento inicial;mas antiguo; de la lista, si no hay elementos retorna PDS_WRONG.
void pds_list_vector_free(PdsListVector *L)
Libera una lista entera de tipo puntero PdsListVector.
Estructura de tipo PdsVector .
Definition: pdsvector.h:80
int pds_list_vector_push(PdsListVector **Lprev, PdsRaNatural N)
Agrega un elemento a la cima de la lista.
int pds_list_vector_top(PdsListVector **L)
Busca el elemento final; superior; de la lista.
PdsVector * V
Definition: pdslvector.h:83
void pds_list_vector_destroy(PdsListVector **L)
Libera una lista de tipo puntero PdsListVector, y limpia el puntero con NULL.
PdsListVector * AddPrev
Definition: pdslvector.h:81
int pds_list_vector_pop(PdsListVector **L)
Quita un elemento de la lista. Si no hay elementos retorna PDS_WRONG.
int pds_list_vector_bottom(PdsListVector **L)
Busca el elemento inicial; inferior; de la lista.
La estructura tipo PdsListVector . Esta estructura genera una doblemente enlazada lista de vectores...
Definition: pdslvector.h:78
PdsListVector * AddNext
Definition: pdslvector.h:85
int pds_list_vector_all_printf(const PdsListVector *L)
Imprime en pantalla todos los datos de la lista.
int pds_list_vector_unshift(PdsListVector **Lnext, PdsRaNatural N)
Agrega un elemento al inicio de la lista.

Enlaces de interés

HomePage Bazaar Download Bug report Ayuda Developer Feed