TaskNode

public class TaskNode : NSObject

Author

Tebin Raouf

The class to represent a task in the Critical Path Application

  • The name of the TaskNode

    Declaration

    Swift

    public var name: String
  • The duration of the TaskNode

    Declaration

    Swift

    public var duration: Int
  • Indicate if a TaskNode is visitted in a Graph structure or other linked structures

    Declaration

    Swift

    public var isVisitted: Bool
  • The TaskNode successors

    Declaration

    Swift

    public var successors: [Edge]
  • The TaskNode predecessors

    Declaration

    Swift

    public var predecessors: [Edge]
  • The TaskNode early start (ES)

    Declaration

    Swift

    public var earlyStart: Int
  • The TaskNode early finish (EF)

    Declaration

    Swift

    public var earlyFinish: Int
  • The TaskNode late start (LS)

    Declaration

    Swift

    public var lateStart: Int
  • The TaskNode last finish (LF)

    Declaration

    Swift

    public var lateFinish: Int
  • The TaskNode slack

    Declaration

    Swift

    public var slack: Int
  • Indicate if a TaskNode is on a critical path

    Declaration

    Swift

    public var isOnCriticalPath: Bool
  • Indicate if Early Start and Early Finish are set

    Declaration

    Swift

    public var isEarlySet: Bool
  • Indicate if Late Start and Late Finish are set

    Declaration

    Swift

    public var isLateSet: Bool
  • The description of the task is the name of the task

    Declaration

    Swift

    public override var description: String { get }
  • Initialize a TaskNode

    Initial Values include:

    1. successors = empty
    2. predecessors = empty
    3. isVisitted, isOnCriticalPath, isEarlySet, isLateSet = false
    4. lateStart, lateFinish, earlyStart, earlyFinish, slack = -1

    Declaration

    Swift

    public init(name: String, duration: Int)

    Parameters

    name

    the name of the TaskNode

    duration

    the duration of the TaskNode