Class ForProgramBlock
- java.lang.Object
- 
- org.apache.sysds.runtime.controlprogram.ProgramBlock
- 
- org.apache.sysds.runtime.controlprogram.ForProgramBlock
 
 
- 
- All Implemented Interfaces:
- ParseInfo
 - Direct Known Subclasses:
- ParForProgramBlock
 
 public class ForProgramBlock 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 ForProgramBlock(Program prog, String iterPredVar)
 - 
Method SummaryAll 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>getFromInstructions()ArrayList<Instruction>getIncrementInstructions()StringgetIterVar()ArrayList<Instruction>getToInstructions()booleanisNested()Indicates if the program block is nested, i.e., if it contains other program blocks (e.g., loops).StringprintBlockErrorLocation()voidsetChildBlocks(ArrayList<ProgramBlock> pbs)voidsetFromInstructions(ArrayList<Instruction> instructions)voidsetIncrementInstructions(ArrayList<Instruction> instructions)voidsetToInstructions(ArrayList<Instruction> instructions)- 
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
 
- 
 
- 
- 
- 
Method Detail- 
getFromInstructionspublic ArrayList<Instruction> getFromInstructions() 
 - 
setFromInstructionspublic void setFromInstructions(ArrayList<Instruction> instructions) 
 - 
getToInstructionspublic ArrayList<Instruction> getToInstructions() 
 - 
setToInstructionspublic void setToInstructions(ArrayList<Instruction> instructions) 
 - 
getIncrementInstructionspublic ArrayList<Instruction> getIncrementInstructions() 
 - 
setIncrementInstructionspublic void setIncrementInstructions(ArrayList<Instruction> instructions) 
 - 
addProgramBlockpublic void addProgramBlock(ProgramBlock childBlock) 
 - 
setChildBlockspublic void setChildBlocks(ArrayList<ProgramBlock> pbs) 
 - 
getIterVarpublic String getIterVar() 
 - 
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
 
 - 
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
 
 
- 
 
-