Class BMatrix
				
				
			
				Represents Binary Matrix
				
				
					
Defined in:  bmatrix05.js.
				
			
| Constructor Attributes | Constructor Name and Description | 
|---|---|
| 
								BMatrix()
							 Binary Matrix Object | 
| Field Attributes | Field Name and Description | 
|---|---|
| substance of binary matrix | |
| number of initial values | |
| number of columns | |
| number of rows | 
| Method Attributes | Method Name and Description | 
|---|---|
| abs()
								 Counts value 1 in the binary matrix object | |
| and(bm2)
								 Logical and with binary matrix bm2 | |
| clear()
								 Clears with zeroes with the binary matrix object | |
| clone()
								 Copies binary matrix | |
| diff(bm2)
								 Logical difference with the binary matrix bm2 | |
| equals(bm2)
								 Returns true if two binary matrices are equal. | |
| getValue(i, j)
								 Returns the value (0 or 1) of the element i,j of the binary matrix object | |
| inv()
								 Returns inverted binary matrix object | |
| mul(bx2)
								 Product with given binary matrix (or binary vector) | |
| or(bm2)
								 Logical or with binary matrix bm2 | |
| setValue(i, j, value)
								 Sets a value (0 or 1) to the element i,j of the binary matrix object | |
| toString()
								 Convert the binary matrix to a string | |
| toTeX()
								 Convert the binary matrix to TeX string | |
| tran()
								 Returns transposed binary matrix | |
| xor(bm2)
								 Exclusive or with the binary matrix bm2 | 
					Class Detail
				
				
				
						BMatrix()
				
				
				
					Binary Matrix Object
					
				
				
				
				
				bm = new BMatrix(2, 2); // 2-row 2-column binary matrix (0 0 ↓ 0 0) bm = new BMatrix(2, 2, 1, 1); // 2-row 2-column binary matrix (1 0 ↓ 0 0) bm = new BMatrix(2, 2, 2, 1); // 2-row 2-column binary matrix (0 0 ↓ 1 0)
- Since:
- 0.1
					Field Detail
				
				
					 
					
					
					{BVector[]}
					colv
					
					
					
						substance of binary matrix
						
						
					
					
					
						
						
						
						
					
					
					{Number}
					init
					
					
					
						number of initial values
						
						
					
					
					
						
						
						
						
					
					
					{Number}
					m
					
					
					
						number of columns
						
						
					
					
					
						
						
						
						
					
					
					{Number}
					n
					
					
					
						number of rows
						
						
					
					
					
						
						
						
						
					
				
			
		
			
				
					Method Detail
				
				
					 
					
					
					{Number}
					abs()
					
					
					
						Counts value 1 in the binary matrix object
						
						
					
					
					
					
						
						
						
							- Since:
- 0.1
- Returns:
- {Number} number of elements that have value 1
					
					{BMatrix}
					and(bm2)
					
					
					
						Logical and with binary matrix bm2
						
						
					
					
					
					
						
							- Parameters:
- {BMatrix} bm2
- second operand for logocal and
- Since:
- 0.1
- Returns:
- {BMatrix} logical and with bm2 (or null if error)
					
					
					clear()
					
					
					
						Clears with zeroes with the binary matrix object
						
						
					
					
					
					
						
						
						
							- Since:
- 0.1
					
					{BMatrix}
					clone()
					
					
					
						Copies binary matrix
						
						
					
					
					
					
						
						
						
							- Since:
- 0.1
- Returns:
- {BMatrix} copy of the binary matrix
					
					{BMatrix}
					diff(bm2)
					
					
					
						Logical difference with the binary matrix bm2
						
						
					
					
					
					
						
							- Parameters:
- {BMatrix} bm2
- second operand for logical difference
- Since:
- 0.1
- Returns:
- {BMatrix} logical difference with bm2 (or null if error)
					
					{boolean}
					equals(bm2)
					
					
					
						Returns true if two binary matrices are equal.  Returns false if error or different.
						
						
					
					
					
					
						
							- Parameters:
- {BMatrix} bm2
- comparison target binary matrix
- Since:
- 0.1
- Returns:
- {boolean} true if two matrices are equal.
					
					{Number}
					getValue(i, j)
					
					
					
						Returns the value (0 or 1) of the element i,j of the binary matrix object
						
						
					
					
					
					
						
							- Parameters:
- {Number} i
- row number of the element to get (1 origin)
- {Number} j
- column number of the element to get (1 origin)
- Since:
- 0.1
- Returns:
- {Number} value of the element i,j (0 or 1)
					
					{BMatrix}
					inv()
					
					
					
						Returns inverted binary matrix object
						
						
					
					
					
					
						
						
						
							- Since:
- 0.1
- Returns:
- {BMatrix} inverted binary matrix
					
					{BMatrix}
					mul(bx2)
					
					
					
						Product with given binary matrix (or binary vector)
						
						
					
					
					
					
						
							- Parameters:
- {BMatrix | BVector} bx2
- second operand for product
- Since:
- 0.1
- Returns:
- {BMatrix} product with bx2 (or null if error)
					
					{BMatrix}
					or(bm2)
					
					
					
						Logical or with binary matrix bm2
						
						
					
					
					
					
						
							- Parameters:
- {BMatrix} bm2
- second operand for logocal or
- Since:
- 0.1
- Returns:
- {BMatrix} logical or with bm2 (or null if error)
					
					
					setValue(i, j, value)
					
					
					
						Sets a value (0 or 1) to the element i,j of the binary matrix object
						
						
					
					
					
					
						
							- Parameters:
- {Number} i
- row number of the element to set (1 origin)
- {Number} j
- column number of the element to set (1 origin)
- {Number} value
- set value 0 or 1
- Since:
- 0.1
					
					{String}
					toString()
					
					
					
						Convert the binary matrix to a string
						
						
					
					
					
					
						
						
						
							- Since:
- 0.1
- Returns:
- {String} string
					
					{String}
					toTeX()
					
					
					
						Convert the binary matrix to TeX string
						
						
					
					
					
					
						
						
						
							- Since:
- 0.1
- Returns:
- {String} TeX string
					
					{BMatrix, BVector}
					tran()
					
					
					
						Returns transposed binary matrix
						
						
					
					
					
					
						
						
						
							- Since:
- 0.4
					
					{BMatrix}
					xor(bm2)
					
					
					
						Exclusive or with the binary matrix bm2
						
						
					
					
					
					
						
							- Parameters:
- {BMatrix} bm2
- second operand for exclusive or
- Since:
- 0.1
- Returns:
- {BMatrix} exclusive or with bm2 (or null if error)