edge.c 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /*************************************/
  2. /* Auteur : Rémi Synave */
  3. /* Date de création : 01/03/07 */
  4. /* Date de modification : 15/03/15 */
  5. /* Version : 0.4 */
  6. /*************************************/
  7. /***************************************************************************/
  8. /* This file is part of a2ri. */
  9. /* */
  10. /* a2ri is free software: you can redistribute it and/or modify it */
  11. /* under the terms of the GNU Lesser General Public License as published */
  12. /* by the Free Software Foundation, either version 3 of the License, or */
  13. /* (at your option) any later version. */
  14. /* */
  15. /* a2ri is distributed in the hope that it will be useful, */
  16. /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
  17. /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
  18. /* GNU Lesser General Public License for more details. */
  19. /* */
  20. /* You should have received a copy of the GNU Lesser General Public */
  21. /* License along with a2ri. */
  22. /* If not, see <http://www.gnu.org/licenses/>. */
  23. /***************************************************************************/
  24. #include "edge.h"
  25. /********** INTERMEDIATE TYPES AND FUNCTIONS **********/
  26. /* Les fonctions intermédiaires sont préfixées de IF */
  27. /* et les types intermédiaires de IT */
  28. /********** MAIN FUNCTIONS **********/
  29. /**
  30. Affichage d'une arete
  31. @param e arête à afficher
  32. @return aucun
  33. */
  34. void
  35. vf_edge_display (
  36. const vf_edge * const e)
  37. {
  38. printf ("Edge --> [vertex %d , vertex %d] , valence : %d\n", e->ve1, e->ve2,
  39. e->nbsharedfaces);
  40. }
  41. /**
  42. Libération de la mémoire
  43. @param e l'arete
  44. @return aucun
  45. **/
  46. void
  47. vf_edge_free (
  48. vf_edge * e)
  49. {
  50. free (e->sharedfaces);
  51. }
  52. /**
  53. Affichage d'une arete
  54. @param e arete à afficher
  55. @return aucun
  56. */
  57. void
  58. vef_edge_display (
  59. const vef_edge * const e)
  60. {
  61. printf ("Edge --> [vertex %d , vertex %d] , valence : %d\n", e->ve1, e->ve2,
  62. e->nbsharedfaces);
  63. }
  64. /**
  65. Libération de la mémoire
  66. @param e l'arete
  67. @return aucun
  68. **/
  69. void
  70. vef_edge_free (
  71. vef_edge * e)
  72. {
  73. free (e->sharedfaces);
  74. }