Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/pkg/guava/src/leon/src/   (GAP Algebra Version 4.15.1©)  Datei vom 1.1.2025 mit Größe 1 kB image not shown  

Quelle  oldcopy.c

  Sprache: C
 

/* File oldcopy.c.  Contains functions that copy an object to an already-
   existing object of the same type. */


#include <stddef.h>
#include <string.h>

#include "group.h"
#include "storage.h"

CHECK( oldcop)


/*-------------------------- copyPermutation ------------------------------*/

/* This function copies one permutation to another.  The destination permutation
   must already exist; its invImage field may be allocated or freed, depending
   on whether the source permutation has an invImage field.  The level and
   essential fields are not copied. */


void copyPermutation(
   const Permutation *const fromPerm,
   Permutation *const toPerm)
{
   Unsigned pt;

   strcpy ( toPerm->name, fromPerm->name);
   toPerm->degree = fromPerm->degree;
   for ( pt = 1 ; pt <= fromPerm->degree ; ++pt )
      toPerm->image[pt] = fromPerm->image[pt];
   if ( fromPerm->invImage ) {
      if ( fromPerm->invImage == fromPerm->image ) {
         if ( toPerm->invImage && toPerm->invImage != toPerm->image )
            freeIntArrayDegree( toPerm->invImage);
         toPerm->invImage = toPerm->image;
      }
      else {
         if ( !toPerm->invImage || toPerm->invImage == toPerm->image )
            toPerm->invImage = allocIntArrayDegree();
         for ( pt = 1 ; pt <= fromPerm->degree ; ++pt )
            toPerm->invImage[pt] = fromPerm->invImage[pt];
      }
   }
   else if ( toPerm->invImage ) {
      freeIntArrayDegree( toPerm->invImage);
      toPerm->invImage = NULL;
   }
}

Messung V0.5 in Prozent
C=93 H=80 G=86

¤ Dauer der Verarbeitung: 0.14 Sekunden  (vorverarbeitet am  2026-06-26) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

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 und die Messung sind noch experimentell.