/// <summary>
            /// Produces the set of active columns for the data view (as a bool[] of length bindings.ColumnCount),
            /// a predicate for the needed active input columns, and a predicate for the needed active
            /// output columns.
            /// </summary>
            public bool[] GetActive(Func <int, bool> predicate, out Func <int, bool> predicateInput)
            {
                var active = GetActive(predicate);

                Contracts.Assert(active.Length == ColumnCount);

                var activeInput = GetActiveInput(predicate);

                Contracts.Assert(activeInput.Length == Input.ColumnCount);

                // Get a predicate that determines which outputs are active.
                var predicateOut = GetActiveOutputColumns(active);

                // Now map those to active input columns.
                var predicateIn = _mapper.GetDependencies(predicateOut);

                // Combine the two sets of input columns.
                predicateInput =
                    col => 0 <= col && col < activeInput.Length && (activeInput[col] || predicateIn(col));

                return(active);
            }