Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trait-based geometry types (no cost abstractions!) WIP. #85

Closed
wants to merge 34 commits into from

Conversation

frewsxcv
Copy link
Member

#67

type ItemType: LineStringTrait<T>;
type Iter: Iterator<Item=Self::ItemType>;

fn rings(&self) -> Self::Iter;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't a polygon have one outer ring and optional inner rings?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was going to discuss that eventually, so I guess we could do it now. For now, I'm just going to assume the first item in this iterator is the outer ring and following items are inner rings. We could probably migrate this to:

    fn outer_ring(&self) -> Self::ItemType;
    fn inner_rings(&self) -> Self::Iter {
        // Default is no inner rings
        std::iter::empty()
    }

Unless someone has a better idea for this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is nice :)

@Turbo87
Copy link
Member

Turbo87 commented Jun 18, 2017

@frewsxcv any progress on this? if not, any way we can help move this forward?

@frewsxcv
Copy link
Member Author

frewsxcv commented Sep 4, 2017

I'm trying to make these changes more incremental with other PRs, for example #151

I did hit a roadblock with this and I remember needing access to streaming iterators, which aren't a thing in Rust (yet). This is pretty out-of-date and stale at this point, so I'm going to close it.

@frewsxcv frewsxcv closed this Sep 4, 2017
@frewsxcv frewsxcv deleted the no-cost-abstractions branch September 4, 2017 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants