annotate doc/interpreter/set.txi @ 12293:d6c70e64882c release-3-4-x

Add powerset function to documentation.
author Rik <octave@nomad.inbox5.com>
date Sat, 29 Jan 2011 21:47:56 -0800
parents fd0a3ac60b0e
children 72c96de7a403
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11523
fd0a3ac60b0e update copyright notices
John W. Eaton <jwe@octave.org>
parents: 10712
diff changeset
1 @c Copyright (C) 1996-2011 John W. Eaton
7018
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7001
diff changeset
2 @c
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7001
diff changeset
3 @c This file is part of Octave.
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7001
diff changeset
4 @c
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7001
diff changeset
5 @c Octave is free software; you can redistribute it and/or modify it
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7001
diff changeset
6 @c under the terms of the GNU General Public License as published by the
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7001
diff changeset
7 @c Free Software Foundation; either version 3 of the License, or (at
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7001
diff changeset
8 @c your option) any later version.
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7001
diff changeset
9 @c
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7001
diff changeset
10 @c Octave is distributed in the hope that it will be useful, but WITHOUT
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7001
diff changeset
11 @c ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7001
diff changeset
12 @c FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7001
diff changeset
13 @c for more details.
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7001
diff changeset
14 @c
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7001
diff changeset
15 @c You should have received a copy of the GNU General Public License
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7001
diff changeset
16 @c along with Octave; see the file COPYING. If not, see
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7001
diff changeset
17 @c <http://www.gnu.org/licenses/>.
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
18
4167
aae05d51353c [project @ 2002-11-12 02:52:50 by jwe]
jwe
parents: 3439
diff changeset
19 @node Sets
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
20 @chapter Sets
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
21
8828
8463d1a2e544 Doc fixes.
Brian Gough <bjg@network-theory.co.uk>
parents: 8347
diff changeset
22 Octave has a limited number of functions for managing sets of data, where a
7001
8b0cfeb06365 [project @ 2007-10-10 18:02:59 by jwe]
jwe
parents: 6778
diff changeset
23 set is defined as a collection of unique elements. In Octave a set is
6741
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6550
diff changeset
24 represented as a vector of numbers.
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
25
6741
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6550
diff changeset
26 @DOCSTRING(unique)
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6550
diff changeset
27
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6550
diff changeset
28 @menu
9032
349616d9c38e Cleanup top-level documentation menu in octave.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
29 * Set Operations::
6741
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6550
diff changeset
30 @end menu
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6550
diff changeset
31
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6550
diff changeset
32 @node Set Operations
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6550
diff changeset
33 @section Set Operations
6550
1b7a6061a05d [project @ 2007-04-20 07:40:26 by jwe]
jwe
parents: 6502
diff changeset
34
6741
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6550
diff changeset
35 Octave supports the basic set operations. That is, Octave can compute
10712
6a5a0c9df5d7 union.m: Remove seealso reference to deprecated function.
Rik <octave@nomad.inbox5.com>
parents: 9032
diff changeset
36 the union, intersection, and difference of two sets.
8347
fa78cb8d8a5c corrections for typos
Brian Gough<bjg@network-theory.co.uk>
parents: 7018
diff changeset
37 Octave also supports the @emph{Exclusive Or} set operation, and
6741
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6550
diff changeset
38 membership determination. The functions for set operations all work in
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6550
diff changeset
39 pretty much the same way. As an example, assume that @code{x} and
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6550
diff changeset
40 @code{y} contains two sets, then
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6550
diff changeset
41
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6550
diff changeset
42 @example
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6550
diff changeset
43 union(x, y)
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6550
diff changeset
44 @end example
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6550
diff changeset
45
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6550
diff changeset
46 @noindent
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6550
diff changeset
47 computes the union of the two sets.
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6550
diff changeset
48
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6550
diff changeset
49 @DOCSTRING(ismember)
6502
6ab0a8767780 [project @ 2007-04-06 03:32:06 by jwe]
jwe
parents: 4167
diff changeset
50
3368
a4cd1e9d9962 [project @ 1999-11-20 17:22:48 by jwe]
jwe
parents: 3294
diff changeset
51 @DOCSTRING(union)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
52
6502
6ab0a8767780 [project @ 2007-04-06 03:32:06 by jwe]
jwe
parents: 4167
diff changeset
53 @DOCSTRING(intersect)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
54
6502
6ab0a8767780 [project @ 2007-04-06 03:32:06 by jwe]
jwe
parents: 4167
diff changeset
55 @DOCSTRING(setdiff)
6ab0a8767780 [project @ 2007-04-06 03:32:06 by jwe]
jwe
parents: 4167
diff changeset
56
6ab0a8767780 [project @ 2007-04-06 03:32:06 by jwe]
jwe
parents: 4167
diff changeset
57 @DOCSTRING(setxor)
12293
d6c70e64882c Add powerset function to documentation.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
58
d6c70e64882c Add powerset function to documentation.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
59 @DOCSTRING(powerset)