clone
创建现有架构元素或架构对象的副本。
| 库 |
|
例子:
创建元素及其副本
Details
让我们创建一个电阻。
using EngeeRF
hR1 = resistor(50)
print(hR1)
resistor(Terminals = ("p", "n"), Name = "R", Resistance = 50.0)
创建电阻的副本 人力资源1.
hR2 = clone(hR1)
print(hR2)
resistor(Terminals = ("p", "n"), Name = "R", Resistance = 50.0)
创建架构及其副本
Details
创建架构对象。 给它加一个电阻和一个电容。
using EngeeRF
hckt1 = circuit("circuit1")
hC1= add(hckt1,[1 2],capacitor(3e-9))
hR1 = add(hckt1,[2 3],resistor(100))
print(hckt1)
circuit(ElementNames = ("C", "R"), Name = "circuit1", Elements = Vector{EngeeRF.DomainRF.DomainObjectRF}, Nodes = [1, 2, 3])
创建架构对象的副本。
hckt2 = clone(hckt1)
print(hckt2)
circuit(ElementNames = ("C", "R"), Name = "circuit1", Elements = Vector{EngeeRF.DomainRF.DomainObjectRF}, Nodes = [1, 2, 3])