Skip to content
This repository has been archived by the owner on Oct 23, 2022. It is now read-only.

Commit

Permalink
fix export typo (#269)
Browse files Browse the repository at this point in the history
fixes #268
  • Loading branch information
alfredclwong authored Aug 20, 2021
1 parent f30da6e commit 351427d
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions src/Examples/repeating_structure_examples.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,29 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# See LICENSE in the project root for full license information.

export drawrectlattice, drawhexneighbors, drawhexregion, drawhexrect, drawhexrectcolors
export hex3cluster, hex3RGB, hexRGBW, hex12RGB
export drawhex3RGB, drawhex12RGB


#############################################################################
drawrectlattice() = Vis.drawcells(Repeat.RectangularBasis(),50.0,SMatrix{2,4,Int64}(0,0,0,1,1,0,1,1))
export drawrectlattice

"""draw the 2 ring neighbors of the hex cell at coordinates (0,0)"""
drawhexneighbors() = Vis.drawcells(Repeat.HexBasis1(),50,Repeat.neighbors(Repeat.HexBasis1,(0,0),2))
export drawneighbors

"""draw hex cell at coordinates (0,0) and the 1 and 2 ring neighbors"""
drawhexregion() = Vis.drawcells(Repeat.HexBasis1(),50,Repeat.region(Repeat.HexBasis1,(0,0),2))
export drawhexregion

"""draw hex cells that fit within a rectangular box centered at coordinates (0,0). Use fill color yellow."""
function drawhexrect()
cells = Repeat.hexcellsinbox(2,2)
Vis.drawcells(Repeat.HexBasis1(),50,cells,color = repeat(["yellow"],length(cells)))
end
export drawhexrect

"""draw hex cells that fit within a rectangular box centered at coordinates (0,0). Use random fill colors selected for maximum distinguishability."""
function drawhexrectcolors()
cells = Repeat.hexcellsinbox(4,4)
Vis.drawcells(Repeat.HexBasis1(),30,cells)
end
export drawhexrectcolors

""" Create a LatticeCluser with three elements at (0,0),(-1,0),(-1,1) coordinates in the HexBasis1 lattice"""
function hex3cluster()
Expand All @@ -37,7 +33,6 @@ function hex3cluster()
clusterbasis = LatticeBasis(( -1,2),(2,-1))
return LatticeCluster(clusterbasis,eltlattice,clusterelts)
end
export hex3cluster

""" Create a ClusterWithProperties with three types of elements, R,G,B """
function hex3RGB()
Expand All @@ -50,7 +45,6 @@ function hex3RGB()
properties = DataFrame(Color = colors, Name = names)
return ClusterWithProperties(lattice,properties)
end
export hex3RGB

""" Create a ClusterWithProperties with four types of elements, R,G,B,W """
function hexRGBW()
Expand All @@ -63,7 +57,6 @@ function hexRGBW()
properties = DataFrame(Color = colors, Name = names)
return ClusterWithProperties(lattice,properties)
end
export hexRGBW

function hex12RGB()
clusterelements = SVector(
Expand Down Expand Up @@ -93,15 +86,9 @@ function hex12RGB()
properties = DataFrame(Color = colors, Name = names)
return ClusterWithProperties(lattice,properties)
end
export hex12RGB

""" draw 3 repeats of hex3RGB cluster """
drawhex3RGB() = Vis.draw(hex3RGB(),[0 1 0; 0 0 1])
export drawhex3RGB

""" draw 3 repeats of hex12RGB cluster """
drawhex12RGB() = Vis.draw(hex12RGB(),[0 1 0; 0 0 1])
export drawhex12RGB



0 comments on commit 351427d

Please sign in to comment.