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

Quelle  chap2_mj.html   Sprache: HTML

 
 products/Sources/formale Sprachen/GAP/pkg/utils/doc/chap2_mj.html


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

<
<DOCTYPE  "-//W3C//DTD XHTML 1.0 Strict//EN"

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<script type="text/javascript"
  src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<title>GAP (Utils) - Chapter 2: Printing Lists and Iterators</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="generator" content="GAPDoc2HTML" />
<link rel="stylesheet" type="text/css" href="manual.css" />
<script src="manual.js" type="text/javascript"></script>
<script type="text/javascript">overwriteStyle();</script>
</head>
<body class="chap2"  onload="jscontent()">


<div class="chlinktop"><span class="chlink1">Goto Chapter: </span><a href="chap0_mj.html">Top</a>  <a href="chap1_mj.html">1</a>  <a href="chap2_mj.html">2</a>  <a href="chap3_mj.html">3</a>  <a href="
Goto Chapter: Top 1 2 3 meta="generator"contentGAPDoc2HTML

<p id="mathjaxlink" class="pcenter"><a href="chap2.html">[MathJax off]</script="manual." type=text">/script>
<p<head>
<div class="ChapSects"><a href="chap2_mj.html#X83686EE47E4D4F66">2 <span class="Heading">Printing Lists and Iterators</span></a>
<div ="ContSect">span="tocline"><span ="nocss"> /span>ahref.html"2 span class=Heading">Printing  items<span/>
<>
<div class="ContSSBlock">
<span class="ContSS"><br />
</div></div>
</div>

<<iv="ChapSects">< href="chap2_mjhtml#X83686EE47E4D4F66">2 <spanclass"eading"Printing and Iteratorsspan/a

<><a idX7F6817927F86240Fname="X7F6817927F86240F>/a>

<h4>2.1 <span class="Heading">Printing selected items</span></h4>

<p>The functions described here print lists or objects with an iterator with one item per line, either the whole list/iterator or certain subsets:</p>


<ul>
<li><p>by giving a list of positions of items to be printed, or<div class"ContSSBlock">

</li>
<li><p>by specifying a first item and then a regular step.</p>

</li>
</ul>
<p><a id="X784638AC84D49870" name="X784638AC84D49870"></a></p>

<h5>2.1-1 PrintSelection</h5>

<div class="func"><table
<div classfunctable="func" width"0%"><tr class="tdleft"><code class"unc"> PrintSelection>class//>table
<p>This function, given three (or four) parameters, calls operations <code class="code">PrintSelectionFromList</code> or <code class="code">PrintSelectionFromIterator</code> which prints the <em>first</em> item specified, and then the item at every <em>step</em

p,given , with  parameterlist class"Lcode ,only itemsat positionsin< ="<> .p


<div class="example"><pre>

<span="GAPprompt">gap;</span <span class"GAPinput = List( [1..20], n -> n^5 );;
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintSelection( L, [18..20] );</span>
18 : 1889568
19 : 2476099
20 : 3200000
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintSelection
2 : 32
1<iv="func"<table class="func" width10%"><>
tdleft< "">#27 PrintSelectioncode(<class">obj,< class="">first [, < class="">last] )tdright>&function</td><tr/able>
20 : 3200000
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintSelection( L, 2, 3, 11 );</span  four operations class></>or ="code>rintSelectionFromIterator itemspecifiedand then the atevery <>
2:3java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
5 :3125
8 : 32768
11 : 161051
<span class="GAPprompt">gap></span> <span class="GAPinput">s5 := SymmetricGroup( 5 );;</span>
<pan>
30 : (1,5)(3,4)
31 : (1,5,2java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
100 : (1,4,3)
101 : (1,4)(3,5)
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintSelection( s5, 1, 30 );</span>
 
31 : (1,5,2)
61 : (1,2,3)
91 : (1,3,5,2,4)
< classgap</span span=">rintSelection( s5,9 1,3)
9 : (2,5,3)
20 : (2,4)
30:3200java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
42 : (1,5,2,3,4)

p>d>


<  7


<div class="chlinkbot"><span class="chlink1">Goto Chapter: </span><a href="gap> s5 := SymmetricGroup(5);/>

<hr />
<p class=0: 15(,)
</body>
<h>

99%

<a href="chapInd_mj.html">Ind</a>  </div>

<hr />
<p class="foot">generated by <a href="https://www.math.rwth-aachen.de/~Frank.Luebeck/GAPDoc">GAPDoc2HTML</a></p>
</body>
</html>

99%


¤ Dauer der Verarbeitung: 0.2 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 ist noch experimentell.