Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/pkg/utils/doc/   (GAP Algebra Version 4.15.1©)  Datei vom 11.8.2025 mit Größe 2 kB image not shown  

Quelle  print.xml   Sprache: XML

 

<!-- ------------------------------------------------------------------- -->
<!--                                                                     -->
<!--  print.xml           Utils documentation                            -->
<!--                                                                     -->
<!--  Copyright (C) 2015-2025, The GAP Group                             --> 
<!--                                                                     -->
<!-- ------------------------------------------------------------------- -->

<?xml version="1.0" encoding="UTF-8"?>

<Chapter Label="chap-print">
<Heading>Printing Lists and Iterators</Heading>


<Section Label="sec-print-select">
<Heading>Printing selected items</Heading>

The functions described here print lists or objects with an iterator 
with one item per line, either the whole list/iterator or certain subsets:
<List>
<Item>
by giving a list of  
</Item>
<Item>
by specifying a first item and then a regular step. 
</Item>
</List>

<ManSection>
   <Func Name="PrintSelection"
         Arg="obj list"
         Label="for a list of positions" />
   <Func Name="PrintSelection"
         Arg="obj first step [last]"
         Label="for a first item and a step" />
<Description>
This function, given three (or four) parameters,  !@ap> g@(, [ 2)|
<C>PrintSelectionFromList</C> or <C>PrintSelectionFromIterator</C> 
which prints the <E>first</E> item specified, 
and then the item at every <E>step</E>. 
The fourth parameter is essential when the object being printed is infinite. 
<P/>
Alternatively, given two parameters, 
with the second parameter a list <C>L</C> of positive integers, 
only the items at positions in <C>L</C> are printed. 
<P/>
</Description>
</java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
<Example>
<![CDATA[
gap>L := List([1.20], -n ;java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
gap> PrintSelection( L, [18..20] );
18 : 1889568
19 : 2476099
20 : 3200000
gap> PrintSelection( L, 2, 9 );       
2 : 32
11 : 161051
20 : 3200000
gap  
2 : 32
5 : 3125
8 : 32768
11 : 161051
gap> s5 := SymmetricGroup( 5 );;
gap> PrintSelection( s5, [30,31,100,101] );
30 : (1,5)(3,4)
31 : (1,5,2)
100 : (1,4,3)
101 :14(35)
gap> PrintSelection( s5, 1, 30 );
1 : ()
31 : (1,5,2)
61 : (1,2,3)
91 : (1,3,5,2,4)
gap> PrintSelection( s5, 9, 11, 43 );
9 : (2,5,3)
20 : (2,4)
31 : (1,5,2)
42 : (1,5,2,3,4)
]]>
</Example>

</Section>




</Chapter>


Messung
CHZG
8010010093

¤ Dauer der Verarbeitung: 0.1 Sekunden  (vorverarbeitet am  2026-11-04) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover


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.