My Project  debian-1:4.1.1-p2+ds-4build2
Functions
find_perm.h File Reference
#include "coeffs/coeffs.h"
#include "polys/matpol.h"

Go to the source code of this file.

Functions

matrix ma_ApplyPermForMap (const matrix to_map, const ring preimage_r, const ideal image, const ring image_r, const nMapFunc nMap)
 helper function for maMapIdeal mapping ideal/matrix/module for the case of a permutation: maps the ideal/module/matrix to_map via the map from preimage_r with image image and mapping of coefficients via nMap (or return NULL) More...
 

Function Documentation

◆ ma_ApplyPermForMap()

matrix ma_ApplyPermForMap ( const matrix  to_map,
const ring  preimage_r,
const ideal  image,
const ring  image_r,
const nMapFunc  nMap 
)

helper function for maMapIdeal mapping ideal/matrix/module for the case of a permutation: maps the ideal/module/matrix to_map via the map from preimage_r with image image and mapping of coefficients via nMap (or return NULL)

Definition at line 70 of file find_perm.cc.

72 {
73  if ((rPar(preimage_r)>0)||(rPar(image_r)>0)) return NULL; /* not applicable */
74  int *perm=find_perm_for_map(preimage_r,image_r,image);
75  if (perm==NULL) return NULL; /* could not find permutation */
76  int C=to_map->cols();
77  int R=to_map->rows();
78  matrix m=mpNew(R,C);
79  for (int i=R*C-1;i>=0;i--)
80  {
81  if (to_map->m[i]!=NULL)
82  {
83  m->m[i]=p_PermPoly(to_map->m[i],perm,preimage_r,image_r, nMap,NULL,0);
84  p_Test(m->m[i],image_r);
85  }
86  }
87  ideal ii=(ideal)m;
88  ii->rank=((ideal)to_map)->rank;
89  omFreeSize(perm,(preimage_r->N+1)*sizeof(int));
90  return m;
91 }
ip_smatrix
Definition: matpol.h:14
find_perm_for_map
static int * find_perm_for_map(const ring preimage_r, const ring image_r, const ideal image)
Definition: find_perm.cc:20
ip_smatrix::cols
int & cols()
Definition: matpol.h:26
p_Test
#define p_Test(p, r)
Definition: p_polys.h:163
i
int i
Definition: cfEzgcd.cc:125
p_PermPoly
poly p_PermPoly(poly p, const int *perm, const ring oldRing, const ring dst, nMapFunc nMap, const int *par_perm, int OldPar, BOOLEAN use_mult)
Definition: p_polys.cc:4014
ip_smatrix::rows
int & rows()
Definition: matpol.h:25
omFreeSize
#define omFreeSize(addr, size)
Definition: omAllocDecl.h:260
ip_smatrix::m
poly * m
Definition: matpol.h:20
rPar
static int rPar(const ring r)
(r->cf->P)
Definition: ring.h:590
mpNew
matrix mpNew(int r, int c)
create a r x c zero-matrix
Definition: matpol.cc:36
m
int m
Definition: cfEzgcd.cc:121
NULL
#define NULL
Definition: omList.c:10
R
#define R
Definition: sirandom.c:26