home | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Java example source code file (partitioning.puml)

This example Java source code file (partitioning.puml) is included in the alvinalexander.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Learn more about this Java project at its project page.

Java - Java tags/keywords

abstractsubhyperplane_s_t_, apache, asf, bsptree_s_, bsptreevisitor_s_, f3efeb, license, location, region_s_, see, side, space, subhyperplane, you

The partitioning.puml Java example source code

' Licensed to the Apache Software Foundation (ASF) under one or more
' contributor license agreements.  See the NOTICE file distributed with
' this work for additional information regarding copyright ownership.
' The ASF licenses this file to You under the Apache License, Version 2.0
' (the "License"); you may not use this file except in compliance with
' the License.  You may obtain a copy of the License at
'      http://www.apache.org/licenses/LICENSE-2.0
' Unless required by applicable law or agreed to in writing, software
' distributed under the License is distributed on an "AS IS" BASIS,
' See the License for the specific language governing permissions and
' limitations under the License.


  skinparam svek                  true
  skinparam ClassBackgroundColor  #F3EFEB
  skinparam ClassArrowColor       #691616
  skinparam ClassBorderColor      #691616
  skinparam NoteBackgroundColor   #F3EFEB
  skinparam NoteBorderColor       #691616
  skinparam NoteFontColor         #691616
  skinparam ClassFontSize         11

  package org.apache.commons.math3.geometry #ECEBD8

    package partitioning #DDEBD8

      abstract "AbstractSubHyperplane<S extends Space, T extends Space>" as AbstractSubHyperplane_S_T_
      note left
        an abstract sub-hyperplane contains
         - an hyperplane defined in space S
         - a region defined in space T
        T being a sub-space of S
      end note

      interface "Hyperplane<S extends Space>" as Hyperplane_S_ {
        +double getOffset(Vector point)
        +boolean sameOrientationAs(Hyperplane other)
        +SubHyperplane wholeHyperplane()
        +Region wholeSpace()

      interface "SubHyperplane<S extends Space>" as SubHyperplane_S_ {
        +Hyperplane getHyperplane()
        +boolean isEmpty()
        +double getSize()
        +Side side(Hyperplane hyperplane)
        +SplitSubHyperplane split(Hyperplane hyperplane)
        +SubHyperplane reunite(SubHyperplane other)

      class "BSPTree<S extends Space>" as BSPTree_S_ {
        +boolean insertCut(Hyperplane hyperplane)
        +void setAttribute(Object attribute)
        +Object getAttribute()
        +void visit(BSPTreeVisitor visitor)
        +BSPTree getCell(Vector point)
        +BSPTree split(SubHyperplane sub)

      interface "BSPTreeVisitor<S extends Space>" as BSPTreeVisitor_S_ {
        +Order visitOrder(BSPTree node)
        +void visitInternalNode(BSPTree node)
        +void visitLeafNode(BSPTree node)

      interface "Region<S extends Space>" as Region_S_ {
        +boolean isEmpty()
        +boolean contains(Region region)
        +Location checkPoint(Vector point)
        +double getBoundarySize()
        +double getSize()
        +Vector getBarycenter()
        +Side side(Hyperplane hyperplane)
        +SubHyperplane intersection(SubHyperplane sub)
      note top
        a region is a part of the space
        it may be empty,
        it may cover the whole space,
        it may have infinite non-closed boudaries,
        it may be in several disconnected sub-parts,
        it may contain holes
      end note

      enum Location {

      enum Side {

      Hyperplane_S_ "1" <--* "1" SubHyperplane_S_
      SubHyperplane_S_ "0..1" <--* BSPTree_S_ : cut
      BSPTree_S_ <--o BSPTree_S_ : "parent      "
      BSPTree_S_ o--> BSPTree_S_ : "children"
      Region_S_ *-->  "1" BSPTree_S_
      Hyperplane_S_  <-- Region_S_
      AbstractSubHyperplane_S_T_ ..|> SubHyperplane_S_
      AbstractSubHyperplane_S_T_ *--> "1" Hyperplane_S_ : hyperplane
      AbstractSubHyperplane_S_T_ *--> "1" Region_S_ : region
      Region_S_ --> Location
      Region_S_ --> Side
      BSPTree_S_ <-- BSPTreeVisitor_S_ : visits

    end package

  end package


Other Java examples (source code examples)

Here is a short list of links related to this Java partitioning.puml source code file:

my book on functional programming


new blog posts


Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.