Java Doc for BitVector.java in  » Scripting » Nice » mlsub » typing » lowlevel » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Scripting » Nice » mlsub.typing.lowlevel 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   mlsub.typing.lowlevel.BitVector

All known Subclasses:   mlsub.typing.lowlevel.Domain,
BitVector
public class BitVector implements java.io.Serializable(Code)
Same as java.util.BitSet, without the synchronization stuff plus additional features.
See Also:   java.util.BitSet
version:
   $Revision: 1.13 $, $Date: 2005/03/30 23:08:11 $
author:
   Alexandre Frey
author:
   Daniel Bonniot
author:
   (replaced the underlying java.util.Vector by an array
author:
   for efficiency reasons;
author:
   most bitvectors are less than 64 elements, so using a long often avoids
author:
   allocating the array)


Field Summary
final public static  intUNDEFINED_INDEX
    

Constructor Summary
public  BitVector()
     Creates an empty set.
public  BitVector(int nbits)
     Creates an empty set with the specified size.
public  BitVector(BitVector old)
     Creates a copy of a BitVector.

Method Summary
final public  voidaddProduct(BitMatrix M, BitVector v)
     add to this the product of M by v, that is the BitVector v' such that v' = union of all M.getRow(i) such that v.get(i) is true.
final public  voidand(BitVector set)
     Logically ANDs this bit set with the specified set of bits.
final public  voidandNot(BitVector set)
    
final public  voidandNot(int from, BitVector set)
    
final public  voidandNotAnd(BitVector set1, BitVector set2)
    
final public  voidandNotAndOr(BitVector S1, BitVector S2, BitVector S3)
     Do this = this & (~(S1 & S2) | S3) i.e.
final public  voidandNotOr(int from, BitVector set1, BitVector set2)
    
final public  voidandNotOr(BitVector set1, BitVector set2)
    
final public  voidbitCopy(int src, int dest)
    
final public  intbitCount()
     Computes the number of bits set in this BitVector.
final public  intbitCount(int n)
    
final public  voidbitMerge(int src, int dest)
     Merge bit src and bit dest, put the result in bit dest.
final public  voidclear(int bit)
     Clears a bit.
final public  voidclearAll()
    
final public  booleanequals(Object obj)
     Compares this object against the specified object.
final public  voidfill(int n)
    
final public  voidfillNot(int n)
    
final public  booleanget(int bit)
     Gets a bit.
final public  intgetLowestClearedBit()
    
final public  intgetLowestSetBit()
     Compute the first bit set in this BitVector or UNDEFINED_INDEX if this set is empty.
final public  intgetLowestSetBit(int pos)
    
final public  intgetLowestSetBitAnd(BitVector set)
    
final public  intgetLowestSetBitAndNotIn(BitVector set, BitVector exclude)
    
final public  intgetLowestSetBitNotIn(BitVector set)
     Compute the first bit set in this & ~set.
public  intgetNextBit(int i)
    
final public  inthashCode()
     Gets the hashcode.
final public  booleanincludedIn(BitVector set)
    
public  booleanisEmpty()
    
final public  voidor(BitVector set)
    
final public  voidorAnd(BitVector set1, BitVector set2)
    
final public  voidorNotIn(BitVector set1, BitVector set2)
    
public  voidset(int bit)
     Sets a bit.
final public  intsize()
     Calculates and returns the set's size in bits.
final public  voidslowaddProduct(BitMatrix M, BitVector v)
    
public  StringtoString()
     Converts the BitVector to a String.
final public  voidtruncate(int newSize)
     Clear all the bits beyond newSize (newSize included), so that this BitVector has less than newSize bits.
final public  voidxor(BitVector set)
    

Field Detail
UNDEFINED_INDEX
final public static int UNDEFINED_INDEX(Code)




Constructor Detail
BitVector
public BitVector()(Code)
Creates an empty set.



BitVector
public BitVector(int nbits)(Code)
Creates an empty set with the specified size.
Parameters:
  nbits - the size of the set



BitVector
public BitVector(BitVector old)(Code)
Creates a copy of a BitVector.




Method Detail
addProduct
final public void addProduct(BitMatrix M, BitVector v)(Code)
add to this the product of M by v, that is the BitVector v' such that v' = union of all M.getRow(i) such that v.get(i) is true.



and
final public void and(BitVector set)(Code)
Logically ANDs this bit set with the specified set of bits.
Parameters:
  set - the bit set to be ANDed with



andNot
final public void andNot(BitVector set)(Code)
do this = this & ~(set)



andNot
final public void andNot(int from, BitVector set)(Code)
do this = this & (~set) on bits >= from



andNotAnd
final public void andNotAnd(BitVector set1, BitVector set2)(Code)
Do this = this & ~(S1 & S2)



andNotAndOr
final public void andNotAndOr(BitVector S1, BitVector S2, BitVector S3)(Code)
Do this = this & (~(S1 & S2) | S3) i.e. this = this & ~(S1 & S2 & ~S3)



andNotOr
final public void andNotOr(int from, BitVector set1, BitVector set2)(Code)
Do this = this & (~set1 | set2) on all bits >= from



andNotOr
final public void andNotOr(BitVector set1, BitVector set2)(Code)
Do this = this & (~set1 | set2)



bitCopy
final public void bitCopy(int src, int dest)(Code)
Copy bit src into bit dest and clear src bit



bitCount
final public int bitCount()(Code)
Computes the number of bits set in this BitVector. This function is specially efficient on sparse bit sets. NOTE: in previous implementations of MLsub type-checkers, there were an average number of 2 bits set per vector...



bitCount
final public int bitCount(int n)(Code)
Computes the number of bits set among the first n bits



bitMerge
final public void bitMerge(int src, int dest)(Code)
Merge bit src and bit dest, put the result in bit dest.



clear
final public void clear(int bit)(Code)
Clears a bit.
Parameters:
  bit - the bit to be cleared



clearAll
final public void clearAll()(Code)
Clear all the bits in this BitVector



equals
final public boolean equals(Object obj)(Code)
Compares this object against the specified object.
Parameters:
  obj - the object to compare with true if the objects are the same; false otherwise.



fill
final public void fill(int n)(Code)
Fills the n first bit of this BitVector



fillNot
final public void fillNot(int n)(Code)
Clears the first n bits of this BitVector



get
final public boolean get(int bit)(Code)
Gets a bit.
Parameters:
  bit - the bit to be gotten



getLowestClearedBit
final public int getLowestClearedBit()(Code)
Compute the first cleared bit in this BitVector (a BitVector always contains a finite number of set bits, so this method always returns a value)



getLowestSetBit
final public int getLowestSetBit()(Code)
Compute the first bit set in this BitVector or UNDEFINED_INDEX if this set is empty.



getLowestSetBit
final public int getLowestSetBit(int pos)(Code)
Compute the first bit set that is greater or equal than pos, or UNDEFINED_INDEX if there is no such bit



getLowestSetBitAnd
final public int getLowestSetBitAnd(BitVector set)(Code)
Compute the first bit in this & set UNDEFINED_INDEX if there is no such bit



getLowestSetBitAndNotIn
final public int getLowestSetBitAndNotIn(BitVector set, BitVector exclude)(Code)



getLowestSetBitNotIn
final public int getLowestSetBitNotIn(BitVector set)(Code)
Compute the first bit set in this & ~set. UNDEFINED_INDEX if there is no such bit



getNextBit
public int getNextBit(int i)(Code)
Gets the first bit set that is strictly greater than i or UNDEFINED_INDEX if there is none



hashCode
final public int hashCode()(Code)
Gets the hashcode.



includedIn
final public boolean includedIn(BitVector set)(Code)
Return true if this BitVector is included in set



isEmpty
public boolean isEmpty()(Code)
Returns true if no bit is set in this BitVector



or
final public void or(BitVector set)(Code)
Do this = this | set



orAnd
final public void orAnd(BitVector set1, BitVector set2)(Code)
Do this = this | (set1 & set2)



orNotIn
final public void orNotIn(BitVector set1, BitVector set2)(Code)
Do this = this | (set1 & ~set2)



set
public void set(int bit)(Code)
Sets a bit.
Parameters:
  bit - the bit to be set



size
final public int size()(Code)
Calculates and returns the set's size in bits. The maximum element in the set is the size - 1st element.



slowaddProduct
final public void slowaddProduct(BitMatrix M, BitVector v)(Code)



toString
public String toString()(Code)
Converts the BitVector to a String.



truncate
final public void truncate(int newSize)(Code)
Clear all the bits beyond newSize (newSize included), so that this BitVector has less than newSize bits.



xor
final public void xor(BitVector set)(Code)
Do this = this ^ set



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.