Class Index [+]

Quicksearch

When::TM::Instant

瞬間 - 零次元幾何プリミティブ

see gml schema

Attributes

position[R]

この瞬間の時間位置

  type : When::TM::Position
begun_by[R]

この瞬間を始まりとする期間 (relation - Beginning)

  type : [When::TM::Period]
ended_by[R]

この瞬間を終わりとする期間 (relation - Ending)

  type : [When::TM::Period]
topology[R]

対応するノード (relation - Realization)

  type : When::TM::Node

Public Class Methods

new(position) click to toggle source

オブジェクトの生成

  position : When::TM::Position
    対応する時間位置
     # File when/tmobjects.rb, line 235
235:     def initialize(position)
236:       @position = position
237:       @begun_by = []
238:       @ended_by = []
239:     end

Public Instance Methods

distance(other) click to toggle source

他のWhen::TM::GeometricPrimitiveとの時間位置の差の絶対値

  other   : When::TM::GeometricPrimitive
  returns : When::TM::Duration
     # File when/tmobjects.rb, line 189
189:     def distance(other)
190:       case other
191:       when Instant
192:         return (self.position - other.position).abs
193:       when Period
194:         verify = other.begin.position - self.position
195:         return verify if +verify >= 0
196:         return [self.position - other.end.position, When.Duration(0)].max
197:       else
198:         raise TypeError, "The right operand should be When::TM::Instant or When::TM::Period"
199:       end
200:     end
length() click to toggle source

When::TM::GeometricPrimitive 自身の持続時間

  returns : When::TM::Duration
     # File when/tmobjects.rb, line 180
180:     def length()
181:       return When.Duration(0)
182:     end
relativePosition(other) click to toggle source
Alias for: relative_position
relative_position(other) click to toggle source

他のWhen::TM::Primitiveとの相対的な時間位置

  other   : When::TM::Primitive
  returns : When::TM::RelativePosition
     # File when/tmobjects.rb, line 207
207:     def relative_position(other)
208:       case other
209:       when Instant
210:         verify = self.position <=> other.position
211:         return RelativePosition::Before if verify <  0
212:         return RelativePosition::Equals if verify == 0
213:         return RelativePosition::After
214:       when Period
215:         verify = self.position <=> other.begin.position
216:         return RelativePosition::Before if verify <  0
217:         return RelativePosition::Begins if verify == 0
218:         verify = self.position <=> other.end.position
219:         return RelativePosition::During if verify <  0
220:         return RelativePosition::Ends   if verify == 0
221:         return RelativePosition::After
222:       else
223:         raise TypeError, "The right operand should be When::TM::Instant or When::TM::Period"
224:       end
225:     end
Also aliased as: relativePosition

Private Instance Methods

method_missing(name, *args, &block) click to toggle source

その他のメソッド

  When::TM::Instant で定義されていないメソッドは
  処理を @position (type: When::TM::Position) に委譲する
     # File when/tmobjects.rb, line 245
245:     def method_missing(name, *args, &block)
246:       @position.send(name.to_sym, *args, &block)
247:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.