void validity_checker_t::valid_trajectory(const space_t* space, const trajectory_t& input, trajectory_t& result)
        {
            result.clear();

            foreach(state_t* state, input)
            {
                if( !is_valid(state) )
                    return;
                result.copy_onto_back(state);
            }
        }
        void validity_checker_t::valid_trajectory_prefix(const space_t* space, const trajectory_t& input, trajectory_t& result, unsigned int size)
        {
            unsigned int traj_size = 0;
            result.clear();

            foreach(state_t* state, input)
            {
                if( !is_valid(state) || traj_size == size )
                    return;
                result.copy_onto_back(state);
                traj_size++;
            }
        }