Package gaiasky.data.octreegen.generator
Class BrightestStars
- java.lang.Object
-
- gaiasky.data.octreegen.generator.BrightestStars
-
- All Implemented Interfaces:
IAggregationAlgorithm
public class BrightestStars extends java.lang.Object implements IAggregationAlgorithm
-
-
Constructor Summary
Constructors Constructor Description BrightestStars(int maxDepth, int maxPart, int minPart, boolean discard)Constructor using fields
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetDiscarded()Returns the number of discarded stars by this algorithm so far.intgetMaxDepth()Returns the max depth setting.intgetMaxPart()Gets the maximum number of particles in a single nodebooleansample(java.util.List<ParticleGroup.ParticleBean> inputStars, OctreeNode octant, float percentage)Creates the sub-sample from the given input stars.
-
-
-
Constructor Detail
-
BrightestStars
public BrightestStars(int maxDepth, int maxPart, int minPart, boolean discard)Constructor using fields- Parameters:
maxDepth- Maximum depth of the octreemaxPart- Number of objects in the densest node of this levelminPart- Number of objects below which we do not further break the octreediscard- Whether to discard stars due to density or not
-
-
Method Detail
-
sample
public boolean sample(java.util.List<ParticleGroup.ParticleBean> inputStars, OctreeNode octant, float percentage)
Description copied from interface:IAggregationAlgorithmCreates the sub-sample from the given input stars. All these stars should be in the box defined by the center and the sizes.- Specified by:
samplein interfaceIAggregationAlgorithm- Parameters:
inputStars- The actual stars that are inside the octant.octant- The octant that characterizes the box with its center, size and depth well set.percentage- The percentage of objects to be included in the octant.- Returns:
- True if we are in a leaf.
-
getMaxPart
public int getMaxPart()
Description copied from interface:IAggregationAlgorithmGets the maximum number of particles in a single node- Specified by:
getMaxPartin interfaceIAggregationAlgorithm- Returns:
- maximum number of particles in a node
-
getDiscarded
public int getDiscarded()
Description copied from interface:IAggregationAlgorithmReturns the number of discarded stars by this algorithm so far.- Specified by:
getDiscardedin interfaceIAggregationAlgorithm- Returns:
- The number of stars discarded.
-
getMaxDepth
public int getMaxDepth()
Description copied from interface:IAggregationAlgorithmReturns the max depth setting.- Specified by:
getMaxDepthin interfaceIAggregationAlgorithm- Returns:
- The max depth
-
-