Skip to content
Snippets Groups Projects
Commit 309e1833 authored by Powers, Peter M.'s avatar Powers, Peter M.
Browse files

ground motion logic tree toString

parent 88a75456
No related branches found
No related tags found
1 merge request!273Site, tree, and NGA-East edits
...@@ -165,6 +165,11 @@ public class GroundMotions { ...@@ -165,6 +165,11 @@ public class GroundMotions {
return 1; return 1;
} }
@Override
public String toString() {
return LogicTree.toString(this);
}
@Override @Override
public Branch<GroundMotion> get(int index) { public Branch<GroundMotion> get(int index) {
return new Branch<GroundMotion>() { return new Branch<GroundMotion>() {
...@@ -183,6 +188,11 @@ public class GroundMotions { ...@@ -183,6 +188,11 @@ public class GroundMotions {
public double weight() { public double weight() {
return 1.0; return 1.0;
} }
@Override
public String toString() {
return Branch.toString(this);
}
}; };
} }
} }
...@@ -218,6 +228,16 @@ public class GroundMotions { ...@@ -218,6 +228,16 @@ public class GroundMotions {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
@Override
public int size() {
return μs.length;
}
@Override
public String toString() {
return LogicTree.toString(this);
}
@Override @Override
public Branch<GroundMotion> get(int index) { public Branch<GroundMotion> get(int index) {
return new Branch<GroundMotion>() { return new Branch<GroundMotion>() {
...@@ -235,12 +255,12 @@ public class GroundMotions { ...@@ -235,12 +255,12 @@ public class GroundMotions {
public double weight() { public double weight() {
return wts[index]; return wts[index];
} }
};
}
@Override @Override
public int size() { public String toString() {
return μs.length; return Branch.toString(this);
}
};
} }
} }
...@@ -288,6 +308,11 @@ public class GroundMotions { ...@@ -288,6 +308,11 @@ public class GroundMotions {
return μs.length * σs.length; return μs.length * σs.length;
} }
@Override
public String toString() {
return LogicTree.toString(this);
}
@Override @Override
public Branch<GroundMotion> get(int index) { public Branch<GroundMotion> get(int index) {
return new Branch<GroundMotion>() { return new Branch<GroundMotion>() {
...@@ -314,6 +339,11 @@ public class GroundMotions { ...@@ -314,6 +339,11 @@ public class GroundMotions {
public double weight() { public double weight() {
return μWts[μIndex] * σWts[σIndex]; return μWts[μIndex] * σWts[σIndex];
} }
@Override
public String toString() {
return Branch.toString(this);
}
}; };
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment