File: range.html

package info (click to toggle)
blitz%2B%2B 1%3A1.0.1%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 8,016 kB
  • sloc: cpp: 56,889; python: 1,939; fortran: 1,510; f90: 852; makefile: 828; sh: 309
file content (21 lines) | stat: -rw-r--r-- 716 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<html>
<title>Blitz++ Class Reference: Range</title>
<body>

<h1>Blitz++ Class Reference: Range</h1>

An object of type Range represents an ordered set of uniformly
spaced integers.  Range objects can be used to initialize
vectors, to refer to subvectors, or as operands in a vector
expression.  Here are some examples:

<pre>
Vector&lt;double&gt; x = Range(0,6);         // x = [ 0 1 2 3 4 5 6 ]
cout << x(Range::all()) << endl              // [ 0 1 2 3 4 5 6 ]
     << x(Range(3,5))   << endl              // [ 3 4 5 ]
     << x(Range(3,Range::toEnd))  << endl    // [ 3 4 5 6 ]
     << x(Range(Range::fromStart,3)) << endl // [ 0 1 2 3 ]
     << x(Range(1,5,2)) << endl;             // [ 1 3 5 ]
</body>
</html>