Class WhileProgramBlock
- java.lang.Object
 - 
- org.apache.sysds.runtime.controlprogram.ProgramBlock
 - 
- org.apache.sysds.runtime.controlprogram.WhileProgramBlock
 
 
 
- 
- All Implemented Interfaces:
 ParseInfo
public class WhileProgramBlock extends ProgramBlock
 
- 
- 
Field Summary
- 
Fields inherited from class org.apache.sysds.runtime.controlprogram.ProgramBlock
_beginColumn, _beginLine, _endColumn, _endLine, _filename, _text, CHECK_MATRIX_PROPERTIES, PRED_VAR 
 - 
 
- 
Constructor Summary
Constructors Constructor Description WhileProgramBlock(Program prog, ArrayList<Instruction> predicate) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddProgramBlock(ProgramBlock childBlock)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<Instruction>getPredicate()booleanisNested()Indicates if the program block is nested, i.e., if it contains other program blocks (e.g., loops).StringprintBlockErrorLocation()voidsetChildBlocks(ArrayList<ProgramBlock> childs)voidsetPredicate(ArrayList<Instruction> predicate)- 
Methods inherited from class org.apache.sysds.runtime.controlprogram.ProgramBlock
executePredicate, getBeginColumn, getBeginLine, getEndColumn, getEndLine, getExitInstruction, getFilename, getProgram, getStatementBlock, getText, getThreadID, hasThreadID, isThreadID, setBeginColumn, setBeginLine, setEndColumn, setEndLine, setExitInstruction, setFilename, setParseInfo, setStatementBlock, setText, setThreadID 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
WhileProgramBlock
public WhileProgramBlock(Program prog, ArrayList<Instruction> predicate)
 
 - 
 
- 
Method Detail
- 
addProgramBlock
public void addProgramBlock(ProgramBlock childBlock)
 
- 
getPredicate
public ArrayList<Instruction> getPredicate()
 
- 
setPredicate
public void setPredicate(ArrayList<Instruction> predicate)
 
- 
getChildBlocks
public ArrayList<ProgramBlock> getChildBlocks()
Description copied from class:ProgramBlockGet the list of child program blocks if nested; otherwise this method returns null.- Specified by:
 getChildBlocksin classProgramBlock- Returns:
 - list of program blocks
 
 
- 
isNested
public 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 classProgramBlock- Returns:
 - true if nested
 
 
- 
execute
public void execute(ExecutionContext ec)
Description copied from class:ProgramBlockExecutes this program block (incl recompilation if required).- Specified by:
 executein classProgramBlock- Parameters:
 ec- execution context
 
- 
setChildBlocks
public void setChildBlocks(ArrayList<ProgramBlock> childs)
 
- 
printBlockErrorLocation
public String printBlockErrorLocation()
- Overrides:
 printBlockErrorLocationin classProgramBlock
 
 - 
 
 -