Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  expand_commutator.c   Sprache: C

 
/****************************************************************************
**
*A  expand_commutator.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 "constants.h"

/* routines for handling expansion of commutator relations */

static void add(int *x, int *y);
static void invert_symbols(int *x);
static int length(int *s);

/* expand the commutator of s and t */

void expand_commutator(int *s, int t)
{
   int a[MAXWORD];
   register int i;

   for (i = 0; i < MAXWORD; ++i)
      a[i] = s[i];

   invert_symbols(s);
   s[length(s)] = -t;
   add(s, a);
   s[length(s)] = t;
}

/* find the number of non-zero entries in s */

static int length(int *s)
{
   register int i = 0;

   while (i < MAXWORD && s[i] != 0)
      ++i;

   return i;
}

/* concatenate y with x */

static void add(int *x, int *y)
{
   register int j;
   int i = length(x);

   for (j = 0; j < MAXWORD && y[j] != 0; ++j)
      x[i + j] = y[j];
}

/* construct the group-theoretic inverse of the symbols in x */

static void invert_symbols(int *x)
{
   register int i = length(x) - 1;
   register int j;
   int temp, mid;

   mid = i / 2;

   for (j = 0; j <= mid; ++j) {
      temp = x[j];
      x[j] = -x[i - j];
      x[i - j] = -temp;
   }
}

Messung V0.5
C=96 H=99 G=97

¤ Dauer der Verarbeitung: 0.10 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 und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge