Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update datamask.js #114

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions src/datamask.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/


var DataMask = {};
let DataMask = {};

DataMask.forReference = function(reference)
{
Expand All @@ -38,9 +38,9 @@ function DataMask000()
{
this.unmaskBitMatrix=function(bits, dimension)
{
for (var i = 0; i < dimension; i++)
for (let i = 0; i < dimension; i++)
{
for (var j = 0; j < dimension; j++)
for (let j = 0; j < dimension; j++)
{
if (this.isMasked(i, j))
{
Expand All @@ -59,9 +59,9 @@ function DataMask001()
{
this.unmaskBitMatrix=function(bits, dimension)
{
for (var i = 0; i < dimension; i++)
for (let i = 0; i < dimension; i++)
{
for (var j = 0; j < dimension; j++)
for (let j = 0; j < dimension; j++)
{
if (this.isMasked(i, j))
{
Expand All @@ -80,9 +80,9 @@ function DataMask010()
{
this.unmaskBitMatrix=function(bits, dimension)
{
for (var i = 0; i < dimension; i++)
for (let i = 0; i < dimension; i++)
{
for (var j = 0; j < dimension; j++)
for (let j = 0; j < dimension; j++)
{
if (this.isMasked(i, j))
{
Expand All @@ -101,9 +101,9 @@ function DataMask011()
{
this.unmaskBitMatrix=function(bits, dimension)
{
for (var i = 0; i < dimension; i++)
for (let i = 0; i < dimension; i++)
{
for (var j = 0; j < dimension; j++)
for (let j = 0; j < dimension; j++)
{
if (this.isMasked(i, j))
{
Expand All @@ -122,9 +122,9 @@ function DataMask100()
{
this.unmaskBitMatrix=function(bits, dimension)
{
for (var i = 0; i < dimension; i++)
for (let i = 0; i < dimension; i++)
{
for (var j = 0; j < dimension; j++)
for (let j = 0; j < dimension; j++)
{
if (this.isMasked(i, j))
{
Expand All @@ -143,9 +143,9 @@ function DataMask101()
{
this.unmaskBitMatrix=function(bits, dimension)
{
for (var i = 0; i < dimension; i++)
for (let i = 0; i < dimension; i++)
{
for (var j = 0; j < dimension; j++)
for (let j = 0; j < dimension; j++)
{
if (this.isMasked(i, j))
{
Expand All @@ -156,7 +156,7 @@ function DataMask101()
}
this.isMasked=function( i, j)
{
var temp = i * j;
let temp = i * j;
return (temp & 0x01) + (temp % 3) == 0;
}
}
Expand All @@ -165,9 +165,9 @@ function DataMask110()
{
this.unmaskBitMatrix=function(bits, dimension)
{
for (var i = 0; i < dimension; i++)
for (let i = 0; i < dimension; i++)
{
for (var j = 0; j < dimension; j++)
for (let j = 0; j < dimension; j++)
{
if (this.isMasked(i, j))
{
Expand All @@ -178,17 +178,17 @@ function DataMask110()
}
this.isMasked=function( i, j)
{
var temp = i * j;
let temp = i * j;
return (((temp & 0x01) + (temp % 3)) & 0x01) == 0;
}
}
function DataMask111()
{
this.unmaskBitMatrix=function(bits, dimension)
{
for (var i = 0; i < dimension; i++)
for (let i = 0; i < dimension; i++)
{
for (var j = 0; j < dimension; j++)
for (let j = 0; j < dimension; j++)
{
if (this.isMasked(i, j))
{
Expand Down