Skip to content

GraphVector struct #97

Description

@kunyuan

Implement a data structure to handle vector graphs:

NOTE: All graphs in the vector should have the same number of external legs, but the labels of the external legs can be different.

  • Add the following struct
    struct GraphVector{F, W} <: AbstractVector
    graphs::Vector{Graphs{F, W}}
    end
  • Implement vector indexing through julia iterator API
  • A function to group the graphs with the same external legs with a given index. For example,

For a GraphVector, gv = GraphVector([g(1, 2), g(1, 3), g(2, 3)]). We expect the following:

  1. merge(gv, indices = [1, ]) = [GraphVector([g(1, 2), g(1, 3)]), GraphVector([g(2,3), ])]
  2. merge(gv, indices = [2, ]) = [GraphVector([g(1, 2), ]), GraphVector([g(2,3), g(1, 3)])]
  3. merge(gv, indices = [1, 2]) = [GraphVector([g(1, 2), ]), GraphVector([g(2,3), ]), GraphVector([g(1, 3), ])]
  • construct Feynman diagram from a set of GraphVectors.

function feynman_diagram(vertices::Vector{GraphVector}, topology::Vector{Vector{Int}};
external=[], factor=one(_dtype.factor), weight=zero(_dtype.weight), name="", type=:generic)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions