Skip to content

Commit

Permalink
[SEDONA-649] Fix spelling in Java files (#1558)
Browse files Browse the repository at this point in the history
normailized -> normalized
  • Loading branch information
jbampton authored Aug 23, 2024
1 parent 25fc222 commit 809b5a7
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 55 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ public abstract class ColoringRule implements Serializable {
/**
* Encode to RGB.
*
* @param normailizedCount the normailized count
* @param normalizedCount the normalized count
* @param globalParameter the global parameter
* @return the integer
* @throws Exception the exception
*/
public abstract Integer EncodeToRGB(
Double normailizedCount, final GlobalParameter globalParameter) throws Exception;
public abstract Integer EncodeToRGB(Double normalizedCount, final GlobalParameter globalParameter)
throws Exception;
}
Original file line number Diff line number Diff line change
Expand Up @@ -773,23 +773,23 @@ public boolean CustomizeColor(
/**
* Encode to color.
*
* @param normailizedCount the normailized count
* @param normalizedCount the normalized count
* @return the color
* @throws Exception the exception
*/
protected Color EncodeToColor(int normailizedCount) throws Exception {
protected Color EncodeToColor(int normalizedCount) throws Exception {
if (controlColorChannel.equals(Color.RED)) {
red = useInverseRatioForControlColorChannel ? 255 - normailizedCount : normailizedCount;
red = useInverseRatioForControlColorChannel ? 255 - normalizedCount : normalizedCount;
} else if (controlColorChannel.equals(Color.GREEN)) {
green = useInverseRatioForControlColorChannel ? 255 - normailizedCount : normailizedCount;
green = useInverseRatioForControlColorChannel ? 255 - normalizedCount : normalizedCount;
} else if (controlColorChannel.equals(Color.BLUE)) {
blue = useInverseRatioForControlColorChannel ? 255 - normailizedCount : normailizedCount;
blue = useInverseRatioForControlColorChannel ? 255 - normalizedCount : normalizedCount;
} else {
throw new Exception(
"[Sedona-VizViz][GenerateColor] Unsupported changing color color type. It should be in R,G,B");
}

if (normailizedCount == 0) {
if (normalizedCount == 0) {
return new Color(red, green, blue, 0);
}
return new Color(red, green, blue, colorAlpha);
Expand All @@ -798,23 +798,23 @@ protected Color EncodeToColor(int normailizedCount) throws Exception {
/**
* Encode to RGB.
*
* @param normailizedCount the normailized count
* @param normalizedCount the normalized count
* @return the integer
* @throws Exception the exception
*/
protected Integer EncodeToRGB(int normailizedCount) throws Exception {
protected Integer EncodeToRGB(int normalizedCount) throws Exception {
if (controlColorChannel.equals(Color.RED)) {
red = useInverseRatioForControlColorChannel ? 255 - normailizedCount : normailizedCount;
red = useInverseRatioForControlColorChannel ? 255 - normalizedCount : normalizedCount;
} else if (controlColorChannel.equals(Color.GREEN)) {
green = useInverseRatioForControlColorChannel ? 255 - normailizedCount : normailizedCount;
green = useInverseRatioForControlColorChannel ? 255 - normalizedCount : normalizedCount;
} else if (controlColorChannel.equals(Color.BLUE)) {
blue = useInverseRatioForControlColorChannel ? 255 - normailizedCount : normailizedCount;
blue = useInverseRatioForControlColorChannel ? 255 - normalizedCount : normalizedCount;
} else {
throw new Exception(
"[Sedona-VizViz][GenerateColor] Unsupported changing color color type. It should be in R,G,B");
}

if (normailizedCount == 0) {
if (normalizedCount == 0) {
return new Color(red, green, blue, 0).getRGB();
}
return new Color(red, green, blue, colorAlpha).getRGB();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import java.awt.Color;

public class GenericColoringRule {
public static Integer EncodeToRGB(Double normailizedCount) {
public static Integer EncodeToRGB(Double normalizedCount) {
int alpha = 150;
Color[] colors =
new Color[] {
Expand All @@ -34,21 +34,21 @@ public static Integer EncodeToRGB(Double normailizedCount) {
new Color(255, 85, 0, alpha),
new Color(255, 0, 0, alpha)
};
if (normailizedCount == 0) {
if (normalizedCount == 0) {
return new Color(255, 255, 255, 0).getRGB();
} else if (normailizedCount < 5) {
} else if (normalizedCount < 5) {
return colors[0].getRGB();
} else if (normailizedCount < 15) {
} else if (normalizedCount < 15) {
return colors[1].getRGB();
} else if (normailizedCount < 25) {
} else if (normalizedCount < 25) {
return colors[2].getRGB();
} else if (normailizedCount < 35) {
} else if (normalizedCount < 35) {
return colors[3].getRGB();
} else if (normailizedCount < 45) {
} else if (normalizedCount < 45) {
return colors[4].getRGB();
} else if (normailizedCount < 60) {
} else if (normalizedCount < 60) {
return colors[5].getRGB();
} else if (normailizedCount < 80) {
} else if (normalizedCount < 80) {
return colors[6].getRGB();
} else {
return colors[7].getRGB();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,32 +31,32 @@ public class LinearFunction extends ColoringRule {
* @see org.datasyslab.babylon.core.internalobject.ColoringRule#EncodeToRGB(java.lang.Double, org.datasyslab.babylon.core.parameters.GlobalParameter)
*/
@Override
public Integer EncodeToRGB(Double normailizedCount, GlobalParameter globalParameter)
public Integer EncodeToRGB(Double normalizedCount, GlobalParameter globalParameter)
throws Exception {
int red = 0;
int green = 0;
int blue = 0;
if (globalParameter.controlColorChannel.equals(Color.RED)) {
red =
globalParameter.useInverseRatioForControlColorChannel
? 255 - normailizedCount.intValue()
: normailizedCount.intValue();
? 255 - normalizedCount.intValue()
: normalizedCount.intValue();
} else if (globalParameter.controlColorChannel.equals(Color.GREEN)) {
green =
globalParameter.useInverseRatioForControlColorChannel
? 255 - normailizedCount.intValue()
: normailizedCount.intValue();
? 255 - normalizedCount.intValue()
: normalizedCount.intValue();
} else if (globalParameter.controlColorChannel.equals(Color.BLUE)) {
blue =
globalParameter.useInverseRatioForControlColorChannel
? 255 - normailizedCount.intValue()
: normailizedCount.intValue();
? 255 - normalizedCount.intValue()
: normalizedCount.intValue();
} else {
throw new Exception(
"[Babylon][GenerateColor] Unsupported changing color color type. It should be in R,G,B");
}

if (normailizedCount == 0) {
if (normalizedCount == 0) {
return new Color(red, green, blue, 0).getRGB();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class PiecewiseFunction extends ColoringRule {
* @see org.datasyslab.babylon.core.internalobject.ColoringRule#EncodeToRGB(java.lang.Double, org.datasyslab.babylon.core.parameters.GlobalParameter)
*/
@Override
public Integer EncodeToRGB(Double normailizedCount, GlobalParameter globalParameter) {
public Integer EncodeToRGB(Double normalizedCount, GlobalParameter globalParameter) {
int alpha = 150;
Color[] colors =
new Color[] {
Expand All @@ -44,21 +44,21 @@ public Integer EncodeToRGB(Double normailizedCount, GlobalParameter globalParame
new Color(255, 85, 0, alpha),
new Color(255, 0, 0, alpha)
};
if (normailizedCount == 0) {
if (normalizedCount == 0) {
return new Color(255, 255, 255, 0).getRGB();
} else if (normailizedCount < 5) {
} else if (normalizedCount < 5) {
return colors[0].getRGB();
} else if (normailizedCount < 15) {
} else if (normalizedCount < 15) {
return colors[1].getRGB();
} else if (normailizedCount < 25) {
} else if (normalizedCount < 25) {
return colors[2].getRGB();
} else if (normailizedCount < 35) {
} else if (normalizedCount < 35) {
return colors[3].getRGB();
} else if (normailizedCount < 45) {
} else if (normalizedCount < 45) {
return colors[4].getRGB();
} else if (normailizedCount < 60) {
} else if (normalizedCount < 60) {
return colors[5].getRGB();
} else if (normailizedCount < 80) {
} else if (normalizedCount < 80) {
return colors[6].getRGB();
} else {
return colors[7].getRGB();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,19 +191,19 @@ public Tuple2<Integer, Color> call(Tuple2<Integer, Long> pixelCount) throws Exce
* @see VisualizationOperator#EncodeToColor(int)
*/
@Override
protected Color EncodeToColor(int normailizedCount) throws Exception {
protected Color EncodeToColor(int normalizedCount) throws Exception {
if (controlColorChannel.equals(Color.RED)) {
red = useInverseRatioForControlColorChannel ? 255 - normailizedCount : normailizedCount;
red = useInverseRatioForControlColorChannel ? 255 - normalizedCount : normalizedCount;
} else if (controlColorChannel.equals(Color.GREEN)) {
green = useInverseRatioForControlColorChannel ? 255 - normailizedCount : normailizedCount;
green = useInverseRatioForControlColorChannel ? 255 - normalizedCount : normalizedCount;
} else if (controlColorChannel.equals(Color.BLUE)) {
blue = useInverseRatioForControlColorChannel ? 255 - normailizedCount : normailizedCount;
blue = useInverseRatioForControlColorChannel ? 255 - normalizedCount : normalizedCount;
} else {
throw new Exception(
"[VisualizationOperator][GenerateColor] Unsupported changing color color type. It should be in R,G,B");
}

if (normailizedCount == 0) {
if (normalizedCount == 0) {
return new Color(red, green, blue, 255);
}
return new Color(red, green, blue, colorAlpha);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public HeatMap(
* @see VisualizationOperator#EncodeToColor(int)
*/
@Override
protected Integer EncodeToRGB(int normailizedCount) throws Exception {
protected Integer EncodeToRGB(int normalizedCount) throws Exception {
int alpha = 150;
Color[] colors =
new Color[] {
Expand All @@ -122,21 +122,21 @@ protected Integer EncodeToRGB(int normailizedCount) throws Exception {
new Color(255, 51, 0, alpha),
new Color(255, 0, 0, alpha)
};
if (normailizedCount < 1) {
if (normalizedCount < 1) {
return new Color(255, 255, 255, 0).getRGB();
} else if (normailizedCount < 30) {
} else if (normalizedCount < 30) {
return colors[0].getRGB();
} else if (normailizedCount < 50) {
} else if (normalizedCount < 50) {
return colors[1].getRGB();
} else if (normailizedCount < 70) {
} else if (normalizedCount < 70) {
return colors[2].getRGB();
} else if (normailizedCount < 100) {
} else if (normalizedCount < 100) {
return colors[3].getRGB();
} else if (normailizedCount < 130) {
} else if (normalizedCount < 130) {
return colors[4].getRGB();
} else if (normailizedCount < 160) {
} else if (normalizedCount < 160) {
return colors[5].getRGB();
} else if (normailizedCount < 190) {
} else if (normalizedCount < 190) {
return colors[6].getRGB();
} else {
return colors[7].getRGB();
Expand Down

0 comments on commit 809b5a7

Please sign in to comment.