Вопросы по теме 'tree'

Как получить всех потомков объекта в Ruby on Rails
У меня есть модели, связанные следующим образом: GrandParent has_many :kids has_many :grand_children, through: :kids Kid belongs_to :grand_parent has_many :grand_kids GrandKid belongs_to :kid Я просто хотел бы вызвать .descendants...
852 просмотров
schedule 17.03.2024

рекурсивная оценка хвоста дерева n-арности в scala
У меня есть структура дерева, которая является более общей, чем структура двоичного дерева. sealed trait Tree[+A] case class Leaf[A](value: Terminal[A]) extends Tree[A] case class Node[A](op: Function[A], branches: Tree[A]*) extends Tree[A]...
180 просмотров
schedule 20.03.2024