Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/YipengQin/VTP_source_code
05 April 2024, 19:07:37 UTC
  • Code
  • Branches (1)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/master
    No releases to show
  • 2036af9
  • /
  • geodesic_algorithm_exact_elements.h
Raw File Download
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
origin badgecontent badge Iframe embedding
swh:1:cnt:6c74c487a7585436121b618a956548f232209ff6
origin badgedirectory badge Iframe embedding
swh:1:dir:2036af91c3aaaf3a3647963c278cfac7d6cf17cc
origin badgerevision badge
swh:1:rev:9b7155788db0ccf7afc0ef108537bd1ea09792cb
origin badgesnapshot badge
swh:1:snp:a4bf64ac2020b49ca3840fd021305cb5ed6e230d
Citations

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: 9b7155788db0ccf7afc0ef108537bd1ea09792cb authored by Yipeng Qin on 07 December 2020, 12:00:56 UTC
teaser image update
Tip revision: 9b71557
geodesic_algorithm_exact_elements.h
#ifndef GEODESIC_ALGORITHM_EXACT_ELEMENTS
#define GEODESIC_ALGORITHM_EXACT_ELEMENTS

#include "stdafx.h"
#include "geodesic_memory.h"
#include "geodesic_mesh_elements.h"

namespace geodesic {

	class Interval;
	class IntervalList;
	typedef Interval* interval_pointer;
	typedef IntervalList* list_pointer;

	struct Triangle // Components of a face to be propagated
	{
		face_pointer face; // Current Face

		edge_pointer bottom_edge, // Edges
			left_edge,
			right_edge;

		vertex_pointer top_vertex, // Vertices 
			left_vertex,
			right_vertex;

		double top_alpha,
			left_alpha,
			right_alpha; // Angles

		list_pointer left_list,
			right_list; // Lists
	};

	class Interval						//interval of the edge
	{
	public:

		Interval() {};
		~Interval() {};

		double& start() { return m_start; };
		double& stop() { return m_stop; };
		double& d() { return m_d; };
		double& pseudo_x() { return m_pseudo_x; };
		double& pseudo_y() { return m_pseudo_y; };

		double& sp() { return m_sp; };

		double& shortest_distance() { return m_shortest_distance; }

		interval_pointer& next() { return m_next; };
		interval_pointer& previous() { return m_previous; };

	private:
		double m_start;						//initial point of the interval on the edge
		double m_stop;
		double m_d;							//distance from the source to the pseudo-source
		double m_pseudo_x;					//coordinates of the pseudo-source in the local coordinate system
		double m_pseudo_y;					//y-coordinate should be always negative

		double m_sp;                        //separating point

		double m_shortest_distance;         //shortest distance from the interval to top_vertex, for numerical precision issue

		interval_pointer m_next;			//pointer to the next interval in the list	
		interval_pointer m_previous;        //pointer to the previous interval in the list
	};

	class IntervalList						//list of the of intervals of the given edge
	{
	public:
		IntervalList() {  m_start = NULL; m_edge = NULL; m_sp = -1; m_begin = m_end = NULL; }
		~IntervalList() {};

		void clear() { m_begin = m_end = NULL; }
		void initialize(edge_pointer e) { m_edge = e; }

		vertex_pointer& start_vertex() { return m_start; }
		edge_pointer& edge() { return m_edge; }

		double& sp() { return m_sp; };

		double& pseudo_x() { return m_pseudo_x; };
		double& pseudo_y() { return m_pseudo_y; };

		// List operation
		interval_pointer& begin() { return m_begin; }

		interval_pointer& end() { return m_end; }

		bool empty() { return m_begin == NULL; }

		void push_back(interval_pointer & w)
		{
			if (!m_end)
			{
				w->previous() = NULL;
				w->next() = NULL;
				m_begin = m_end = w;
			}
			else
			{
				w->next() = NULL;
				w->previous() = m_end;
				m_end->next() = w;
				m_end = w;
			}
		}

		void erase(interval_pointer & w)
		{
			if ((w == m_begin) && (w == m_end))
			{
				m_begin = m_end = NULL;
			}
			else if (w == m_begin)
			{
				m_begin = m_begin->next();
				m_begin->previous() = NULL;
			}
			else if (w == m_end)
			{
				m_end = m_end->previous();
				m_end->next() = NULL;
			}
			else
			{
				w->previous()->next() = w->next();
				w->next()->previous() = w->previous();
			}
		}

	private:

		edge_pointer     m_edge;		    //edge that owns this list
		vertex_pointer   m_start;           //vertex from which the interval list starts

		interval_pointer m_begin;
		interval_pointer m_end;

		double m_pseudo_x;
		double m_pseudo_y;

		double m_sp;                        //separating point
	};

}		//geodesic

#endif

back to top

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Contact— JavaScript license information— Web API