aboutsummaryrefslogtreecommitdiff
path: root/src/client/northstar/model/ModelHelpers.ts
diff options
context:
space:
mode:
authorEleanor Eng <eleanor_eng@brown.edu>2019-04-09 16:35:06 -0400
committerEleanor Eng <eleanor_eng@brown.edu>2019-04-09 16:35:06 -0400
commitd361982c22738b35b42283176803158b33cf5cd3 (patch)
treea28405073490ed8e6a049338f140ba9e5e4458db /src/client/northstar/model/ModelHelpers.ts
parent1d5b7d0b6de932f7e09b3ab229b576f14a4ec71e (diff)
parent89fd4327db1536990b4a4dc218819a1077f82445 (diff)
pull from master
Diffstat (limited to 'src/client/northstar/model/ModelHelpers.ts')
-rw-r--r--src/client/northstar/model/ModelHelpers.ts18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/client/northstar/model/ModelHelpers.ts b/src/client/northstar/model/ModelHelpers.ts
index d0711fb69..ac807b41f 100644
--- a/src/client/northstar/model/ModelHelpers.ts
+++ b/src/client/northstar/model/ModelHelpers.ts
@@ -16,7 +16,7 @@ export class ModelHelpers {
public static CreateAggregateKey(distinctAttributeParameters: AttributeParameters | undefined, atm: AttributeTransformationModel, histogramResult: HistogramResult,
brushIndex: number, aggParameters?: SingleDimensionAggregateParameters): AggregateKey {
{
- if (aggParameters == undefined) {
+ if (aggParameters === undefined) {
aggParameters = ModelHelpers.GetAggregateParameter(distinctAttributeParameters, atm);
}
else {
@@ -64,7 +64,7 @@ export class ModelHelpers {
if (aggParams) {
aggregateParameters.push(aggParams);
- var margin = new MarginAggregateParameters()
+ var margin = new MarginAggregateParameters();
margin.aggregateFunction = agg.AggregateFunction;
margin.attributeParameters = ModelHelpers.GetAttributeParameters(agg.AttributeModel);
margin.distinctAttributeParameters = distinctAttributeParameters;
@@ -106,7 +106,7 @@ export class ModelHelpers {
{
rawName: am.CodeName,
visualizationHints: am.VisualizationHints,
- id: (am as BackendAttributeModel).Id
+ id: (am).Id
});
}
else if (am instanceof CodeAttributeModel) {
@@ -114,11 +114,11 @@ export class ModelHelpers {
{
rawName: am.CodeName,
visualizationHints: am.VisualizationHints,
- code: (am as CodeAttributeModel).Code
+ code: (am).Code
});
}
else {
- throw new Exception()
+ throw new Exception();
}
}
@@ -146,7 +146,7 @@ export class ModelHelpers {
}
public static GetAggregateResult(bin: Bin, aggregateKey: AggregateKey) {
- if (aggregateKey.aggregateParameterIndex == -1 || aggregateKey.brushIndex == -1) {
+ if (aggregateKey.aggregateParameterIndex === -1 || aggregateKey.brushIndex === -1) {
return null;
}
return bin.aggregateResults![aggregateKey.aggregateParameterIndex! * bin.ySize! + aggregateKey.brushIndex!];
@@ -157,9 +157,9 @@ export class ModelHelpers {
var ret = new Array<AggregateFunction>();
ret.push(AggregateFunction.None);
ret.push(AggregateFunction.Count);
- if (atm.AttributeModel.DataType == DataType.Float ||
- atm.AttributeModel.DataType == DataType.Double ||
- atm.AttributeModel.DataType == DataType.Int) {
+ if (atm.AttributeModel.DataType === DataType.Float ||
+ atm.AttributeModel.DataType === DataType.Double ||
+ atm.AttributeModel.DataType === DataType.Int) {
ret.push(AggregateFunction.Avg);
ret.push(AggregateFunction.Sum);
}