compilation plantuml
This commit is contained in:
@@ -6,29 +6,29 @@ skinparam packageStyle rectangle
|
||||
' ============================
|
||||
package mimage {
|
||||
|
||||
class Pixel #aliceblue {
|
||||
- r : int
|
||||
- g : int
|
||||
- b : int
|
||||
+ Pixel(r, g, b)
|
||||
+ getR()
|
||||
+ getG()
|
||||
+ getB()
|
||||
+ setR(r)
|
||||
+ setG(g)
|
||||
+ setB(b)
|
||||
}
|
||||
class Pixel #aliceblue {
|
||||
- r : int
|
||||
- g : int
|
||||
- b : int
|
||||
+ Pixel(r, g, b)
|
||||
+ getR()
|
||||
+ getG()
|
||||
+ getB()
|
||||
+ setR(r)
|
||||
+ setG(g)
|
||||
+ setB(b)
|
||||
}
|
||||
|
||||
class RGBImage #aliceblue {
|
||||
- width : int
|
||||
- height : int
|
||||
- pixels : Pixel[*]
|
||||
+ RGBImage(width, height)
|
||||
+ getWidth()
|
||||
+ getHeight()
|
||||
+ getPixel(x, y)
|
||||
+ setPixel(x, y, p)
|
||||
}
|
||||
class RGBImage #aliceblue {
|
||||
- width : int
|
||||
- height : int
|
||||
- pixels : Pixel[*]
|
||||
+ RGBImage(width, height)
|
||||
+ getWidth()
|
||||
+ getHeight()
|
||||
+ getPixel(x, y)
|
||||
+ setPixel(x, y, p)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -40,35 +40,35 @@ RGBImage *-- Pixel : contient
|
||||
' ============================
|
||||
package mhuffman {
|
||||
|
||||
class FrequencyTable #aliceblue {
|
||||
- freqR : int[*]
|
||||
- freqG : int[*]
|
||||
- freqB : int[*]
|
||||
+ computeFromImage(img)
|
||||
+ getRed()
|
||||
+ getGreen()
|
||||
+ getBlue()
|
||||
}
|
||||
class FrequencyTable #aliceblue {
|
||||
- freqR : int[*]
|
||||
- freqG : int[*]
|
||||
- freqB : int[*]
|
||||
+ computeFromImage(img)
|
||||
+ getRed()
|
||||
+ getGreen()
|
||||
+ getBlue()
|
||||
}
|
||||
|
||||
class HuffmanNode #aliceblue {
|
||||
+ value : int
|
||||
+ frequency : int
|
||||
+ left : HuffmanNode
|
||||
+ right : HuffmanNode
|
||||
+ isLeaf()
|
||||
}
|
||||
class HuffmanNode #aliceblue {
|
||||
+ value : int
|
||||
+ frequency : int
|
||||
+ left : HuffmanNode
|
||||
+ right : HuffmanNode
|
||||
+ isLeaf()
|
||||
}
|
||||
|
||||
class HuffmanTree #aliceblue {
|
||||
- root : HuffmanNode
|
||||
+ generateCodes()
|
||||
}
|
||||
class HuffmanTree #aliceblue {
|
||||
- root : HuffmanNode
|
||||
+ generateCodes()
|
||||
}
|
||||
|
||||
class CanonicalCode #aliceblue {
|
||||
- codeLengths : Map
|
||||
- canonicalCodes : Map
|
||||
+ getCode(value)
|
||||
+ getLength(value)
|
||||
}
|
||||
class CanonicalCode #aliceblue {
|
||||
- codeLengths : Map
|
||||
- canonicalCodes : Map
|
||||
+ getCode(value)
|
||||
+ getLength(value)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -82,36 +82,42 @@ CanonicalCode ..> HuffmanTree : dérive
|
||||
' ============================
|
||||
package util {
|
||||
|
||||
class BitInputStream #aliceblue {
|
||||
- in
|
||||
- currentByte : int
|
||||
- bitPosition : int
|
||||
+ BitInputStream(in)
|
||||
+ readBit()
|
||||
+ readBits(n)
|
||||
+ close()
|
||||
}
|
||||
class BitInputStream #aliceblue {
|
||||
- fluxEntree
|
||||
- octetCourant : int
|
||||
- positionBit : int
|
||||
- finDeFlux : boolean
|
||||
|
||||
class BitOutputStream #aliceblue {
|
||||
- out
|
||||
- currentByte : int
|
||||
- bitCount : int
|
||||
+ BitOutputStream(out)
|
||||
+ writeBit(bit)
|
||||
+ writeBits(value, n)
|
||||
+ flush()
|
||||
+ close()
|
||||
}
|
||||
+ BitInputStream(fluxEntree)
|
||||
+ readBit() : int
|
||||
+ readBits(nombreBits) : int
|
||||
+ closeFlux()
|
||||
}
|
||||
|
||||
class ByteUtils #aliceblue {
|
||||
+ toInt(high, low)
|
||||
+ toBytes(value)
|
||||
}
|
||||
class BitOutputStream #aliceblue {
|
||||
- fluxSortie
|
||||
- octetEnConstruction : int
|
||||
- positionBit : int
|
||||
- fluxFerme : boolean
|
||||
|
||||
class FileUtils #aliceblue {
|
||||
+ isPIFFile(f)
|
||||
+ readBinaryFile(path)
|
||||
}
|
||||
+ BitOutputStream(fluxSortie)
|
||||
+ writeBit(bit)
|
||||
+ writeBits(valeur, nombreBits)
|
||||
+ flush()
|
||||
+ fermerFlux()
|
||||
}
|
||||
|
||||
class ByteUtils #aliceblue {
|
||||
<<utilitaire>>
|
||||
+ toInt(high, low) : int
|
||||
+ toBytes(value) : byte[]
|
||||
}
|
||||
|
||||
class FileUtils #aliceblue {
|
||||
<<utilitaire>>
|
||||
+ isPIFFile(f) : boolean
|
||||
+ readBinaryFile(path)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user