156 template<typename K, typename V, V v> |
156 template<typename K, typename V, V v> |
157 inline ConstMap<K, Const<V, v> > constMap() { |
157 inline ConstMap<K, Const<V, v> > constMap() { |
158 return ConstMap<K, Const<V, v> >(); |
158 return ConstMap<K, Const<V, v> >(); |
159 } |
159 } |
160 |
160 |
161 ///Map based on std::map |
161 ///Map based on \c std::map |
162 |
162 |
163 ///This is essentially a wrapper for \c std::map with addition that |
163 ///This is essentially a wrapper for \c std::map with addition that |
164 ///you can specify a default value different from \c Value(). |
164 ///you can specify a default value different from \c Value(). |
165 template <typename K, typename T, typename Compare = std::less<K> > |
165 template <typename K, typename T, typename Compare = std::less<K> > |
166 class StdMap : public MapBase<K, T> { |
166 class StdMap : public MapBase<K, T> { |
240 _map.clear(); |
240 _map.clear(); |
241 } |
241 } |
242 |
242 |
243 }; |
243 }; |
244 |
244 |
245 ///Returns a \ref StdMap class |
245 ///Returns a \c StdMap class |
246 |
246 |
247 ///This function just returns a \ref StdMap class with specified |
247 ///This function just returns a \c StdMap class with specified |
248 ///default value. |
248 ///default value. |
249 ///\relates StdMap |
249 ///\relates StdMap |
250 template<typename K, typename V, typename Compare = std::less<K> > |
250 template<typename K, typename V, typename Compare = std::less<K> > |
251 inline StdMap<K, V, Compare> stdMap(const V& value = V()) { |
251 inline StdMap<K, V, Compare> stdMap(const V& value = V()) { |
252 return StdMap<K, V, Compare>(value); |
252 return StdMap<K, V, Compare>(value); |
253 } |
253 } |
254 |
254 |
255 ///Returns a \ref StdMap class created from an appropriate std::map |
255 ///Returns a \c StdMap class created from an appropriate std::map |
256 |
256 |
257 ///This function just returns a \ref StdMap class created from an |
257 ///This function just returns a \c StdMap class created from an |
258 ///appropriate std::map. |
258 ///appropriate std::map. |
259 ///\relates StdMap |
259 ///\relates StdMap |
260 template<typename K, typename V, typename Compare = std::less<K> > |
260 template<typename K, typename V, typename Compare = std::less<K> > |
261 inline StdMap<K, V, Compare> stdMap( const std::map<K, V, Compare> &map, |
261 inline StdMap<K, V, Compare> stdMap( const std::map<K, V, Compare> &map, |
262 const V& value = V() ) { |
262 const V& value = V() ) { |
337 _vector[k] = t; |
337 _vector[k] = t; |
338 } |
338 } |
339 |
339 |
340 }; |
340 }; |
341 |
341 |
342 ///Returns an \ref IntegerMap class |
342 ///Returns an \c IntegerMap class |
343 |
343 |
344 ///This function just returns an \ref IntegerMap class. |
344 ///This function just returns an \c IntegerMap class. |
345 ///\relates IntegerMap |
345 ///\relates IntegerMap |
346 template<typename T> |
346 template<typename T> |
347 inline IntegerMap<T> integerMap(int size = 0, const T& value = T()) { |
347 inline IntegerMap<T> integerMap(int size = 0, const T& value = T()) { |
348 return IntegerMap<T>(size, value); |
348 return IntegerMap<T>(size, value); |
349 } |
349 } |
381 |
381 |
382 |
382 |
383 ///\brief Convert the \c Value of a map to another type using |
383 ///\brief Convert the \c Value of a map to another type using |
384 ///the default conversion. |
384 ///the default conversion. |
385 /// |
385 /// |
386 ///This \c concepts::ReadMap "read only map" |
386 ///This \ref concepts::ReadMap "read only map" |
387 ///converts the \c Value of a map to type \c T. |
387 ///converts the \c Value of a map to type \c T. |
388 ///Its \c Key is inherited from \c M. |
388 ///Its \c Key is inherited from \c M. |
389 template <typename M, typename T> |
389 template <typename M, typename T> |
390 class ConvertMap : public MapBase<typename M::Key, T> { |
390 class ConvertMap : public MapBase<typename M::Key, T> { |
391 const M& m; |
391 const M& m; |
438 SimpleMap(const M &_m) : m(_m) {}; |
438 SimpleMap(const M &_m) : m(_m) {}; |
439 ///\e |
439 ///\e |
440 Value operator[](Key k) const {return m[k];} |
440 Value operator[](Key k) const {return m[k];} |
441 }; |
441 }; |
442 |
442 |
443 ///Returns a \ref SimpleMap class |
443 ///Returns a \c SimpleMap class |
444 |
444 |
445 ///This function just returns a \ref SimpleMap class. |
445 ///This function just returns a \c SimpleMap class. |
446 ///\relates SimpleMap |
446 ///\relates SimpleMap |
447 template<typename M> |
447 template<typename M> |
448 inline SimpleMap<M> simpleMap(const M &m) { |
448 inline SimpleMap<M> simpleMap(const M &m) { |
449 return SimpleMap<M>(m); |
449 return SimpleMap<M>(m); |
450 } |
450 } |
451 |
451 |
452 ///Simple writable wrapping of a map |
452 ///Simple writable wrapping of a map |
453 |
453 |
454 ///This \ref concepts::WriteMap "write map" returns the simple |
454 ///This \ref concepts::ReadWriteMap "read-write map" returns the simple |
455 ///wrapping of the given map. Sometimes the reference maps cannot be |
455 ///wrapping of the given map. Sometimes the reference maps cannot be |
456 ///combined with simple read-write maps. This map adaptor wraps the |
456 ///combined with simple read-write maps. This map adaptor wraps the |
457 ///given map to simple read-write map. |
457 ///given map to simple read-write map. |
458 /// |
458 /// |
459 ///\sa SimpleMap |
459 ///\sa SimpleMap |
474 Value operator[](Key k) const {return m[k];} |
474 Value operator[](Key k) const {return m[k];} |
475 ///\e |
475 ///\e |
476 void set(Key k, const Value& c) { m.set(k, c); } |
476 void set(Key k, const Value& c) { m.set(k, c); } |
477 }; |
477 }; |
478 |
478 |
479 ///Returns a \ref SimpleWriteMap class |
479 ///Returns a \c SimpleWriteMap class |
480 |
480 |
481 ///This function just returns a \ref SimpleWriteMap class. |
481 ///This function just returns a \c SimpleWriteMap class. |
482 ///\relates SimpleWriteMap |
482 ///\relates SimpleWriteMap |
483 template<typename M> |
483 template<typename M> |
484 inline SimpleWriteMap<M> simpleWriteMap(M &m) { |
484 inline SimpleWriteMap<M> simpleWriteMap(M &m) { |
485 return SimpleWriteMap<M>(m); |
485 return SimpleWriteMap<M>(m); |
486 } |
486 } |
487 |
487 |
488 ///Sum of two maps |
488 ///Sum of two maps |
489 |
489 |
490 ///This \c concepts::ReadMap "read only map" returns the sum of the two |
490 ///This \ref concepts::ReadMap "read only map" returns the sum of the two |
491 ///given maps. |
491 ///given maps. |
492 ///Its \c Key and \c Value are inherited from \c M1. |
492 ///Its \c Key and \c Value are inherited from \c M1. |
493 ///The \c Key and \c Value of M2 must be convertible to those of \c M1. |
493 ///The \c Key and \c Value of M2 must be convertible to those of \c M1. |
494 template<typename M1, typename M2> |
494 template<typename M1, typename M2> |
495 class AddMap : public MapBase<typename M1::Key, typename M1::Value> { |
495 class AddMap : public MapBase<typename M1::Key, typename M1::Value> { |
518 return AddMap<M1, M2>(m1,m2); |
518 return AddMap<M1, M2>(m1,m2); |
519 } |
519 } |
520 |
520 |
521 ///Shift a map with a constant. |
521 ///Shift a map with a constant. |
522 |
522 |
523 ///This \c concepts::ReadMap "read only map" returns the sum of the |
523 ///This \ref concepts::ReadMap "read only map" returns the sum of the |
524 ///given map and a constant value. |
524 ///given map and a constant value. |
525 ///Its \c Key and \c Value are inherited from \c M. |
525 ///Its \c Key and \c Value are inherited from \c M. |
526 /// |
526 /// |
527 ///Actually, |
527 ///Actually, |
528 ///\code |
528 ///\code |
554 Value operator[](Key k) const {return m[k] + v;} |
554 Value operator[](Key k) const {return m[k] + v;} |
555 }; |
555 }; |
556 |
556 |
557 ///Shift a map with a constant (ReadWrite version). |
557 ///Shift a map with a constant (ReadWrite version). |
558 |
558 |
559 ///This \c concepts::ReadWriteMap "read-write map" returns the sum of the |
559 ///This \ref concepts::ReadWriteMap "read-write map" returns the sum of the |
560 ///given map and a constant value. It makes also possible to write the map. |
560 ///given map and a constant value. It makes also possible to write the map. |
561 ///Its \c Key and \c Value are inherited from \c M. |
561 ///Its \c Key and \c Value are inherited from \c M. |
562 /// |
562 /// |
563 ///\sa ShiftMap |
563 ///\sa ShiftMap |
564 template<typename M, typename C = typename M::Value> |
564 template<typename M, typename C = typename M::Value> |
600 return ShiftWriteMap<M, C>(m,v); |
600 return ShiftWriteMap<M, C>(m,v); |
601 } |
601 } |
602 |
602 |
603 ///Difference of two maps |
603 ///Difference of two maps |
604 |
604 |
605 ///This \c concepts::ReadMap "read only map" returns the difference |
605 ///This \ref concepts::ReadMap "read only map" returns the difference |
606 ///of the values of the two given maps. |
606 ///of the values of the two given maps. |
607 ///Its \c Key and \c Value are inherited from \c M1. |
607 ///Its \c Key and \c Value are inherited from \c M1. |
608 ///The \c Key and \c Value of \c M2 must be convertible to those of \c M1. |
608 ///The \c Key and \c Value of \c M2 must be convertible to those of \c M1. |
609 /// |
609 /// |
610 /// \todo Revise the misleading name |
610 /// \todo Revise the misleading name |
633 return SubMap<M1, M2>(m1, m2); |
633 return SubMap<M1, M2>(m1, m2); |
634 } |
634 } |
635 |
635 |
636 ///Product of two maps |
636 ///Product of two maps |
637 |
637 |
638 ///This \c concepts::ReadMap "read only map" returns the product of the |
638 ///This \ref concepts::ReadMap "read only map" returns the product of the |
639 ///values of the two given maps. |
639 ///values of the two given maps. |
640 ///Its \c Key and \c Value are inherited from \c M1. |
640 ///Its \c Key and \c Value are inherited from \c M1. |
641 ///The \c Key and \c Value of \c M2 must be convertible to those of \c M1. |
641 ///The \c Key and \c Value of \c M2 must be convertible to those of \c M1. |
642 template<typename M1, typename M2> |
642 template<typename M1, typename M2> |
643 class MulMap : public MapBase<typename M1::Key, typename M1::Value> { |
643 class MulMap : public MapBase<typename M1::Key, typename M1::Value> { |
663 return MulMap<M1, M2>(m1,m2); |
663 return MulMap<M1, M2>(m1,m2); |
664 } |
664 } |
665 |
665 |
666 ///Scales a map with a constant. |
666 ///Scales a map with a constant. |
667 |
667 |
668 ///This \c concepts::ReadMap "read only map" returns the value of the |
668 ///This \ref concepts::ReadMap "read only map" returns the value of the |
669 ///given map multiplied from the left side with a constant value. |
669 ///given map multiplied from the left side with a constant value. |
670 ///Its \c Key and \c Value are inherited from \c M. |
670 ///Its \c Key and \c Value are inherited from \c M. |
671 /// |
671 /// |
672 ///Actually, |
672 ///Actually, |
673 ///\code |
673 ///\code |
699 Value operator[](Key k) const {return v * m[k];} |
699 Value operator[](Key k) const {return v * m[k];} |
700 }; |
700 }; |
701 |
701 |
702 ///Scales a map with a constant (ReadWrite version). |
702 ///Scales a map with a constant (ReadWrite version). |
703 |
703 |
704 ///This \c concepts::ReadWriteMap "read-write map" returns the value of the |
704 ///This \ref concepts::ReadWriteMap "read-write map" returns the value of the |
705 ///given map multiplied from the left side with a constant value. It can |
705 ///given map multiplied from the left side with a constant value. It can |
706 ///also be used as write map if the \c / operator is defined between |
706 ///also be used as write map if the \c / operator is defined between |
707 ///\c Value and \c C and the given multiplier is not zero. |
707 ///\c Value and \c C and the given multiplier is not zero. |
708 ///Its \c Key and \c Value are inherited from \c M. |
708 ///Its \c Key and \c Value are inherited from \c M. |
709 /// |
709 /// |
747 return ScaleWriteMap<M, C>(m,v); |
747 return ScaleWriteMap<M, C>(m,v); |
748 } |
748 } |
749 |
749 |
750 ///Quotient of two maps |
750 ///Quotient of two maps |
751 |
751 |
752 ///This \c concepts::ReadMap "read only map" returns the quotient of the |
752 ///This \ref concepts::ReadMap "read only map" returns the quotient of the |
753 ///values of the two given maps. |
753 ///values of the two given maps. |
754 ///Its \c Key and \c Value are inherited from \c M1. |
754 ///Its \c Key and \c Value are inherited from \c M1. |
755 ///The \c Key and \c Value of \c M2 must be convertible to those of \c M1. |
755 ///The \c Key and \c Value of \c M2 must be convertible to those of \c M1. |
756 template<typename M1, typename M2> |
756 template<typename M1, typename M2> |
757 class DivMap : public MapBase<typename M1::Key, typename M1::Value> { |
757 class DivMap : public MapBase<typename M1::Key, typename M1::Value> { |
777 return DivMap<M1, M2>(m1,m2); |
777 return DivMap<M1, M2>(m1,m2); |
778 } |
778 } |
779 |
779 |
780 ///Composition of two maps |
780 ///Composition of two maps |
781 |
781 |
782 ///This \c concepts::ReadMap "read only map" returns the composition of |
782 ///This \ref concepts::ReadMap "read only map" returns the composition of |
783 ///two given maps. |
783 ///two given maps. |
784 ///That is to say, if \c m1 is of type \c M1 and \c m2 is of \c M2, |
784 ///That is to say, if \c m1 is of type \c M1 and \c m2 is of \c M2, |
785 ///then for |
785 ///then for |
786 ///\code |
786 ///\code |
787 /// ComposeMap<M1, M2> cm(m1,m2); |
787 /// ComposeMap<M1, M2> cm(m1,m2); |
828 |
828 |
829 ///Combine of two maps using an STL (binary) functor. |
829 ///Combine of two maps using an STL (binary) functor. |
830 |
830 |
831 ///Combine of two maps using an STL (binary) functor. |
831 ///Combine of two maps using an STL (binary) functor. |
832 /// |
832 /// |
833 ///This \c concepts::ReadMap "read only map" takes two maps and a |
833 ///This \ref concepts::ReadMap "read only map" takes two maps and a |
834 ///binary functor and returns the composition of the two |
834 ///binary functor and returns the composition of the two |
835 ///given maps unsing the functor. |
835 ///given maps unsing the functor. |
836 ///That is to say, if \c m1 and \c m2 is of type \c M1 and \c M2 |
836 ///That is to say, if \c m1 and \c m2 is of type \c M1 and \c M2 |
837 ///and \c f is of \c F, then for |
837 ///and \c f is of \c F, then for |
838 ///\code |
838 ///\code |
901 return combineMap<M1, M2, V (*)(K1, K2), V>(m1,m2,f); |
901 return combineMap<M1, M2, V (*)(K1, K2), V>(m1,m2,f); |
902 } |
902 } |
903 |
903 |
904 ///Negative value of a map |
904 ///Negative value of a map |
905 |
905 |
906 ///This \c concepts::ReadMap "read only map" returns the negative |
906 ///This \ref concepts::ReadMap "read only map" returns the negative |
907 ///value of the value returned by the given map. |
907 ///value of the value returned by the given map. |
908 ///Its \c Key and \c Value are inherited from \c M. |
908 ///Its \c Key and \c Value are inherited from \c M. |
909 ///The unary \c - operator must be defined for \c Value, of course. |
909 ///The unary \c - operator must be defined for \c Value, of course. |
910 /// |
910 /// |
911 ///\sa NegWriteMap |
911 ///\sa NegWriteMap |
923 Value operator[](Key k) const {return -m[k];} |
923 Value operator[](Key k) const {return -m[k];} |
924 }; |
924 }; |
925 |
925 |
926 ///Negative value of a map (ReadWrite version) |
926 ///Negative value of a map (ReadWrite version) |
927 |
927 |
928 ///This \c concepts::ReadWriteMap "read-write map" returns the negative |
928 ///This \ref concepts::ReadWriteMap "read-write map" returns the negative |
929 ///value of the value returned by the given map. |
929 ///value of the value returned by the given map. |
930 ///Its \c Key and \c Value are inherited from \c M. |
930 ///Its \c Key and \c Value are inherited from \c M. |
931 ///The unary \c - operator must be defined for \c Value, of course. |
931 ///The unary \c - operator must be defined for \c Value, of course. |
932 /// |
932 /// |
933 /// \sa NegMap |
933 /// \sa NegMap |
965 return NegWriteMap<M>(m); |
965 return NegWriteMap<M>(m); |
966 } |
966 } |
967 |
967 |
968 ///Absolute value of a map |
968 ///Absolute value of a map |
969 |
969 |
970 ///This \c concepts::ReadMap "read only map" returns the absolute value |
970 ///This \ref concepts::ReadMap "read only map" returns the absolute value |
971 ///of the value returned by the given map. |
971 ///of the value returned by the given map. |
972 ///Its \c Key and \c Value are inherited from \c M. |
972 ///Its \c Key and \c Value are inherited from \c M. |
973 ///\c Value must be comparable to \c 0 and the unary \c - |
973 ///\c Value must be comparable to \c 0 and the unary \c - |
974 ///operator must be defined for it, of course. |
974 ///operator must be defined for it, of course. |
975 template<typename M> |
975 template<typename M> |
999 return AbsMap<M>(m); |
999 return AbsMap<M>(m); |
1000 } |
1000 } |
1001 |
1001 |
1002 ///Converts an STL style functor to a map |
1002 ///Converts an STL style functor to a map |
1003 |
1003 |
1004 ///This \c concepts::ReadMap "read only map" returns the value |
1004 ///This \ref concepts::ReadMap "read only map" returns the value |
1005 ///of a given functor. |
1005 ///of a given functor. |
1006 /// |
1006 /// |
1007 ///Template parameters \c K and \c V will become its |
1007 ///Template parameters \c K and \c V will become its |
1008 ///\c Key and \c Value. |
1008 ///\c Key and \c Value. |
1009 ///In most cases they have to be given explicitly because a |
1009 ///In most cases they have to be given explicitly because a |
1057 |
1057 |
1058 ///This class Converts a map to an STL style (unary) functor. |
1058 ///This class Converts a map to an STL style (unary) functor. |
1059 ///that is it provides an <tt>operator()</tt> to read its values. |
1059 ///that is it provides an <tt>operator()</tt> to read its values. |
1060 /// |
1060 /// |
1061 ///For the sake of convenience it also works as |
1061 ///For the sake of convenience it also works as |
1062 ///a ususal \c concepts::ReadMap "readable map", |
1062 ///a ususal \ref concepts::ReadMap "readable map", |
1063 ///i.e. <tt>operator[]</tt> and the \c Key and \c Value typedefs also exist. |
1063 ///i.e. <tt>operator[]</tt> and the \c Key and \c Value typedefs also exist. |
1064 /// |
1064 /// |
1065 ///\sa FunctorMap |
1065 ///\sa FunctorMap |
1066 template <typename M> |
1066 template <typename M> |
1067 class MapFunctor : public MapBase<typename M::Key, typename M::Value> { |
1067 class MapFunctor : public MapBase<typename M::Key, typename M::Value> { |
1091 return MapFunctor<M>(m); |
1091 return MapFunctor<M>(m); |
1092 } |
1092 } |
1093 |
1093 |
1094 ///Applies all map setting operations to two maps |
1094 ///Applies all map setting operations to two maps |
1095 |
1095 |
1096 ///This map has two \c concepts::ReadMap "readable map" |
1096 ///This map has two \ref concepts::ReadMap "readable map" |
1097 ///parameters and each read request will be passed just to the |
1097 ///parameters and each read request will be passed just to the |
1098 ///first map. This class is the just readable map type of the ForkWriteMap. |
1098 ///first map. This class is the just readable map type of the \c ForkWriteMap. |
1099 /// |
1099 /// |
1100 ///The \c Key and \c Value are inherited from \c M1. |
1100 ///The \c Key and \c Value are inherited from \c M1. |
1101 ///The \c Key and \c Value of M2 must be convertible from those of \c M1. |
1101 ///The \c Key and \c Value of M2 must be convertible from those of \c M1. |
1102 /// |
1102 /// |
1103 ///\sa ForkWriteMap |
1103 ///\sa ForkWriteMap |
1119 }; |
1119 }; |
1120 |
1120 |
1121 |
1121 |
1122 ///Applies all map setting operations to two maps |
1122 ///Applies all map setting operations to two maps |
1123 |
1123 |
1124 ///This map has two \c concepts::WriteMap "writable map" |
1124 ///This map has two \ref concepts::WriteMap "writable map" |
1125 ///parameters and each write request will be passed to both of them. |
1125 ///parameters and each write request will be passed to both of them. |
1126 ///If \c M1 is also \c concepts::ReadMap "readable", |
1126 ///If \c M1 is also \ref concepts::ReadMap "readable", |
1127 ///then the read operations will return the |
1127 ///then the read operations will return the |
1128 ///corresponding values of \c M1. |
1128 ///corresponding values of \c M1. |
1129 /// |
1129 /// |
1130 ///The \c Key and \c Value are inherited from \c M1. |
1130 ///The \c Key and \c Value are inherited from \c M1. |
1131 ///The \c Key and \c Value of M2 must be convertible from those of \c M1. |
1131 ///The \c Key and \c Value of M2 must be convertible from those of \c M1. |
1170 |
1170 |
1171 /* ************* BOOL MAPS ******************* */ |
1171 /* ************* BOOL MAPS ******************* */ |
1172 |
1172 |
1173 ///Logical 'not' of a map |
1173 ///Logical 'not' of a map |
1174 |
1174 |
1175 ///This bool \c concepts::ReadMap "read only map" returns the |
1175 ///This bool \ref concepts::ReadMap "read only map" returns the |
1176 ///logical negation of the value returned by the given map. |
1176 ///logical negation of the value returned by the given map. |
1177 ///Its \c Key is inherited from \c M, its Value is \c bool. |
1177 ///Its \c Key is inherited from \c M, its Value is \c bool. |
1178 /// |
1178 /// |
1179 ///\sa NotWriteMap |
1179 ///\sa NotWriteMap |
1180 template <typename M> |
1180 template <typename M> |
1191 Value operator[](Key k) const {return !m[k];} |
1191 Value operator[](Key k) const {return !m[k];} |
1192 }; |
1192 }; |
1193 |
1193 |
1194 ///Logical 'not' of a map (ReadWrie version) |
1194 ///Logical 'not' of a map (ReadWrie version) |
1195 |
1195 |
1196 ///This bool \c concepts::ReadWriteMap "read-write map" returns the |
1196 ///This bool \ref concepts::ReadWriteMap "read-write map" returns the |
1197 ///logical negation of the value returned by the given map. When it is set, |
1197 ///logical negation of the value returned by the given map. When it is set, |
1198 ///the opposite value is set to the original map. |
1198 ///the opposite value is set to the original map. |
1199 ///Its \c Key is inherited from \c M, its Value is \c bool. |
1199 ///Its \c Key is inherited from \c M, its Value is \c bool. |
1200 /// |
1200 /// |
1201 ///\sa NotMap |
1201 ///\sa NotMap |
1259 } |
1259 } |
1260 |
1260 |
1261 |
1261 |
1262 /// \brief Writable bool map for logging each \c true assigned element |
1262 /// \brief Writable bool map for logging each \c true assigned element |
1263 /// |
1263 /// |
1264 /// Writable bool map for logging each \c true assigned element, i.e it |
1264 /// A \ref concepts::ReadWriteMap "read-write" bool map for logging |
1265 /// copies all the keys set to \c true to the given iterator. |
1265 /// each \c true assigned element, i.e it/ copies all the keys set |
|
1266 /// to \c true to the given iterator. |
1266 /// |
1267 /// |
1267 /// \note The container of the iterator should contain space |
1268 /// \note The container of the iterator should contain space |
1268 /// for each element. |
1269 /// for each element. |
1269 /// |
1270 /// |
1270 /// The following example shows how you can write the edges found by the Prim |
1271 /// The following example shows how you can write the edges found by the Prim |