############################################################################# ## #W perlist.gi GAP4 Package `RCWA' Stefan Kohl ## ## This file contains code which deals with periodic lists. ## Periodic lists are implemented in the FR package. ## #############################################################################
############################################################################# ## #M Permuted( <perlist>, <g> ) . for a periodic list and an rcwa permut. of Z ## ## Returns the periodic list which is obtained from <perlist> by permuting ## the entries by the rcwa permutation <g>. ## Periodic lists are implemented in the FR package, which therefore needs ## to be loaded in order to use this method. ##
InstallOtherMethod( Permuted, "for a periodic list and an rcwa permutation of Z (RCWA)",
ReturnTrue, [ IsPeriodicList, IsRcwaMappingOfZ ], 0,
function ( perlist, g )
local preperiod, period,
preperiod_bound, preperiod_img, period_bound, period_img,
perlist_img, inv;
preperiod := PrePeriod(perlist);
period := Period(perlist);
if not IsBijective(g) then TryNextMethod(); fi;
if not IsSignPreserving(g) then
Error("`Permuted' for a periodic list <l> and a <g> in RCWA(Z): \n", "<g> must fix the nonnegative integers setwise, as <l> \n", "does not have entries at negative positions.");
TryNextMethod(); fi;
perlist_img := PeriodicList(preperiod_img,period_img);
CompressPeriodicList(perlist_img);
return perlist_img; end );
############################################################################# ## #M Permuted( <perlist>, <f> ) . for periodic list and non-bij. rcwa mapping ## ## Returns the periodic list whose n-th entry is the sum of the n^(f^-1)-th ## entries of <perlist>, where n^(f^-1) denotes the preimage of n under <f>. ## Periodic lists are implemented in the FR package, which therefore needs ## to be loaded in order to use this method. ##
InstallOtherMethod( Permuted, "for a periodic list and an rcwa mapping of Z (RCWA)",
ReturnTrue, [ IsPeriodicList, IsRcwaMappingOfZ ], 0,
function ( perlist, f )
local preperiod, period,
preperiod_bound, preperiod_img, period_bound, period_img,
perlist_img, m, r, i;
preperiod := PrePeriod(perlist);
period := Period(perlist);
if IsBijective(f) or Multiplier(f) = 0then TryNextMethod(); fi;
if not IsSignPreserving(f) then
Error("`Permuted' for a periodic list <l> and an rcwa mapping <f>: \n", "<f> must fix the nonnegative integers setwise, as <l> \n", "does not have entries at negative positions.");
TryNextMethod(); fi;
perlist_img := PeriodicList(preperiod_img,period_img);
CompressPeriodicList(perlist_img);
return perlist_img; end );
############################################################################# ## #M IsSubset( <C>, <perlist> ) . . . . . for a collection and a periodic list ##
InstallMethod( IsSubset, "for a collection and a periodic list (RCWA)", ReturnTrue,
[ IsListOrCollection, IsPeriodicList ], 0,
function ( C, perlist )
return IsSubset(C,PrePeriod(perlist)) and IsSubset(C,Period(perlist)); end );
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.