Collection.st
changeset 16811 81e87401e268
parent 16801 b7e023342d4f
child 16825 cd92bb151918
equal deleted inserted replaced
16810:f6b1aa12bd5f 16811:81e87401e268
  5088      The receiver consists of tupels defining a partial order.
  5088      The receiver consists of tupels defining a partial order.
  5089      Use the algorithm by R. E. Tarjan from 1972.
  5089      Use the algorithm by R. E. Tarjan from 1972.
  5090      Answer an OrderedCollection containing the sorted items.
  5090      Answer an OrderedCollection containing the sorted items.
  5091 
  5091 
  5092      If sortStable is true, try to make order stable among
  5092      If sortStable is true, try to make order stable among
  5093      multiple invocations. Othewise, stability is not guaranteed.
  5093      multiple invocations. If false, stability is not guaranteed.
  5094      "
  5094      "
  5095 
  5095 
  5096     |graph roots sorted count|
  5096     |graph roots sorted count|
  5097 
  5097 
  5098     "create a graph.
  5098     "create a graph.
  5192      ((Smalltalk allClasses asSortedCollection:[:a :b| a name < b name])collect:[:eachClass| 
  5192      ((Smalltalk allClasses asSortedCollection:[:a :b| a name < b name])collect:[:eachClass| 
  5193         Array with:eachClass superclass with:eachClass
  5193         Array with:eachClass superclass with:eachClass
  5194      ]) topologicalSort
  5194      ]) topologicalSort
  5195     "
  5195     "
  5196 
  5196 
  5197     "Created: / 05-06-2014 / 12:21:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  5197     "Modified: / 05-06-2014 / 12:21:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  5198 ! !
  5198 ! !
  5199 
  5199 
  5200 !Collection methodsFor:'statistical functions'!
  5200 !Collection methodsFor:'statistical functions'!
  5201 
  5201 
  5202 arithmeticMean
  5202 arithmeticMean
  5615 ! !
  5615 ! !
  5616 
  5616 
  5617 !Collection class methodsFor:'documentation'!
  5617 !Collection class methodsFor:'documentation'!
  5618 
  5618 
  5619 version
  5619 version
  5620     ^ '$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.348 2014-07-29 15:15:16 cg Exp $'
  5620     ^ '$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.349 2014-08-01 15:40:26 stefan Exp $'
  5621 !
  5621 !
  5622 
  5622 
  5623 version_CVS
  5623 version_CVS
  5624     ^ '$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.348 2014-07-29 15:15:16 cg Exp $'
  5624     ^ '$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.349 2014-08-01 15:40:26 stefan Exp $'
  5625 ! !
  5625 ! !
  5626 
  5626 
  5627 
  5627 
  5628 Collection initialize!
  5628 Collection initialize!