Skip to content

Commit

Permalink
feat: use slices for sequence representations
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianBirchler committed Aug 19, 2024
1 parent 29b11f1 commit 852cec0
Show file tree
Hide file tree
Showing 14 changed files with 292 additions and 292 deletions.
26 changes: 13 additions & 13 deletions core.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ type EUnitSlope struct {
type EUnitSpeed struct {
}

type TGrEqZero struct {
type GrEqZero struct {
}

type TGrEqZeroOrContactPoint struct {
type GrEqZeroOrContactPoint struct {
}

type TGrZero struct {
type GrZero struct {
}

type TYesNo struct {
type YesNo struct {
}

type TZeroOne struct {
type ZeroOne struct {
}

// TODO: Doc formatting needs to be implemented!
Expand All @@ -57,10 +57,10 @@ type DataQualityRawData struct {
// TODO: Doc formatting needs to be implemented!
type Header struct {
OpenDriveElement
GeoReference HeaderGeoReference
Offset HeaderOffset
License License
DefaultRegulations HeaderDefaultRegulations
GeoReference []*HeaderGeoReference
Offset []*HeaderOffset
License []*License
DefaultRegulations []*HeaderDefaultRegulations
Date string
East float64
Name string
Expand All @@ -76,8 +76,8 @@ type Header struct {
// TODO: Doc formatting needs to be implemented!
type HeaderDefaultRegulations struct {
OpenDriveElement
RoadRegulations HeaderRoadRegulation
SignalRegulations HeaderSignalRegulation
RoadRegulations []*HeaderRoadRegulation
SignalRegulations []*HeaderSignalRegulation
}

// TODO: Doc formatting needs to be implemented!
Expand All @@ -96,14 +96,14 @@ type HeaderOffset struct {
// TODO: Doc formatting needs to be implemented!
type HeaderRoadRegulation struct {
OpenDriveElement
Semantics SignalsSemantics
Semantics []*SignalsSemantics
Type ERoadType
}

// TODO: Doc formatting needs to be implemented!
type HeaderSignalRegulation struct {
OpenDriveElement
Semantics SignalsSemantics
Semantics []*SignalsSemantics
Subtype string
Type string
}
Expand Down
70 changes: 35 additions & 35 deletions junction.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type ERoadSurfaceCrgMode struct {
type ERoadSurfaceCrgPurpose struct {
}

type TJunctionGridPositionList struct {
type JunctionGridPositionList struct {
}

// TODO: Doc formatting needs to be implemented!
Expand All @@ -37,7 +37,7 @@ type Junction struct {
// TODO: Doc formatting needs to be implemented!
type JunctionBoundary struct {
OpenDriveElement
Segment JunctionBoundarySegment
Segment []*JunctionBoundarySegment
}

// TODO: Doc formatting needs to be implemented!
Expand All @@ -58,21 +58,21 @@ type JunctionBoundarySegmentLane struct {
// TODO: Doc formatting needs to be implemented!
type JunctionCommon struct {
Junction
Connection JunctionConnectionCommon
CrossPath JunctionCrossPath
Priority JunctionPriority
Controller JunctionController
Surface RoadSurface
PlanView RoadPlanView
Objects RoadObjects
Boundary JunctionBoundary
ElevationGrid JunctionElevationGrid
Connection []*JunctionConnectionCommon
CrossPath []*JunctionCrossPath
Priority []*JunctionPriority
Controller []*JunctionController
Surface []*RoadSurface
PlanView []*RoadPlanView
Objects []*RoadObjects
Boundary []*JunctionBoundary
ElevationGrid []*JunctionElevationGrid
}

// TODO: Doc formatting needs to be implemented!
type JunctionConnection struct {
OpenDriveElement
LaneLink JunctionConnectionLaneLink
LaneLink []*JunctionConnectionLaneLink
}

// TODO: Doc formatting needs to be implemented!
Expand All @@ -93,8 +93,8 @@ type JunctionConnectionLaneLink struct {
// TODO: Doc formatting needs to be implemented!
type JunctionConnectionVirtual struct {
JunctionConnection
Predecessor JunctionPredecessorSuccessor
Successor JunctionPredecessorSuccessor
Predecessor []*JunctionPredecessorSuccessor
Successor []*JunctionPredecessorSuccessor
}

// TODO: Doc formatting needs to be implemented!
Expand All @@ -110,12 +110,12 @@ type JunctionController struct {
// TODO: Doc formatting needs to be implemented!
type JunctionCrossing struct {
Junction
RoadSection JunctionRoadSection
Priority JunctionPriority
Controller JunctionController
Surface RoadSurface
PlanView RoadPlanView
Objects RoadObjects
RoadSection []*JunctionRoadSection
Priority []*JunctionPriority
Controller []*JunctionController
Surface []*RoadSurface
PlanView []*RoadPlanView
Objects []*RoadObjects
}

// TODO: Doc formatting needs to be implemented!
Expand All @@ -136,18 +136,18 @@ type JunctionCrossPathLaneLink struct {
// TODO: Doc formatting needs to be implemented!
type JunctionDirect struct {
Junction
Connection JunctionConnectionDirect
Priority JunctionPriority
Controller JunctionController
Surface RoadSurface
PlanView RoadPlanView
Objects RoadObjects
Connection []*JunctionConnectionDirect
Priority []*JunctionPriority
Controller []*JunctionController
Surface []*RoadSurface
PlanView []*RoadPlanView
Objects []*RoadObjects
}

// TODO: Doc formatting needs to be implemented!
type JunctionElevationGrid struct {
OpenDriveElement
Elevation JunctionElevationGridElevation
Elevation []*JunctionElevationGridElevation
}

// TODO: Doc formatting needs to be implemented!
Expand All @@ -173,19 +173,19 @@ type JunctionRoadSection struct {
// TODO: Doc formatting needs to be implemented!
type JunctionVirtual struct {
Junction
Connection JunctionConnection
CrossPath JunctionCrossPath
Priority JunctionPriority
Controller JunctionController
Surface RoadSurface
PlanView RoadPlanView
Objects RoadObjects
Connection []*JunctionConnection
CrossPath []*JunctionCrossPath
Priority []*JunctionPriority
Controller []*JunctionController
Surface []*RoadSurface
PlanView []*RoadPlanView
Objects []*RoadObjects
}

// TODO: Doc formatting needs to be implemented!
type JunctionGroup struct {
OpenDriveElement
JunctionReference JunctionGroupJunctionReference
JunctionReference []*JunctionGroupJunctionReference
}

// TODO: Doc formatting needs to be implemented!
Expand Down
50 changes: 25 additions & 25 deletions lane.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ type ERoadMarkType struct {
type ERoadMarkWeight struct {
}

type TBool struct {
type Bool struct {
}

// TODO: Doc formatting needs to be implemented!
type RoadLanes struct {
OpenDriveElement
LaneOffset RoadLanesLaneOffset
LaneSection RoadLanesLaneSection
LaneOffset []*RoadLanesLaneOffset
LaneSection []*RoadLanesLaneSection
}

// TODO: Doc formatting needs to be implemented!
Expand All @@ -50,21 +50,21 @@ type RoadLanesLaneOffset struct {
// TODO: Doc formatting needs to be implemented!
type RoadLanesLaneSection struct {
OpenDriveElement
Left RoadLanesLaneSectionLeft
Center RoadLanesLaneSectionCenter
Right RoadLanesLaneSectionRight
Left []*RoadLanesLaneSectionLeft
Center []*RoadLanesLaneSectionCenter
Right []*RoadLanesLaneSectionRight
}

// TODO: Doc formatting needs to be implemented!
type RoadLanesLaneSectionCenter struct {
OpenDriveElement
Lane RoadLanesLaneSectionCenterLane
Lane []*RoadLanesLaneSectionCenterLane
}

// TODO: Doc formatting needs to be implemented!
type RoadLanesLaneSectionCenterLane struct {
Id int
Level TBool
Level Bool
Type ELaneType
Link RoadLanesLaneSectionLcrLaneLink
RoadMark RoadLanesLaneSectionLcrLaneRoadMark
Expand All @@ -73,8 +73,8 @@ type RoadLanesLaneSectionCenterLane struct {
// TODO: Doc formatting needs to be implemented!
type RoadLanesLaneSectionLcrLaneLink struct {
OpenDriveElement
Predecessor RoadLanesLaneSectionLcrLaneLinkPredecessorSuccessor
Successor RoadLanesLaneSectionLcrLaneLinkPredecessorSuccessor
Predecessor []*RoadLanesLaneSectionLcrLaneLinkPredecessorSuccessor
Successor []*RoadLanesLaneSectionLcrLaneLinkPredecessorSuccessor
}

// TODO: Doc formatting needs to be implemented!
Expand All @@ -85,15 +85,15 @@ type RoadLanesLaneSectionLcrLaneLinkPredecessorSuccessor struct {
// TODO: Doc formatting needs to be implemented!
type RoadLanesLaneSectionLcrLaneRoadMark struct {
OpenDriveElement
Sway RoadLanesLaneSectionLcrLaneRoadMarkSway
Type RoadLanesLaneSectionLcrLaneRoadMarkType
Explicit RoadLanesLaneSectionLcrLaneRoadMarkExplicit
Sway []*RoadLanesLaneSectionLcrLaneRoadMarkSway
Type []*RoadLanesLaneSectionLcrLaneRoadMarkType
Explicit []*RoadLanesLaneSectionLcrLaneRoadMarkExplicit
}

// TODO: Doc formatting needs to be implemented!
type RoadLanesLaneSectionLcrLaneRoadMarkExplicit struct {
OpenDriveElement
Line RoadLanesLaneSectionLcrLaneRoadMarkExplicitLine
Line []*RoadLanesLaneSectionLcrLaneRoadMarkExplicitLine
}

// TODO: Doc formatting needs to be implemented!
Expand All @@ -109,7 +109,7 @@ type RoadLanesLaneSectionLcrLaneRoadMarkSway struct {
// TODO: Doc formatting needs to be implemented!
type RoadLanesLaneSectionLcrLaneRoadMarkType struct {
OpenDriveElement
Line RoadLanesLaneSectionLcrLaneRoadMarkTypeLine
Line []*RoadLanesLaneSectionLcrLaneRoadMarkTypeLine
}

// TODO: Doc formatting needs to be implemented!
Expand All @@ -120,7 +120,7 @@ type RoadLanesLaneSectionLcrLaneRoadMarkTypeLine struct {
// TODO: Doc formatting needs to be implemented!
type RoadLanesLaneSectionLeft struct {
OpenDriveElement
Lane RoadLanesLaneSectionLeftLane
Lane []*RoadLanesLaneSectionLeftLane
}

// TODO: Doc formatting needs to be implemented!
Expand All @@ -131,19 +131,19 @@ type RoadLanesLaneSectionLeftLane struct {
// TODO: Doc formatting needs to be implemented!
type RoadLanesLaneSectionLrLane struct {
OpenDriveElement
Link RoadLanesLaneSectionLcrLaneLink
RoadMark RoadLanesLaneSectionLcrLaneRoadMark
Material RoadLanesLaneSectionLrLaneMaterial
Speed RoadLanesLaneSectionLrLaneSpeed
Access RoadLanesLaneSectionLrLaneAccess
Height RoadLanesLaneSectionLrLaneHeight
Rule RoadLanesLaneSectionLrLaneRule
Link []*RoadLanesLaneSectionLcrLaneLink
RoadMark []*RoadLanesLaneSectionLcrLaneRoadMark
Material []*RoadLanesLaneSectionLrLaneMaterial
Speed []*RoadLanesLaneSectionLrLaneSpeed
Access []*RoadLanesLaneSectionLrLaneAccess
Height []*RoadLanesLaneSectionLrLaneHeight
Rule []*RoadLanesLaneSectionLrLaneRule
}

// TODO: Doc formatting needs to be implemented!
type RoadLanesLaneSectionLrLaneAccess struct {
OpenDriveElement
Restriction RoadLanesLaneSectionLrLaneAccessRestriction
Restriction []*RoadLanesLaneSectionLrLaneAccessRestriction
}

// TODO: Doc formatting needs to be implemented!
Expand Down Expand Up @@ -184,7 +184,7 @@ type RoadLanesLaneSectionLrLaneWidth struct {
// TODO: Doc formatting needs to be implemented!
type RoadLanesLaneSectionRight struct {
OpenDriveElement
Lane RoadLanesLaneSectionRightLane
Lane []*RoadLanesLaneSectionRightLane
}

// TODO: Doc formatting needs to be implemented!
Expand Down
Loading

0 comments on commit 852cec0

Please sign in to comment.