public static enum Block.BranchParadigm extends Enum<Block.BranchParadigm>
"Branching" refers to atypical control flow in the survey. Default control flow randomizes questions inside
their containing blocks and floating blocks as appropriate. For example, a survey with the following structure:
1, Question 1
1, Question 2
1.1, Question 3
1.1, Question 4
1.2, Question 5
1.2, Question 6
permits the ordering
If we wanted the second ordering, we would need to set either or both of blocks 1.1 or/and 1.2 to randomizable. We can do this by prefixing the component of the identifier that denotes the containing block with an alpha- numeric character: 1.a1 or/and 1.b2. An error will be thrown if there is inconsistency in the identifiers.
Basic, or "true" branching happens when a survey writer wants respondents who answer one way to see a different set of questions from respondents who answer another way (or any k number of ways). It could be that some respondents simply answer more questions, so that the set of questions seen by one group of respondents is a subset of the set of questions seen by another set, or it could be that respondents in each set diverge completely after answering a particular question. SurveyMan does not distinguish between these two scenarios.
To implement "true" branching, a survey writer must specify a branch target for the responses to a branch question. SurveyMan only permits one branch question per top-level block. Branching is permitted out of any block, but only into top-level, stationary blocks. These policies ensure that randomization does not cause respondents who answer equivalently to see different questions.
SurveyMan only permits one true branch question per block. If a block's sub-block contains a branch question, then the following rules hold:
SurveyMan also permits sampling, which is treated as a form a branching. A block is sampled when every question it it has an identical branch map. Sampling blocks may not contain sub-blocks. The branch map may contain true branching information, or it may contain the NEXT pointer. When a sampling block's questions all have true branch maps, the containing block will treat the entire block as a branch question and will propagate its branching policy as in the true branching case. When a sampling block's question all have the NEXT pointer, the block will be treated as a non-branching question by its containing block.
Randomization is performed at runtime. For static blocks, SurveyMan can determine a partial order on questions at compile time. Branching occurs on the basis of input data and cannot be determined until runtime. True branching provides some limited information that could be used for speculative execution. Sampling with true branching further complicates static analyses, while sampling with the NEXT pointer pushes even more control flow logic to the runtime.
|Enum Constant and Description|
A block is set to ALL when every question in it has a branch map.
A block is set to NONE when none of its questions has a branch map, and when none of its sub-blocks are set to ONE.
A block is set to ONE when either it contains a question with a branch map, or when one of its descendant blocks is set to ONE.
|Modifier and Type||Method and Description|
Returns the enum constant of this type with the specified name.
Returns an array containing the constants of this enum type, in the order they are declared.
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
public static final Block.BranchParadigm ALL
public static final Block.BranchParadigm NONE
public static final Block.BranchParadigm ONE
public static final Block.BranchParadigm UNKNOWN
public static Block.BranchParadigm values()
for (Block.BranchParadigm c : Block.BranchParadigm.values()) System.out.println(c);
public static Block.BranchParadigm valueOf(String name)
Copyright © 2015. All rights reserved.