Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/pkg/anupq/src/   (Algebra von RWTH Aachen Version 4.15.1©)  Datei vom 28.7.2025 mit Größe 1 kB image not shown  

Quelle  compact.c   Sprache: C

 
/****************************************************************************
**
*A  compact.c                   ANUPQ source                   Eamonn O'Brien
**
*Y  Copyright 1995-2001,  Lehrstuhl D fuer Mathematik,  RWTH Aachen,  Germany
*Y  Copyright 1995-2001,  School of Mathematical Sciences, ANU,     Australia
**
*/


#include "pq_defs.h"
#include "pcp_vars.h"

/* compact the group tables from pcp->gspace onwards */

void compact(struct pcp_vars *pcp)
{
   register int *y = y_address;

   register int i;
   register int j;
   register int p1;
   register int new_address;
   register int bound;

   new_address = pcp->gspace - 1;
   i = pcp->gspace;

#ifndef DEBUG
   if (pcp->fullop || pcp->diagn)
#endif
      text(2, pcp->lused, pcp->structure, 0, 0);

   while (i < pcp->lused) {

      /* the next block is currently allocated */
      if (y[i] > 0) {
         p1 = y[i];
         ++new_address;
         y[p1] = -new_address;
         y[new_address] = y[i];
         bound = y[i + 1] + 1;
         for (j = 1; j <= bound; ++j)
            y[++new_address] = y[++i];
         ++i;
      } else if (y[i] == 0)
         /* this block is currently deallocated */
         i += y[i + 1] + 2;
      else
         /* this block consists only of the header block of length 1 */
         ++i;
   }

   pcp->lused = new_address;

#ifndef DEBUG
   if (pcp->fullop || pcp->diagn)
#endif
      PRINT("After compaction Lused = %d\n", pcp->lused);

   return;
}

83%


¤ Dauer der Verarbeitung: 0.16 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.