Class IfProgramBlock
- java.lang.Object
- 
- org.apache.sysds.runtime.controlprogram.ProgramBlock
- 
- org.apache.sysds.runtime.controlprogram.IfProgramBlock
 
 
- 
- All Implemented Interfaces:
- ParseInfo
 
 public class IfProgramBlock extends ProgramBlock 
- 
- 
Field Summary- 
Fields inherited from class org.apache.sysds.runtime.controlprogram.ProgramBlock_beginColumn, _beginLine, _endColumn, _endLine, _filename, _text, PRED_VAR
 
- 
 - 
Constructor SummaryConstructors Constructor Description IfProgramBlock(Program prog, ArrayList<Instruction> predicate)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddProgramBlockElseBody(ProgramBlock pb)voidaddProgramBlockIfBody(ProgramBlock pb)voidexecute(ExecutionContext ec)Executes this program block (incl recompilation if required).ArrayList<ProgramBlock>getChildBlocks()Get the list of child program blocks if nested; otherwise this method returns null.ArrayList<ProgramBlock>getChildBlocksElseBody()ArrayList<ProgramBlock>getChildBlocksIfBody()ArrayList<Instruction>getPredicate()booleanisNested()Indicates if the program block is nested, i.e., if it contains other program blocks (e.g., loops).StringprintBlockErrorLocation()voidsetChildBlocksElseBody(ArrayList<ProgramBlock> blocks)voidsetChildBlocksIfBody(ArrayList<ProgramBlock> blocks)voidsetLineageDedupPathPos(int pos)voidsetPredicate(ArrayList<Instruction> predicate)- 
Methods inherited from class org.apache.sysds.runtime.controlprogram.ProgramBlockexecutePredicate, getBeginColumn, getBeginLine, getEndColumn, getEndLine, getExitInstruction, getFilename, getProgram, getStatementBlock, getText, getThreadID, hasThreadID, isThreadID, setBeginColumn, setBeginLine, setEndColumn, setEndLine, setExitInstruction, setFilename, setParseInfo, setProgram, setStatementBlock, setText, setThreadID
 
- 
 
- 
- 
- 
Constructor Detail- 
IfProgramBlockpublic IfProgramBlock(Program prog, ArrayList<Instruction> predicate) 
 
- 
 - 
Method Detail- 
getChildBlocksIfBodypublic ArrayList<ProgramBlock> getChildBlocksIfBody() 
 - 
setChildBlocksIfBodypublic void setChildBlocksIfBody(ArrayList<ProgramBlock> blocks) 
 - 
addProgramBlockIfBodypublic void addProgramBlockIfBody(ProgramBlock pb) 
 - 
getChildBlocksElseBodypublic ArrayList<ProgramBlock> getChildBlocksElseBody() 
 - 
setChildBlocksElseBodypublic void setChildBlocksElseBody(ArrayList<ProgramBlock> blocks) 
 - 
addProgramBlockElseBodypublic void addProgramBlockElseBody(ProgramBlock pb) 
 - 
getPredicatepublic ArrayList<Instruction> getPredicate() 
 - 
setPredicatepublic void setPredicate(ArrayList<Instruction> predicate) 
 - 
getChildBlockspublic ArrayList<ProgramBlock> getChildBlocks() Description copied from class:ProgramBlockGet the list of child program blocks if nested; otherwise this method returns null.- Specified by:
- getChildBlocksin class- ProgramBlock
- Returns:
- list of program blocks
 
 - 
isNestedpublic boolean isNested() Description copied from class:ProgramBlockIndicates if the program block is nested, i.e., if it contains other program blocks (e.g., loops).- Specified by:
- isNestedin class- ProgramBlock
- Returns:
- true if nested
 
 - 
setLineageDedupPathPospublic void setLineageDedupPathPos(int pos) 
 - 
executepublic void execute(ExecutionContext ec) Description copied from class:ProgramBlockExecutes this program block (incl recompilation if required).- Specified by:
- executein class- ProgramBlock
- Parameters:
- ec- execution context
 
 - 
printBlockErrorLocationpublic String printBlockErrorLocation() - Overrides:
- printBlockErrorLocationin class- ProgramBlock
 
 
- 
 
-