private function items(): array
    {
        $items = [];

        foreach ($this->samples as $sample) {
            foreach ($sample as $item) {
                if (!in_array($item, $items, true)) {
                    $items[] = $item;
                }
            }
        }

        return array_map(function ($entry) {
            return [$entry];
        }, $items);
    }
private function items(): array
    {
        $items = [];

        foreach ($this->samples as $sample) {
            foreach ($sample as $item) {
                if (!in_array($item, $items, true)) {
                    $items[] = $item;
                }
            }
        }

        return array_map(function ($entry) {
            return [$entry];
        }, $items);
    }
private function items ( ) : array { $ items = [ ] ; foreach ( $ this -> samples as $ sample ) { foreach ( $ sample as $ item ) { if ( ! in_array ( $ item , $ items , true ) ) { $ items [ ] = $ item ; } } } return array_map ( function ( $ entry ) { return [ $ entry ] ; } , $ items ) ; }
Calculates frequent k = 1 item sets.

@return mixed[][]
Calculates frequent k = 1 item sets .