home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 May / Chip_2000-05_cd1.bin / zkuste / Perl / ActivePerl-5.6.0.613.msi / 䆊䌷䈹䈙䏵-䞅䞆䞀㡆䞃䄦䠥 / _5a1b357550c4b29c1c3c37adb3cf272e < prev    next >
Text File  |  2000-03-23  |  9KB  |  315 lines

  1.  
  2. <HTML>
  3. <HEAD>
  4. <TITLE>Set::IntRange - Sets of Integers</TITLE>
  5. <LINK REL="stylesheet" HREF="../../../Active.css" TYPE="text/css">
  6. <LINK REV="made" HREF="mailto:">
  7. </HEAD>
  8.  
  9. <BODY>
  10. <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
  11. <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
  12. <STRONG><P CLASS=block> Set::IntRange - Sets of Integers</P></STRONG>
  13. </TD></TR>
  14. </TABLE>
  15.  
  16. <A NAME="__index__"></A>
  17. <!-- INDEX BEGIN -->
  18.  
  19. <UL>
  20.  
  21.     <LI><A HREF="#name">NAME</A></LI><LI><A HREF="#supportedplatforms">SUPPORTED PLATFORMS</A></LI>
  22.  
  23.     <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
  24.     <UL>
  25.  
  26.         <LI><A HREF="#methods">METHODS</A></LI>
  27.         <LI><A HREF="#overloaded operators">OVERLOADED OPERATORS</A></LI>
  28.     </UL>
  29.  
  30.     <LI><A HREF="#description">DESCRIPTION</A></LI>
  31.     <LI><A HREF="#see also">SEE ALSO</A></LI>
  32.     <LI><A HREF="#version">VERSION</A></LI>
  33.     <LI><A HREF="#author">AUTHOR</A></LI>
  34.     <LI><A HREF="#copyright">COPYRIGHT</A></LI>
  35.     <LI><A HREF="#license">LICENSE</A></LI>
  36. </UL>
  37. <!-- INDEX END -->
  38.  
  39. <HR>
  40. <P>
  41. <H1><A NAME="name">NAME</A></H1>
  42. <P>Set::IntRange - Sets of Integers</P>
  43. <P>Easy manipulation of sets of integers (arbitrary intervals)</P>
  44. <P>
  45. <HR>
  46. <H1><A NAME="supportedplatforms">SUPPORTED PLATFORMS</A></H1>
  47. <UL>
  48. <LI>Linux</LI>
  49. <LI>Solaris</LI>
  50. <LI>Windows</LI>
  51. </UL>
  52. <HR>
  53. <H1><A NAME="synopsis">SYNOPSIS</A></H1>
  54. <P>
  55. <H2><A NAME="methods">METHODS</A></H2>
  56. <PRE>
  57.   Version
  58.       $version = $Set::IntRange::VERSION;</PRE>
  59. <PRE>
  60.   new
  61.       $set = Set::IntRange->new($lower,$upper);
  62.       $set = $any_set->new($lower,$upper);</PRE>
  63. <PRE>
  64.   Resize
  65.       $set->Resize($lower,$upper);</PRE>
  66. <PRE>
  67.   Size
  68.       ($lower,$upper) = $set->Size();</PRE>
  69. <PRE>
  70.   Empty
  71.       $set->Empty();</PRE>
  72. <PRE>
  73.   Fill
  74.       $set->Fill();</PRE>
  75. <PRE>
  76.   Flip
  77.       $set->Flip();</PRE>
  78. <PRE>
  79.   Interval_Empty
  80.       $set->Interval_Empty($lower,$upper);
  81.       $set->Empty_Interval($lower,$upper); # (deprecated)</PRE>
  82. <PRE>
  83.   Interval_Fill
  84.       $set->Interval_Fill($lower,$upper);
  85.       $set->Fill_Interval($lower,$upper);  # (deprecated)</PRE>
  86. <PRE>
  87.   Interval_Flip
  88.       $set->Interval_Flip($lower,$upper);
  89.       $set->Flip_Interval($lower,$upper);  # (deprecated)</PRE>
  90. <PRE>
  91.   Interval_Scan_inc
  92.       while (($min,$max) = $set->Interval_Scan_inc($start))</PRE>
  93. <PRE>
  94.   Interval_Scan_dec
  95.       while (($min,$max) = $set->Interval_Scan_dec($start))</PRE>
  96. <PRE>
  97.   Bit_Off
  98.       $set->Bit_Off($index);
  99.       $set->Delete($index);                # (deprecated)</PRE>
  100. <PRE>
  101.   Bit_On
  102.       $set->Bit_On($index);
  103.       $set->Insert($index);                # (deprecated)</PRE>
  104. <PRE>
  105.   bit_flip
  106.       $bit = $set->bit_flip($index);
  107.       if ($set->bit_flip($index))
  108.       $bit = $set->flip($index);           # (deprecated)
  109.       if ($set->flip($index))              # (deprecated)</PRE>
  110. <PRE>
  111.   bit_test
  112.       $bit = $set->bit_test($index);
  113.       if ($set->bit_test($index))
  114.       $bit = $set->contains($index);
  115.       if ($set->contains($index))
  116.       $bit = $set->in($index);             # (deprecated)
  117.       if ($set->in($index))                # (deprecated)</PRE>
  118. <PRE>
  119.   Norm
  120.       $norm = $set->Norm();</PRE>
  121. <PRE>
  122.   Min
  123.       $min = $set->Min();</PRE>
  124. <PRE>
  125.   Max
  126.       $max = $set->Max();</PRE>
  127. <PRE>
  128.   Union
  129.       $set1->Union($set2,$set3);           # in-place is possible!</PRE>
  130. <PRE>
  131.   Intersection
  132.       $set1->Intersection($set2,$set3);    # in-place is possible!</PRE>
  133. <PRE>
  134.   Difference
  135.       $set1->Difference($set2,$set3);      # in-place is possible!</PRE>
  136. <PRE>
  137.   ExclusiveOr
  138.       $set1->ExclusiveOr($set2,$set3);     # in-place is possible!</PRE>
  139. <PRE>
  140.   Complement
  141.       $set1->Complement($set2);            # in-place is possible!</PRE>
  142. <PRE>
  143.   is_empty
  144.       if ($set->is_empty())</PRE>
  145. <PRE>
  146.   is_full
  147.       if ($set->is_full())</PRE>
  148. <PRE>
  149.   equal
  150.       if ($set1->equal($set2))</PRE>
  151. <PRE>
  152.   subset
  153.       if ($set1->subset($set2))
  154.       if ($set1->inclusion($set2))         # (deprecated)</PRE>
  155. <PRE>
  156.   Lexicompare
  157.       $cmp = $set1->Lexicompare($set2);    # unsigned</PRE>
  158. <PRE>
  159.   Compare
  160.       $cmp = $set1->Compare($set2);        # signed</PRE>
  161. <PRE>
  162.   Copy
  163.       $set1->Copy($set2);</PRE>
  164. <PRE>
  165.   Shadow
  166.       $other_set = $some_set->Shadow();</PRE>
  167. <PRE>
  168.   Clone
  169.       $twin_set = $some_set->Clone();</PRE>
  170. <PRE>
  171.   to_Enum
  172.       $string = $set->to_Enum();           # e.g., "-8..-5,-1..2,4,6..9"</PRE>
  173. <PRE>
  174.   from_Enum
  175.       eval { $set->from_Enum($string); };</PRE>
  176. <PRE>
  177.   to_Hex
  178.       $string = $set->to_Hex();            # e.g., "0007AF1E"</PRE>
  179. <PRE>
  180.   from_Hex
  181.       eval { $set->from_Hex($string); };</PRE>
  182. <PRE>
  183.   BitVector
  184.       $set->BitVector->any_Bit_Vector_method();</PRE>
  185. <P>
  186. <H2><A NAME="overloaded operators">OVERLOADED OPERATORS</A></H2>
  187. <PRE>
  188.       # "$index" is a number or a Perl scalar variable containing a
  189.       # number which represents the set containing only that element:</PRE>
  190. <PRE>
  191.   Emptyness
  192.       if ($set) # if not empty
  193.       if (! $set) # if empty
  194.       unless ($set) # if empty</PRE>
  195. <PRE>
  196.   Equality
  197.       if ($set1 == $set2)
  198.       if ($set1 != $set2)
  199.       if ($set == $index)
  200.       if ($set != $index)</PRE>
  201. <PRE>
  202.   Lexical Comparison
  203.       $cmp = $set1 cmp $set2;
  204.       if ($set1 lt $set2)
  205.       if ($set1 le $set2)
  206.       if ($set1 gt $set2)
  207.       if ($set1 ge $set2)
  208.       if ($set1 eq $set2)
  209.       if ($set1 ne $set2)
  210.       $cmp = $set cmp $index;
  211.       if ($set lt $index)
  212.       if ($set le $index)
  213.       if ($set gt $index)
  214.       if ($set ge $index)
  215.       if ($set eq $index)
  216.       if ($set ne $index)</PRE>
  217. <PRE>
  218.   String Conversion
  219.       $string = "$set";
  220.       print "\$set = '$set'\n";</PRE>
  221. <PRE>
  222.   Union
  223.       $set1 = $set2 + $set3;
  224.       $set1 += $set2;
  225.       $set1 = $set2 | $set3;
  226.       $set1 |= $set2;
  227.       $set1 = $set2 + $index;
  228.       $set += $index;
  229.       $set1 = $set2 | $index;
  230.       $set |= $index;</PRE>
  231. <PRE>
  232.   Intersection
  233.       $set1 = $set2 * $set3;
  234.       $set1 *= $set2;
  235.       $set1 = $set2 & $set3;
  236.       $set1 &= $set2;
  237.       $set1 = $set2 * $index;
  238.       $set *= $index;
  239.       $set1 = $set2 & $index;
  240.       $set &= $index;</PRE>
  241. <PRE>
  242.   Difference
  243.       $set1 = $set2 - $set3;
  244.       $set1 -= $set2;
  245.       $set1 = $set2 - $set1;
  246.       $set1 = $set2 - $index;
  247.       $set1 = $index - $set2;
  248.       $set -= $index;</PRE>
  249. <PRE>
  250.   ExclusiveOr
  251.       $set1 = $set2 ^ $set3;
  252.       $set1 ^= $set2;
  253.       $set1 = $set2 ^ $index;
  254.       $set ^= $index;</PRE>
  255. <PRE>
  256.   Complement
  257.       $set1 = -$set2;
  258.       $set1 = ~$set2;
  259.       $set = -$set;
  260.       $set = ~$set;</PRE>
  261. <PRE>
  262.   Subset Relationship
  263.       if ($set1 <= $set2)</PRE>
  264. <PRE>
  265.   True Subset Relationship
  266.       if ($set1 < $set2)</PRE>
  267. <PRE>
  268.   Superset Relationship
  269.       if ($set1 >= $set2)</PRE>
  270. <PRE>
  271.   True Superset Relationship
  272.       if ($set1 > $set2)</PRE>
  273. <PRE>
  274.   Norm
  275.       $norm = abs($set);</PRE>
  276. <P>
  277. <HR>
  278. <H1><A NAME="description">DESCRIPTION</A></H1>
  279. <P>This class lets you dynamically create sets of arbitrary intervals of
  280. integers and perform all the basic operations for sets on them (for a
  281. list of available methods and operators, see above).</P>
  282. <P>See <A HREF="../../../Bit/Vector(3).html">the Bit::Vector(3) manpage</A> for more details!</P>
  283. <P>
  284. <HR>
  285. <H1><A NAME="see also">SEE ALSO</A></H1>
  286. <P>Bit::Vector(3), Set::IntegerFast(3), Math::MatrixBool(3),
  287. Math::MatrixReal(3), DFA::Kleene(3), Math::Kleene(3),
  288. Graph::Kruskal(3).</P>
  289. <P>
  290. <HR>
  291. <H1><A NAME="version">VERSION</A></H1>
  292. <P>This man page documents ``Set::IntRange'' version 5.0.</P>
  293. <P>
  294. <HR>
  295. <H1><A NAME="author">AUTHOR</A></H1>
  296. <P>Steffen Beyer <<A HREF="mailto:sb@sdm.de">sb@sdm.de</A>>.</P>
  297. <P>
  298. <HR>
  299. <H1><A NAME="copyright">COPYRIGHT</A></H1>
  300. <P>Copyright (c) 1996, 1997 by Steffen Beyer. All rights reserved.</P>
  301. <P>
  302. <HR>
  303. <H1><A NAME="license">LICENSE</A></H1>
  304. <P>This package is free software; you can redistribute it and/or
  305. modify it under the same terms as Perl itself.</P>
  306. <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
  307. <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
  308. <STRONG><P CLASS=block> Set::IntRange - Sets of Integers</P></STRONG>
  309. </TD></TR>
  310. </TABLE>
  311.  
  312. </BODY>
  313.  
  314. </HTML>
  315.